How to get the version of the application in the play store

I want to find out the version of the application in the Android store for my application.

I need to know what to show the user a message suggesting an update, if necessary. I can get the application version for my installed version (using cord version-application-version):

cordova.getAppVersion.getVersionNumber(function (version) {

            console.log("la version de la app es " + version);
            $scope.versi = version;
});

but not the version of the app for the Android store.

+4
source share
2 answers

I found a solution here about a year ago. I can not find the link now, but it is:

      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 details answare link

+3

, Edits.apks: upload, APK; , APK, . .

API , SO.

, Wiki HowToSearchApps. :

{
  "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": [
...

SO:

+1

Source: https://habr.com/ru/post/1657403/


All Articles