Android how to find the lastest app version from the app?
I need to be able to force users of my app to update to the latest version. Is there any easy way to find out what the latest version of the app on the market is from the app? I would like to show a locked screen saying there is an update with a link to the market page for my app. Is 开发者_开发百科this possible? I did see the Android Market API library but this requires a Google sign in and I don't really want to put login info to a Google account in the source code. Any ideas would be great.
Thanks,
Bryan
One simple idea would be a basic webservice. A webservice that just outputs the latest version of your app and every time the user starts the app you let it poll that webservice to check the version.
Haven't checked the link but: http://williamsportwebdeveloper.com/cgi/wp/?p=494 This might be good reading: Implementing REST Service (JSON) on Google AppEngine
Don't need to do a complete webservice, you could also parse a page just containing the version number.
A simple way would be to store the app version on a webpage that you own and when you start the phone app, check that webpage. If it's not at the correct version, then block the user.
Check your app version against your own server, your server can do the API sign in.
精彩评论