當前位置: 首頁>>代碼示例>>Java>>正文


Java UmengUpdateAgent.setUpdateCheckConfig方法代碼示例

本文整理匯總了Java中com.umeng.update.UmengUpdateAgent.setUpdateCheckConfig方法的典型用法代碼示例。如果您正苦於以下問題:Java UmengUpdateAgent.setUpdateCheckConfig方法的具體用法?Java UmengUpdateAgent.setUpdateCheckConfig怎麽用?Java UmengUpdateAgent.setUpdateCheckConfig使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在com.umeng.update.UmengUpdateAgent的用法示例。


在下文中一共展示了UmengUpdateAgent.setUpdateCheckConfig方法的9個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: checkAutoUpdateByUmeng

import com.umeng.update.UmengUpdateAgent; //導入方法依賴的package包/類
public void checkAutoUpdateByUmeng() {
    if(mContext.getIntent().getSerializableExtra("BUNDLE_GANK") == null){
        UmengUpdateAgent.setUpdateCheckConfig(BuildConfig.DEBUG);
        //check update even in 2g/3g/4g condition
        UmengUpdateAgent.setUpdateOnlyWifi(false);
        UmengUpdateAgent.update(mContext);
    }
}
 
開發者ID:Altman29,項目名稱:GanKDaily,代碼行數:9,代碼來源:MainPresenter.java

示例2: onCreate

import com.umeng.update.UmengUpdateAgent; //導入方法依賴的package包/類
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);
    initDrawerListItems();
    initViews();

    startService(new Intent(getApplicationContext(), DeamonService.class));

    UmengUpdateAgent.setUpdateCheckConfig(BuildConfig.DEBUG);
    UmengUpdateAgent.setRichNotification(true);
    UmengUpdateAgent.update(getApplicationContext());
}
 
開發者ID:xujunbin,項目名稱:FloatWindow,代碼行數:14,代碼來源:MainActivity.java

示例3: initUmeng

import com.umeng.update.UmengUpdateAgent; //導入方法依賴的package包/類
@Override
public void initUmeng(Context context) {
    if (App.getApp() != null && App.getApp().getEdition() == Edition.DEBUG) {
        MobclickAgent.setDebugMode(true);
        MobclickAgent.setCatchUncaughtExceptions(false);
        UpdateConfig.setDebug(true);
    } else {
        UmengUpdateAgent.setUpdateCheckConfig(false);
    }
    // Fix bug for downloading always
    UmengUpdateAgent.setDeltaUpdate(false);
    UmengUpdateAgent.setUpdateOnlyWifi(false);
    UmengUpdateAgent.setUpdateUIStyle(UpdateStatus.STYLE_DIALOG);
    UmengUpdateAgent.setUpdateAutoPopup(false);
}
 
開發者ID:wavinsun,項目名稱:MUtils,代碼行數:16,代碼來源:UmengHelperImpl.java

示例4: 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

示例5: setUmeng

import com.umeng.update.UmengUpdateAgent; //導入方法依賴的package包/類
private void setUmeng() {
        //對友盟統計日誌加密
        AnalyticsConfig.enableEncrypt(true);
        //友盟統計不采集mac信息
        MobclickAgent.setCheckDevice(false);

        //禁止自動提示更新對話框
        UmengUpdateAgent.setUpdateAutoPopup(false);
        //禁止增量更新
        UmengUpdateAgent.setDeltaUpdate(false);
        UmengUpdateAgent.setUpdateListener(new UmengUpdateListener() {
            @Override
            public void onUpdateReturned(int status, UpdateResponse updateResponse) {
                switch (status) {
                    case UpdateStatus.Yes:
                        //有更新
                        showUpdateDialog(updateResponse);
                        break;
                    case UpdateStatus.No:
                        //無更新
                        break;
                    case UpdateStatus.NoneWifi:
                        //無wifi
                        break;
                    case UpdateStatus.Timeout:
                        //超時
                        break;
                }
            }
        });
        //友盟設置檢查更新,不限於wifi
        UmengUpdateAgent.setUpdateOnlyWifi(false);
        //禁用集成檢測,否則會提示缺少xxx,然而我並不需要那些東西
        UmengUpdateAgent.setUpdateCheckConfig(false);
        //檢查更新
        UmengUpdateAgent.update(this);

        //同步數據
        final FeedbackAgent agent = new FeedbackAgent(this);
//        agent.openFeedbackPush();      啟用推送在小米手機上會有崩潰發生
        agent.sync();
        UserInfo userInfo = agent.getUserInfo();
        String nickname = ConfigUtil.readString("user", "nickname");
        if (TextUtils.isEmpty(nickname)) {
            final String n = generateNickname();
            Map<String, String> contact = new HashMap<>();
            contact.put("昵稱", n);
            userInfo.setContact(contact);
            agent.setUserInfo(userInfo);
            new Thread(new Runnable() {
                @Override
                public void run() {
                    boolean success = agent.updateUserInfo();
                    if (success) {
                        ConfigUtil.writeString("user", "nickname", n);
                    }
                }
            }).start();

        }
        //啟用推送
//        PushAgent.getInstance(this).enable();  啟用推送在小米手機上會有崩潰發生
    }
 
開發者ID:Uphie,項目名稱:ONE-Unofficial,代碼行數:64,代碼來源: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());
		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

示例7: 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

示例8: 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

示例9: 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.setUpdateCheckConfig方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。