How get the app version on the play store

10,841

Solution 1

I found solution here about year ago. I cannot find a link now but there is it:

      String newVersion = Jsoup
                    .connect(
                            "https://play.google.com/store/apps/details?id="
                                    + "Package" + "&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[itemprop=softwareVersion]").first()
                    .ownText();

Require Jsoup library. here is the link of details answare link

Solution 2

You might want to check the Edits.apks: upload method which returns a version code for each APK you upload; you will use this version code to refer to the APK when you assign it to a track. Here's the documentation.

This unofficial API might also help as stated in this SO thread.

Specifically, take a look at the Wiki page HowToSearchApps. The response to the query contains version information:

{
  "app": [
    {
      "rating": "4.642857142857143",
      "title": "Ruboto IRB",
      "ratingsCount": 14,
      "creator": "Jan Berkel",
      "appType": "APPLICATION",
      "id": "9089465703133677000",
      "packageName": "org.jruby.ruboto.irb",
      "version": "0.1",
      "versionCode": 1,
      "creatorId": "\"Jan Berkel\"",
      "ExtendedInfo": {
        "category": "Tools",
        "permissionId": [
...

Here are some related SO posts:

Share:
10,841
Ivan Paredes
Author by

Ivan Paredes

desarrollador en Airtrack s.a. canalla estudiante de ing en sistemas

Updated on June 29, 2022

Comments

  • Ivan Paredes
    Ivan Paredes almost 2 years

    I want to know the app version on the android store for my app.

    I need to know that to show to the user a message offering an update if it's necessary. I can get the app version of my installed version (using a cordova-plugin-app-version) like that:

    cordova.getAppVersion.getVersionNumber(function (version) {
    
                console.log("la version de la app es " + version);
                $scope.versi = version;
    });
    

    but not the android store app version.