diff --git a/common/src/main/java/com/yunbao/common/utils/VersionUtil.java b/common/src/main/java/com/yunbao/common/utils/VersionUtil.java index 17908dfab..0b5170839 100644 --- a/common/src/main/java/com/yunbao/common/utils/VersionUtil.java +++ b/common/src/main/java/com/yunbao/common/utils/VersionUtil.java @@ -6,6 +6,7 @@ import android.content.Intent; import android.content.pm.PackageInfo; import android.content.pm.PackageManager; import android.net.Uri; +import android.os.Handler; import android.text.TextUtils; import com.yunbao.common.CommonAppConfig; @@ -108,18 +109,23 @@ public class VersionUtil { UpdateConfig updateConfig = new UpdateConfig(); updateConfig.setShowNotification(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) { ToastUtil.show(R.string.version_download_url_error);