当前位置: 首页>>代码示例>>Java>>正文


Java UmengUpdateAgent.setAppkey方法代码示例

本文整理汇总了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);*/
}
 
开发者ID:crysehillmes,项目名称:smoothnovelreader,代码行数:39,代码来源:SmoothReaderApplication.java

示例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);
}
 
开发者ID:CyanFlxy,项目名称:KnockKnock,代码行数:6,代码来源:StatUtils.java

示例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);
	}
 
开发者ID:liufeiit,项目名称:itmarry,代码行数:50,代码来源:MainActivity.java

示例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);
	}
 
开发者ID:liufeiit,项目名称:itmarry,代码行数:53,代码来源:MainActivity.java

示例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);
	}
 
开发者ID:liufeiit,项目名称:itmarry,代码行数:50,代码来源:MainActivity.java

示例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);
		
	}
 
开发者ID:liufeiit,项目名称:itmarry,代码行数:54,代码来源:MainActivity.java


注:本文中的com.umeng.update.UmengUpdateAgent.setAppkey方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。