AppVersion Plugin not working.

2 posts, 0 answers
  1. Sairaj
    Sairaj avatar
    10 posts
    Member since:
    Feb 2015

    Posted 24 Sep 2015 Link to this post


     In my application I am trying to get current application version. For this I am using telerik verified AppVersion plugin from this link . 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.




  2. Dimitrina
    Dimitrina avatar
    3769 posts

    Posted 25 Sep 2015 Link to this post

    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.

    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
Back to Top