Hi,
I'm working in cordova/phonegap and have added the "Device" plugin. I see everything I should see in my config.xml (I don't think I need anything in www/config.xml), but there's no way for me to access device or window.device or anything anywhere in my app (I'm checking after deviceready, for what that's worth)
If anyone has any info that they could help me with it would be greatly appreciated!
Thank you,
--d
I'm working in cordova/phonegap and have added the "Device" plugin. I see everything I should see in my config.xml (I don't think I need anything in www/config.xml), but there's no way for me to access device or window.device or anything anywhere in my app (I'm checking after deviceready, for what that's worth)
If anyone has any info that they could help me with it would be greatly appreciated!
Thank you,
--d
- 4 Posts
- 0 Reply Likes
Posted 7 years ago
- 8261 Posts
- 263 Reply Likes
Hi D
Can you share your Build appid? It can be found at the URL bar (http://build.phonegap.com/apps/#####)
Thanks
Can you share your Build appid? It can be found at the URL bar (http://build.phonegap.com/apps/#####)
Thanks
Alan Neveu, Champion
- 213 Posts
- 11 Reply Likes
Jesse, iOS Developer
- 4 Posts
- 0 Reply Likes
as of 3.0 the window.device is a plugin, presumably this affects phonegap build projects as well.
https://github.com/apache/cordova-plu...
https://github.com/apache/cordova-plu...
Alan Neveu, Champion
- 213 Posts
- 11 Reply Likes
Turns out you have to set up your Config.xml like this:
<feature name="http://api.phonegap.com/1.0/camera"/>
<feature name="http://api.phonegap.com/1.0/file"/>
<feature name="http://api.phonegap.com/1.0/network"/>
<feature name="http://api.phonegap.com/1.0/notificat...>
<feature name="http://api.phonegap.com/1.0/device"/>
<gap:plugin name="org.apache.cordova.device"/>
<gap:plugin name="org.apache.cordova.camera"/>
<gap:plugin name="org.apache.cordova.device-orientation"/>
<gap:plugin name="org.apache.cordova.file"/>
<gap:plugin name="org.apache.cordova.globalization"/>
<gap:plugin name="org.apache.cordova.inappbrowser"/>
<gap:plugin name="org.apache.cordova.network-information"/>
<gap:plugin name="org.apache.cordova.dialogs"/>
<gap:plugin name="org.apache.cordova.splashscreen"/>
So the feature nodes are necessary at the device/install level, and the gap:plugin nodes are necessary for PGBuild to include the necessary plugins when compiling the app. It seems like you want to have parity between these two lists, even though for me it winds up being 5 features with 9 plugins. This is working for me against PhoneGap 3.1. Hope that helps!
<feature name="http://api.phonegap.com/1.0/camera"/>
<feature name="http://api.phonegap.com/1.0/file"/>
<feature name="http://api.phonegap.com/1.0/network"/>
<feature name="http://api.phonegap.com/1.0/notificat...>
<feature name="http://api.phonegap.com/1.0/device"/>
<gap:plugin name="org.apache.cordova.device"/>
<gap:plugin name="org.apache.cordova.camera"/>
<gap:plugin name="org.apache.cordova.device-orientation"/>
<gap:plugin name="org.apache.cordova.file"/>
<gap:plugin name="org.apache.cordova.globalization"/>
<gap:plugin name="org.apache.cordova.inappbrowser"/>
<gap:plugin name="org.apache.cordova.network-information"/>
<gap:plugin name="org.apache.cordova.dialogs"/>
<gap:plugin name="org.apache.cordova.splashscreen"/>
So the feature nodes are necessary at the device/install level, and the gap:plugin nodes are necessary for PGBuild to include the necessary plugins when compiling the app. It seems like you want to have parity between these two lists, even though for me it winds up being 5 features with 9 plugins. This is working for me against PhoneGap 3.1. Hope that helps!
- 8261 Posts
- 263 Reply Likes
Hi Luke
Can you confirm the above solution works (by adding gap:plugins on config.xml)?
Can you confirm the above solution works (by adding gap:plugins on config.xml)?
- 3500 Posts
- 40 Reply Likes
Assuming the problem is resolved, this issue is now closed.
Create a new issue if you have any other problem with PhoneGap Build.
Thanks
Create a new issue if you have any other problem with PhoneGap Build.
Thanks
This conversation is no longer open for comments or replies.
This conversation is no longer open for comments or replies.
Related Categories
-
PhoneGap Framework
- 2926 Conversations
- 61 Followers



