Grisza Grisza - 5 months ago 10
Android Question

PhoneGap Build Cannot get the device's properties phonegap/cordova

Hi I am new in phonegap/cordova I want to get device's object props from plugin from phonegap DeviceInformation but I cannot.
Here is my HTML

index.html
https://jsbin.com/nabuhopewo/edit?html,output

alert("Test");
works, but device.some prop doesn't work, ie.
device.name
and so on.
What must be done?
Testing on physical device with platform android

fixed but not 100%
device.name
-> I get
undefined


name of device is Goclever Quantum 350 maybe because this smartphone is not popular?
and if I tested on Google Nexus or Samsung Galaxy then I would got one of these names?

in comments more

Answer

I analyzed this carefully and result is using older version of plugin 0.3.0 <gap:plugin name="org.apache.cordova.device" /> , versions 1.0.0 and 1.0.1 don't work in this case