3

I already found AppAvailability plugin which basically checks if a user installed a certain app on his device.

Is there a possibility to the current version of the app, developer name (important) and everything it possibly can? Is this even possible in general?

kenorb
  • 155,785
  • 88
  • 678
  • 743
user1938653
  • 611
  • 1
  • 9
  • 21

2 Answers2

2

Using AppAvailability plugin it is not possible to get the current version of the app.

You would have to use Cordova AppVersion plugin instead.

After install (e.g. cordova plugin add cordova-plugin-app-version), you can this JS code:

cordova.getAppVersion.getVersionNumber().then(function (version) {
    $('.version').text(version);
});

Here is the list of methods which you can use to retrieve other details about your application:

  • getAppName

    Returns the name of the app. E.g. "My Awesome App"

  • getPackageName

    Returns the package name of the app - the reversed domain name app identifier like com.example.myawesomeapp.

  • getVersionCode

    Returns the build identifier of the app

  • getVersionNumber

    Returns the version number of the app


Related posts:

kenorb
  • 155,785
  • 88
  • 678
  • 743
0

Command Line

Also, the version can be found via the command line

$ cordova info

Scroll down until you see Project Setting Files:

 config.xml:
 <?xml version='1.0' encoding='utf-8'?>
 <widget id="com.your.app" version="1.1.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
SoEzPz
  • 14,958
  • 8
  • 61
  • 64