AppUpdate
AppUpdate copied to clipboard
升级的提示框被新的Activity拦住了。
我将代码放在welcome 页面中,先弹出了升级提示,但随后就被跳转的页面覆盖了,这个要怎么处理呢?
建议不要放在welcome页面,一般welcome页面都有一个定时器,可以放到登录页面或者首页去检查,要么就是在回调
new CheckUpdateTask.Callback() {
@Override
public void callBack(VersionModel model) {
Log.d(TAG,"new version :" + model.getVersionName());
}
}
中取消跳转的定时器,到了这个回调的话,就说明有新版本。
那如果是非强制升级也不太好控制,我是在welcome页判断是跳首页还是登录页。
获取 Outlook for Androidhttps://aka.ms/ghei36
From: 蔡凯 [email protected] Sent: Friday, September 15, 2017 9:39:13 AM To: fccaikai/AppUpdate Cc: nicefan; Author Subject: Re: [fccaikai/AppUpdate] 升级的提示框被新的Activity拦住了。 (#10)
建议不要放在welcome页面,一般welcome页面都有一个定时器,可以放到登录页面或者首页去检查,要么就是在回调
new CheckUpdateTask.Callback() { @Override public void callBack(VersionModel model) { Log.d(TAG,"new version :" + model.getVersionName()); } }
中取消跳转的定时器,到了这个回调的话,就说明有新版本。
― You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/fccaikai/AppUpdate/issues/10#issuecomment-329653757, or mute the threadhttps://github.com/notifications/unsubscribe-auth/APEH_bTG9dD0EHZT7apBqbIHI6-zbM7Kks5sidVBgaJpZM4PXJ1R.
刚试了没有新版本也执行的回调
sorry,时间过得太久了,好像是不管有没有新版本都会回调,你可以升级到最新版本2.1.5我加了一个状态.
.setCallback(new CheckUpdateTask.Callback() {
@Override
public void callBack(VersionModel model, boolean hasNewVersion) {
L.d(TAG,"has new version:" + hasNewVersion + ";version info :" + model.getVersionName());
}
}
hasNewVersion来区分是否有新版本,true:有新版本,false:无新版本
谢谢,我已经使用getVersionCode和当前VERSION_CODE作比较判断了,倒是希望加个点击取消时的回调
获取 Outlook for Androidhttps://aka.ms/ghei36
From: 蔡凯 [email protected] Sent: Monday, September 25, 2017 2:11:49 PM To: fccaikai/AppUpdate Cc: nicefan; Author Subject: Re: [fccaikai/AppUpdate] 升级的提示框被新的Activity拦住了。 (#10)
sorry,时间过得太久了,好像是不管有没有新版本都会回调,你可以升级到最新版本2.1.5我加了一个状态.
.setCallback(new CheckUpdateTask.Callback() { @Override public void callBack(VersionModel model, boolean hasNewVersion) { L.d(TAG,"has new version:" + hasNewVersion + ";version info :" + model.getVersionName()); } }
hasNewVersion来区分是否有新版本,true:有新版本,false:无新版本
― You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/fccaikai/AppUpdate/issues/10#issuecomment-331786014, or mute the threadhttps://github.com/notifications/unsubscribe-auth/APEH_fAeeOSRAggo6wxLJM7rkD3QClbWks5sl0QlgaJpZM4PXJ1R.