How to pop up 'new update available' dialogue, when user starts my app(android)

蹲街弑〆低调 提交于 2019-12-07 15:41:25
Vinay Wadhwa

Follow this algorithm

  1. launch app
  2. check version from manifest
  3. check version from a server (somewhere on the internet where you can update the version name/code manually when you release a new update)
  4. compare the local and remote versions. If not equal launch a URL to your app.

I don't think there is a google api for that. The best way you can do it is to share a simple one line file with latest app version somewhere on the internet. For example: 1. share a config file with content "1.0" which is a latest version of the app. You can use google docs for that for example. 2. when your app start you read that file and compare the version there with your app version. If the version in the file is larger you show a dialog for the user.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!