本文整理汇总了Java中com.umeng.update.UmengUpdateAgent.setAppkey方法的典型用法代码示例。如果您正苦于以下问题:Java UmengUpdateAgent.setAppkey方法的具体用法?Java UmengUpdateAgent.setAppkey怎么用?Java UmengUpdateAgent.setAppkey使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.umeng.update.UmengUpdateAgent
的用法示例。
在下文中一共展示了UmengUpdateAgent.setAppkey方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onCreate
import com.umeng.update.UmengUpdateAgent; //导入方法依赖的package包/类
/**
* Build object graph on creation so that objects are available
*/
@Override
public void onCreate() {
super.onCreate();
Prefs.with(this).useDefault().init();
boolean enableLeakCanary = Prefs.getBoolean("prefs_debug_enable_leak_canary", true);
boolean enableCrashWoodpecker = Prefs.getBoolean("prefs_debug_enable_crash_woodpecker", true);
if(enableLeakCanary)
LeakCanary.install(this);
if(enableCrashWoodpecker)
CrashWoodpecker.fly().to(this);
boolean isNightMode = Prefs.getBoolean(PreferenceConstant.SHARED_PREFERENCE_IS_NIGHT_MODE, false);
if(isNightMode) {
AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_YES);
} else {
AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_NO);
}
AnalyticsUtils.init(this, getString(R.string.UMENG_APPKEY_VALUE));
Fabric.with(this, new Crashlytics());
Timber.plant(new CrashReportingTree());
UmengUpdateAgent.setAppkey(getString(R.string.UMENG_APPKEY_VALUE));
UmengUpdateAgent.update(this);
mAndroidNavigation = new AndroidNavigation();
appComponent = DaggerAppComponent
.builder()
.appModule(new AppModule(this, mAndroidNavigation))
.build();
/*Intent chapterContentCacheServiceIntent = new Intent(this, ChapterContentsCacheService.class);
startService(chapterContentCacheServiceIntent);
Intent loadLocalTextServiceIntent = new Intent(this, LocalFileImportService.class);
startService(loadLocalTextServiceIntent);*/
}
示例2: init
import com.umeng.update.UmengUpdateAgent; //导入方法依赖的package包/类
public static void init() {
AnalyticsConfig.setAppkey(StatUtils.UMENG_APP_KEY);
UmengUpdateAgent.setAppkey(StatUtils.UMENG_APP_KEY);
UmengUpdateAgent.setUpdateCheckConfig(false);
}
示例3: onCreate
import com.umeng.update.UmengUpdateAgent; //导入方法依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_NO_TITLE);
view = new MainView(getBaseContext());
view.setMainActivity(this);
AppConnect.getInstance(this);
AppConnect.getInstance(WapsStatic.APP_ID, WapsStatic.APP_PID, this);
MobclickAgent.onResume(this, UmengStatic.UMENG_APPKEY, UmengStatic.UMENG_CHANNEL);
UmengUpdateAgent.setAppkey(UmengStatic.UMENG_APPKEY);
UmengUpdateAgent.setChannel(UmengStatic.UMENG_CHANNEL);
UmengUpdateAgent.update(this);
MobclickAgent.updateOnlineConfig(this);
UmengUpdateAgent.setUpdateCheckConfig(true);
UmengUpdateAgent.setUpdateAutoPopup(true);
SharedPreferences settings = PreferenceManager.getDefaultSharedPreferences(this);
view.hasSaveState = settings.getBoolean("save_state", false);
if (savedInstanceState != null) {
if (savedInstanceState.getBoolean("hasState")) {
load();
}
}
setContentView(view);
/*String ads = MobclickAgent.getConfigParams(this, UmengStatic.V360_ADS_KEY);
if ("1".equals(ads) || "on".equalsIgnoreCase(ads) || "true".equalsIgnoreCase(ads)) {
LinearLayout adlayout = new LinearLayout(this);
adlayout.setGravity(Gravity.BOTTOM);
RelativeLayout.LayoutParams layoutParams = new RelativeLayout.LayoutParams(
ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.MATCH_PARENT);
AppConnect.getInstance(this).showBannerAd(this, adlayout);
layoutParams.addRule(RelativeLayout.ALIGN_PARENT_BOTTOM);
addContentView(adlayout, layoutParams);
AppConnect.getInstance(this).showOffers(this);
}*/
LinearLayout adlayout = new LinearLayout(this);
adlayout.setGravity(Gravity.BOTTOM);
RelativeLayout.LayoutParams layoutParams = new RelativeLayout.LayoutParams(
ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.MATCH_PARENT);
AppConnect.getInstance(this).showBannerAd(this, adlayout);
layoutParams.addRule(RelativeLayout.ALIGN_PARENT_BOTTOM);
addContentView(adlayout, layoutParams);
// AppConnect.getInstance(this).showOffers(this);
}
示例4: onCreate
import com.umeng.update.UmengUpdateAgent; //导入方法依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_NO_TITLE);
view = new MainView(getBaseContext());
view.setMainActivity(this);
AppConnect.getInstance(this);
AppConnect.getInstance(WapsStatic.APP_ID, WapsStatic.APP_PID, this);
MobclickAgent.onResume(this, UmengStatic.UMENG_APPKEY, UmengStatic.UMENG_CHANNEL);
UmengUpdateAgent.setAppkey(UmengStatic.UMENG_APPKEY);
UmengUpdateAgent.setChannel(UmengStatic.UMENG_CHANNEL);
UmengUpdateAgent.update(this);
MobclickAgent.updateOnlineConfig(this);
UmengUpdateAgent.setUpdateCheckConfig(true);
UmengUpdateAgent.setUpdateAutoPopup(true);
SharedPreferences settings = PreferenceManager.getDefaultSharedPreferences(this);
view.hasSaveState = settings.getBoolean("save_state", false);
if (savedInstanceState != null) {
if (savedInstanceState.getBoolean("hasState")) {
load();
}
}
setContentView(view);
/*String ads = MobclickAgent.getConfigParams(this, UmengStatic.BAIDU_ADS);
Log.e("umeng ads", "ads : " + ads);
if ("1".equals(ads) || "on".equalsIgnoreCase(ads) || "true".equalsIgnoreCase(ads)) {
LinearLayout adlayout = new LinearLayout(this);
adlayout.setGravity(Gravity.BOTTOM);
RelativeLayout.LayoutParams layoutParams = new RelativeLayout.LayoutParams(
ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.MATCH_PARENT);
AppConnect.getInstance(this).showBannerAd(this, adlayout);
layoutParams.addRule(RelativeLayout.ALIGN_PARENT_BOTTOM);
addContentView(adlayout, layoutParams);
AppConnect.getInstance(this).showOffers(this);
}*/
LinearLayout adlayout = new LinearLayout(this);
adlayout.setGravity(Gravity.BOTTOM);
RelativeLayout.LayoutParams layoutParams = new RelativeLayout.LayoutParams(
ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.MATCH_PARENT);
AppConnect.getInstance(this).showBannerAd(this, adlayout);
layoutParams.addRule(RelativeLayout.ALIGN_PARENT_BOTTOM);
addContentView(adlayout, layoutParams);
// AppConnect.getInstance(this).showOffers(this);
}
示例5: onCreate
import com.umeng.update.UmengUpdateAgent; //导入方法依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_NO_TITLE);
view = new MainView(getBaseContext());
view.setMainActivity(this);
AppConnect.getInstance(this);
AppConnect.getInstance(WapsStatic.APP_ID, WapsStatic.APP_PID, this);
MobclickAgent.onResume(this, UmengStatic.UMENG_APPKEY, UmengStatic.UMENG_CHANNEL);
UmengUpdateAgent.setAppkey(UmengStatic.UMENG_APPKEY);
UmengUpdateAgent.setChannel(UmengStatic.UMENG_CHANNEL);
UmengUpdateAgent.update(this);
MobclickAgent.updateOnlineConfig(this);
UmengUpdateAgent.setUpdateCheckConfig(true);
UmengUpdateAgent.setUpdateAutoPopup(true);
SharedPreferences settings = PreferenceManager.getDefaultSharedPreferences(this);
view.hasSaveState = settings.getBoolean("save_state", false);
if (savedInstanceState != null) {
if (savedInstanceState.getBoolean("hasState")) {
load();
}
}
setContentView(view);
/*String ads = MobclickAgent.getConfigParams(this, UmengStatic.V360_ADS_KEY);
if ("1".equals(ads) || "on".equalsIgnoreCase(ads) || "true".equalsIgnoreCase(ads)) {
LinearLayout adlayout = new LinearLayout(this);
adlayout.setGravity(Gravity.BOTTOM);
RelativeLayout.LayoutParams layoutParams = new RelativeLayout.LayoutParams(
ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.MATCH_PARENT);
AppConnect.getInstance(this).showBannerAd(this, adlayout);
layoutParams.addRule(RelativeLayout.ALIGN_PARENT_BOTTOM);
addContentView(adlayout, layoutParams);
AppConnect.getInstance(this).showOffers(this);
}*/
LinearLayout adlayout = new LinearLayout(this);
adlayout.setGravity(Gravity.BOTTOM);
RelativeLayout.LayoutParams layoutParams = new RelativeLayout.LayoutParams(
ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.MATCH_PARENT);
AppConnect.getInstance(this).showBannerAd(this, adlayout);
layoutParams.addRule(RelativeLayout.ALIGN_PARENT_BOTTOM);
addContentView(adlayout, layoutParams);
// AppConnect.getInstance(this).showOffers(this);
}
示例6: onCreate
import com.umeng.update.UmengUpdateAgent; //导入方法依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_NO_TITLE);
view = new MainView(getBaseContext());
AppConnect.getInstance(this);
AppConnect.getInstance(WapsStatic.APP_ID, WapsStatic.APP_PID, this);
MobclickAgent.onResume(this, UmengStatic.UMENG_APPKEY, UmengStatic.UMENG_CHANNEL);
UmengUpdateAgent.setAppkey(UmengStatic.UMENG_APPKEY);
UmengUpdateAgent.setChannel(UmengStatic.UMENG_CHANNEL);
UmengUpdateAgent.update(this);
MobclickAgent.updateOnlineConfig(this);
UmengUpdateAgent.setUpdateCheckConfig(true);
UmengUpdateAgent.setUpdateAutoPopup(true);
SharedPreferences settings = PreferenceManager.getDefaultSharedPreferences(this);
view.hasSaveState = settings.getBoolean("save_state", false);
if (savedInstanceState != null) {
if (savedInstanceState.getBoolean("hasState")) {
load();
}
}
setContentView(view);
String ads = MobclickAgent.getConfigParams(this, UmengStatic.V360_ADS_KEY);
Log.e("umeng ads", "ads : " + ads);
// if("1".equals(ads) || "on".equalsIgnoreCase(ads) || "true".equalsIgnoreCase(ads)) {
// LinearLayout adlayout = new LinearLayout(this);
// adlayout.setGravity(Gravity.BOTTOM);
// RelativeLayout.LayoutParams layoutParams = new RelativeLayout.LayoutParams(ViewGroup.LayoutParams.FILL_PARENT,
// ViewGroup.LayoutParams.MATCH_PARENT);
// AppConnect.getInstance(this).showBannerAd(this, adlayout);
// //layoutParams.addRule(RelativeLayout.ALIGN_PARENT_BOTTOM);// 此代码可设置顶端或低端
// addContentView(adlayout, layoutParams);
// }
/*MobclickAgent.setOnlineConfigureListener(new UmengOnlineConfigureListener() {
public void onDataReceived(JSONObject data) {
}
});*/
LinearLayout adlayout = new LinearLayout(this);
adlayout.setGravity(Gravity.BOTTOM);
RelativeLayout.LayoutParams layoutParams = new RelativeLayout.LayoutParams(ViewGroup.LayoutParams.FILL_PARENT,
ViewGroup.LayoutParams.MATCH_PARENT);
AppConnect.getInstance(this).showBannerAd(this, adlayout);
//layoutParams.addRule(RelativeLayout.ALIGN_PARENT_BOTTOM);// 此代码可设置顶端或低端
addContentView(adlayout, layoutParams);
// AppConnect.getInstance(this).showOffers(this);
}