almost 7 years ago
In phonegap, if we want to know the device information then we have to add a plugin for the same and from that we will have a device object which describe the hardware and software of the device.
The properties include:
device.name device.version device.cordova device.uuid device.model device.version
This is how we can get the values as the device is assigned to the window object so it is in the global scope.
var phoneModel = window.device.model;
This is how to can have the information of all the above things in a variable. Now, adding plugin for device:
$ cordova plugin add org.apache.cordova.device $ cordova plugin ls
From this we can get the required information by just placing the code inside.
document.addEventListener("deviceready", onDeviceReady, false);
Hope this will help you in getting device information.
Starting with Chrome version 45, NPAPI is no longer supported for Google Chrome. For more information, see Chrome and NPAPI (blog.chromium.org).
Firefox and Microsoft Internet Explorer are recommended browsers for websites using java applets.
Chrome Version Support
Are you sure, you want to delete this comment?
Sign up using
0 Comment(s)