當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。