且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

提示Android应用程序的用户,如果更新应用程序当前版本<>市场版本

更新时间:2022-12-21 11:25:17

而Android Market是一个封闭的系统,并具有唯一的一个非官方的API,它可以在任何时间点的突破。

The Android Market is a closed system and has only an unofficial api that might break at any point of time.

您***的选择是简单地是你的Web服务器中,你只需要当你张贴在市场更新您的应用程序的当前版本上托管的文件(XML,JSON或简单文本)。

Your best bet is simply to host a file(xml, json or simple text) on a web server of yours in which you just have to update the current version of your app when you post it on the Market.

您的应用程序,然后只需要fetche在启动该文件,检查阉当前已安装的应用程序有一个更低的版本号,并显示一个对话框,警告他落后于用户。

Your app will then only have to fetche that file at startup, checks wether currently installed app has a lower version number and displays a dialog to warn the user he is lagging.