I want to add a "Check for update" button in apps so that when someone clicks it, it will display a toast message / progress dialog for checking the app's version.
If new version is found the apps will auto download it to the phone and let user to manually install the updated apps.
Or any others method will do as long as it can check for latest version and notify the user to update.
Navigate to your play page:
Using a standard HTTP GET. Now the following jQuery finds important info for you:
Current Version
What's new
Now that you can extract these information manually, simply make a method in your app that executes this for you.
Uses HtmlCleaner
To save time writing for check new version update for android app, I written it as library and open source at https://github.com/winsontan520/Android-WVersionManager
There is no API for this, and you can't auto install it, you can just redirect them to it's Market page so they can upgrade. You can have your latest version in a file on a Web server, and have the app check it. Here's one implementation of this:
http://code.google.com/p/openintents/source/browse/#svn%2Ftrunk%2FUpdateCheckerApp
You can use this Android Library: https://github.com/danielemaddaluno/Android-Update-Checker. It aims to provide a reusable instrument to check asynchronously if exists any newer released update of your app on the Store. It is based on the use of Jsoup (http://jsoup.org/) to test if a new update really exists parsing the app page on the Google Play Store:
And as "value" function the following (works if values are beetween 0-99):
If you want only to verify a mismatch beetween versions, you can change:
value(curVersion) < value(newVersion)
withvalue(curVersion) != value(newVersion)
Google updated play store two months before. This is the solution working right now for me..
and don't forget to add JSoup library
and on Oncreate()
that's it.. Thanks to this link
add
compile 'org.jsoup:jsoup:1.10.2'
to dependencies in APP LEVEL build.gradle&
Just add below code and you are good to go.