Java Code Examples for com.umeng.update.UmengUpdateAgent#setDeltaUpdate()
The following examples show how to use
com.umeng.update.UmengUpdateAgent#setDeltaUpdate() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: WelcomeAty.java From Huochexing12306 with Apache License 2.0 | 5 votes |
public void operateUmeng() { UmengUpdateAgent.setUpdateUIStyle(UpdateStatus.STYLE_NOTIFICATION); UmengUpdateAgent.setDeltaUpdate(true); UmengUpdateAgent.setUpdateOnlyWifi(false); UmengUpdateAgent.update(this); //检测开发者反馈回复 FeedbackAgent agent = new FeedbackAgent(this); agent.sync(); }
Example 2
Source File: UmengUpdateAgentProxy.java From android-project-wo2b with Apache License 2.0 | 5 votes |
/** * 自动更新检查 * * @param context */ public static void update(Context context) { UmengUpdateAgent.setDefault(); UmengUpdateAgent.setDeltaUpdate(true); UmengUpdateAgent.update(context); }
Example 3
Source File: MainActivity.java From gank with GNU General Public License v3.0 | 4 votes |
private void setupUmeng() { UmengUpdateAgent.update(this); UmengUpdateAgent.setDeltaUpdate(false); UmengUpdateAgent.setUpdateOnlyWifi(false); }
Example 4
Source File: LoginActivity.java From Studio with Apache License 2.0 | 4 votes |
private void setupUmengUpdate() { UmengUpdateAgent.update(this); UmengUpdateAgent.setDeltaUpdate(false); UmengUpdateAgent.setUpdateOnlyWifi(false); }
Example 5
Source File: MainActivity.java From ONE-Unofficial with Apache License 2.0 | 4 votes |
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(); 启用推送在小米手机上会有崩溃发生 }