PhoneGap: Device Plugin Not Working

Viewed 1694

I can't seem to get the device plugin working with my Cordova/PhoneGap project.

I'm using Cordova 3.3.1-0.1.2.

I made sure to follow the docs and installed the plugin like so:

C:\ProjectFolder>plugman --platform android --project platforms/android --plugin org.apache.cordova.device

It installed fine then I went on to include the <feature> tag in my config.xml

 <widget  ...
 <preference name="Fullscreen" value="true" />
 <preference name="Orientation" value="portrait" />
 <feature name="Device">
    <param name="android-package" value="org.apache.cordova.device.Device" />
 </feature>
 </widget>

However still nothing it appears when I attempt to print device.platform or any other property. I get the deviceready event but the device object is undefined.

As typeof device prints undefined.

I've also notice that my <preference> tags seem to be ignored as well as I seem to be able to rotate my app even when it's supposed to be fixed in portrait.

Can anyone help me? :(

1 Answers
Related