This is a migrated thread and some comments may be shown as answers.

AppVersion Plugin not working.

3 Answers 318 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Sairaj
Top achievements
Rank 1
Sairaj asked on 24 Sep 2015, 01:15 PM

Hi,

 In my application I am trying to get current application version. For this I am using telerik verified AppVersion plugin from this link http://plugins.telerik.com/cordova/plugin/appversion . I am using the following code : 

 

 document.addEventListener('deviceready', function () { 

 cordova.getAppVersion.getVersionNumber(function(value) { alert(value) });

}, false);​

 

But when the device ready is getting fired I am having an error "Uncaught TypeError: Cannot read property 'getVersionNumber' of undefined" . 

 

Can Any body please help me with this. It's really urgent.

 

Thanks

Sairaj

3 Answers, 1 is accepted

Sort by
0
Dimitrina
Telerik team
answered on 25 Sep 2015, 03:20 PM
Hello Sairaj,

I am sorry to hear you catch such an error.

I tested installing the AppVersion demo app (through the red Load in AppBuilder button) after modifying it with the additional line of code you shared: 
document.addEventListener('deviceready', function () {
 cordova.getAppVersion.getVersionNumber(function(value) { alert(value) });
...

Running it on an Android 5.0 and iOS 8.3 devices, the alert was displayed fine on starting it. 

Would you please share some more information on:
- Which mobile OS do you have?
- Do you observe the same error modifying the AppVersion demo app to also display an alert when the device is ready?
- Any other specific information you consider as relevant.

Please note that custom plugins don't work in the simulator and the AppBuilder companion app, so you should have installed it.

Looking forward to hearing form you.

Regards,
Dimitrina
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Zaida
Top achievements
Rank 1
answered on 17 Nov 2016, 12:32 PM

Hi, I have the same issue.

Does it not work in browser?

Thanks

0
Tsvetina
Telerik team
answered on 22 Nov 2016, 12:09 PM
Hello Zaida,

The Verified plugins cannot be tested in the AppBuilder simulator, including the AppVersion plugin. To test verified and custom plugins, you need to deploy your app directly on a device. You can see a list of all limitations of the simulator here: Limitations of the Device Simulator.

Regards,
Tsvetina
Telerik by Progress
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
General Discussions
Asked by
Sairaj
Top achievements
Rank 1
Answers by
Dimitrina
Telerik team
Zaida
Top achievements
Rank 1
Tsvetina
Telerik team
Share this question
or