简体   繁体   English

android应用更新和恢复活动

[英]android app update and resuming activity

I am developing one app and in that app I am checking the current version and latest version of using JSOUP and according to latest vesuion showing dialog to update the app. 我正在开发一个应用程序,并且在该应用程序中,我正在检查使用JSOUP的当前版本和最新版本,并根据显示对话框的最新消息更新该应用程序。

But U want to make update compulsary. 但是,U希望强制进行更新。 so I make dialog cancallable=false the main problem is that when user click on update it open playstore with app 所以我使对话框cancallable=false主要问题是,当用户单击更新时,它将使用应用程序打开playstore

I want to when user return from playstore i want to hide the dialog, 我想当用户从Playstore返回时要隐藏对话框,

then how should I do this. 那我该怎么做 If user doesn't updated then display dialog as it is and when update is completed then hide dialog. 如果用户未更新,则按原样显示对话框,更新完成后,隐藏对话框。

App update is nothing but it will reinstall the new apk from play store, so after reinstall app is considered as updated, in this case your app will be restarted automatically by the system. 应用更新不是什么,但是它将从Play商店重新安装新的APK,因此在重新安装应用被视为已更新之后,在这种情况下,系统会自动重新启动您的应用。

In your case app will be restarted after update so you no need to handle onResume. 在您的情况下,应用程序将在更新后重新启动,因此您无需处理onResume。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM