device undefined

4 posts, 0 answers
  1. Erik
    Erik avatar
    24 posts
    Member since:
    Sep 2013

    Posted 14 Apr 2014 Link to this post

    I'm trying to access the "device" object of PhoneGap to get the device name, version etc but I keep getting "Cannot read property 'name' of undefined".
    Seems like "device" is undefined?
    I used the example code from http://docs.phonegap.com/en/1.5.0/phonegap_device_device.md.html

    var phoneName = device.name;

    I can see that in the project the Device plugin is enabled.
  2. Kiril Nikolov
    Admin
    Kiril Nikolov avatar
    2565 posts

    Posted 15 Apr 2014 Link to this post

    Hi Erik,

    The problem that you are having is not directly related to Kendo UI, but to the PhoneGap tool that you are using. As a component framework Kendo UI does not have control over device's hardware and handling the PhoneGap API. I would suggest you to check in their documentation and forums if some more information about this particular issue is available, as we are not able to provide you with any assistance on this.

    In case you have any Kendo UI related questions, please do not hesitate to contact us.

    Regards,
    Kiril Nikolov
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
  3. Kendo UI is VS 2017 Ready
  4. Erik
    Erik avatar
    24 posts
    Member since:
    Sep 2013

    Posted 16 Apr 2014 in reply to Kiril Nikolov Link to this post

    Seems like the problem was that I was trying to access it before the ondeviceready event.
    Now it works.
  5. Kiril Nikolov
    Admin
    Kiril Nikolov avatar
    2565 posts

    Posted 17 Apr 2014 Link to this post

    Hello Erik,

    I am glad you found the solution for this issue.

    In case you have any Kendo UI specific questions, please do not hesitate to contact us

    Regards,
    Kiril Nikolov
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
Back to Top
Kendo UI is VS 2017 Ready