版本更改
This commit is contained in:
parent
9fe02946ef
commit
b515e9eea2
@ -6,6 +6,7 @@ import android.content.Intent;
|
|||||||
import android.content.pm.PackageInfo;
|
import android.content.pm.PackageInfo;
|
||||||
import android.content.pm.PackageManager;
|
import android.content.pm.PackageManager;
|
||||||
import android.net.Uri;
|
import android.net.Uri;
|
||||||
|
import android.os.Handler;
|
||||||
import android.text.TextUtils;
|
import android.text.TextUtils;
|
||||||
|
|
||||||
import com.yunbao.common.CommonAppConfig;
|
import com.yunbao.common.CommonAppConfig;
|
||||||
@ -108,18 +109,23 @@ public class VersionUtil {
|
|||||||
UpdateConfig updateConfig = new UpdateConfig();
|
UpdateConfig updateConfig = new UpdateConfig();
|
||||||
updateConfig.setShowNotification(true);
|
updateConfig.setShowNotification(true);
|
||||||
updateConfig.setAlwaysShowDownLoadDialog(true);
|
updateConfig.setAlwaysShowDownLoadDialog(true);
|
||||||
|
new Handler().postDelayed(new Runnable() {
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
//UI
|
||||||
|
UiConfig uiConfig = new UiConfig();
|
||||||
|
uiConfig.setUiType(UiType.PLENTIFUL);
|
||||||
|
UpdateAppUtils
|
||||||
|
.getInstance()
|
||||||
|
.uiConfig(uiConfig)
|
||||||
|
.apkUrl(downloadUrl)
|
||||||
|
.updateConfig(updateConfig)
|
||||||
|
.updateTitle("新版本更新")
|
||||||
|
.updateContent(configBean.getUpdateDes())
|
||||||
|
.update();
|
||||||
|
}
|
||||||
|
},2000);
|
||||||
|
|
||||||
//UI
|
|
||||||
UiConfig uiConfig = new UiConfig();
|
|
||||||
uiConfig.setUiType(UiType.PLENTIFUL);
|
|
||||||
UpdateAppUtils
|
|
||||||
.getInstance()
|
|
||||||
.uiConfig(uiConfig)
|
|
||||||
.apkUrl(downloadUrl)
|
|
||||||
.updateConfig(updateConfig)
|
|
||||||
.updateTitle("新版本更新")
|
|
||||||
.updateContent(configBean.getUpdateDes())
|
|
||||||
.update();
|
|
||||||
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
ToastUtil.show(R.string.version_download_url_error);
|
ToastUtil.show(R.string.version_download_url_error);
|
||||||
|
Loading…
Reference in New Issue
Block a user