Software Archive
Read-only legacy content
17061 Discussions

App Version display

mohneesh_b_
Beginner
425 Views

Hi,

I am developing an app using intel xdk and jquery framework.
I am unable to get app version to display to user who install app.

Can you please guide me how can I get app version in app programetically.


Thanks

0 Kudos
4 Replies
Diego_Calp
Valued Contributor I
425 Views

Hi,

You not explain what are you trying to get the version, son I give you general advices.

If you are going to build an IOS or Android app you need a plugin like this:

https://github.com/whiteoctober/cordova-plugin-app-version

If you make a web application, the option is to hard code the version in a variable and show that, because you can't use plugins.

Hope this helps,

Regards,

Diego

0 Kudos
mohneesh_b_
Beginner
425 Views

Dear Diego, 

Thanks for your help.

I am developing an android app and installed the plugin you suggested cordova-plugin-app-version 0.1.8

I followed the implementation instructions and use below code:

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

But this is not working for me. It does nothing.

Could you please guide me what I am doing wrong?

 Thanks

0 Kudos
PaulF_IntelCorp
Employee
425 Views

Mohneesh -- you can only test third-party plugins using the Debug tab or by building the app and installing on a real device. The Emulate tab will not work with third-party plugins.

0 Kudos
mohneesh_b_
Beginner
425 Views

Thanks Dear Paul.

Your comment is helpful. Now its working fine. 

0 Kudos
Reply