How can I get the application version information from google play store for prompting the user for force/recommended an update of the application when play store application is updated i.e. in case of the user is using old version application. I have already gone through andorid-market-api which is not the official way and also requires oauth login authentication from google. I have also gone through android query which provides in-app version check, but it is not working in my case. I found the following two alternatives:
Are there any other ways to do it easily?
To download an app's older version, you will have to search for the app in the site's search bar and tap on the “Versions” button to see a listing of all the previous version APKs. Then, you can just download the version of the app you want and install it.
Open the Settings app on your Android device. Open the "Applications" and/or "Application Manager" section. Tap on your app to select it. The App Settings Panel has multiple options including App Version, Notifications, and Location.
The Subscriptions and In-App Purchases API allows you to manage your app's catalog of in-app products and subscriptions. In addition, with the Subscriptions and In-App Purchases API, you can quickly retrieve the details of any purchase using a standard GET request.
I recomned dont use a library just create a new class
1.
public class VersionChecker extends AsyncTask<String, String, String>{ String newVersion; @Override protected String doInBackground(String... params) { try { newVersion = Jsoup.connect("https://play.google.com/store/apps/details?id=" + "package name" + "&hl=en") .timeout(30000) .userAgent("Mozilla/5.0 (Windows; U; WindowsNT 5.1; en-US; rv1.8.1.6) Gecko/20070725 Firefox/2.0.0.6") .referrer("http://www.google.com") .get() .select("div.hAyfc:nth-child(4) > span:nth-child(2) > div:nth-child(1) > span:nth-child(1)") .first() .ownText(); } catch (IOException e) { e.printStackTrace(); } return newVersion; }
In your activity:
VersionChecker versionChecker = new VersionChecker(); String latestVersion = versionChecker.execute().get();
THAT IS ALL
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With