当前位置: 首页>>代码示例>>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;未经允许,请勿转载。