I had an app on the playstore. Know what I want is when new update is available on playstore the user should get a popup to update the app when he try to use the app. And if
I just wrote a class that helps you to know when there is a new version of your app published on Google Play Store.
With the class, you will be able to implement something really simple like this:
new CheckNewAppVersion(yourContext).setOnTaskCompleteListener(new CheckNewAppVersion.ITaskComplete() {
@Override
public void onTaskComplete(CheckNewAppVersion.Result result) {
//Checks if there is a new version available on Google PlayStore.
result.hasNewVersion();
//Get the new published version code of the app.
result.getNewVersionCode();
//Get the app current version code.
result.getOldVersionCode();
//Opens the Google Play Store on your app page to do the update.
result.openUpdateLink();
}
}).execute();
You can download the class here and use in your project. Basically, you use Jsoup lib to get o actual version published by making a request to Google Play Store page.