0
votes

this is a general question regarding the configuration of the config.xml. I'm a little confused between versions and which documentation is correct/old.

Using phonegap build for a webapp. Simple index.html with a redirect. I've read through the documentation, and tried various configurations of:

<plugin... 
<gap:plugin.. 

and various name types in the plugins of

name="org.apache.cordova..." 
name="cordova.plugin..."

But whenever I install the app, the permissions don't appear in the list. The permissions used to be requested when I was using phonegap build 3.XX. Here's my config.xml

<?xml version="1.0" encoding="UTF-8" ?>
<widget xmlns   = "http://www.w3.org/ns/widgets"
xmlns:gap   = "http://phonegap.com/ns/1.0"
id          = "com.whatever.testing123"
versionCode = "5"
version     = "1.0.4" >



<name>Hey is this thing on?</name>

  <description>
    Checking for permissions
  </description>

  <author href="https://www.testing123.com" email="[email protected]">
    Testing123
  </author>



  <gap:platform name="ios" />
  <gap:platform name="android" />
  <gap:platform name="winphone" />
  <preference name="orientation" value="portrait" />
  <preference name="phonegap-version" value="cli-5.2.0" />
  <preference name="fullscreen" value="true" />
  <preference name="loadUrlTimeoutValue" value="700000" />
  <preference name="LoadingDialog" value="Please wait, the app is loading"/>
  <preference name="AllowInlineMediaPlayback" value="true"/>
  <preference name="SplashScreenDelay" value="7000"/>

  <preference name="KeepRunning" value="true"/>

  <icon src="res/icon/android-icon-36x36.png" gap:platform="android" gap:qualifier="ldpi" />
  <icon src="res/icon/android-icon-48x48.png" gap:platform="android" gap:qualifier="mdpi" />
  <icon src="res/icon/android-icon-72x72.png" gap:platform="android" gap:qualifier="hdpi" />
  <icon src="res/icon/android-icon-96x96.png" gap:platform="android" gap:qualifier="xhdpi" />
  <icon src="res/icon/apple-icon-57x57.png" gap:platform="ios" width="57" height="57" />
  <icon src="res/icon/apple-icon-72x72.png" gap:platform="ios"  width="72" height="72" />
  <icon src="res/icon/apple-icon-76x76.png" gap:platform="ios" width="76" height="76" />
  <icon src="res/icon/apple-icon-114x114.png" gap:platform="ios" width="114" height="114" />
  <icon src="res/icon/apple-icon-144x144.png" gap:platform="ios" width="144" height="144" />
  <icon src="res/icon/apple-icon-120x120.png" gap:platform="ios" width="120" height="120" />
  <icon src="res/icon/apple-icon-152x152.png" gap:platform="ios" width="152" height="152" />
  <icon src="res/icon/android-icon-72x72.png" gap:platform="webos" />
  <icon src="res/icon/android-icon-48x48.png" gap:platform="winphone" />
  <icon src="res/icon/apple-icon-180x180.png" gap:platform="winphone"   gap:role="background" />

  <gap:splash src="res/screen/default.png" />
  <gap:splash src="res/screen/default.png"  gap:platform="android" gap:qualifier="port-ldpi" />
  <gap:splash src="res/screen/mdpi.png" gap:platform="android" gap:qualifier="port-mdpi" />
  <gap:splash src="res/screen/hdpi.png" gap:platform="android" gap:qualifier="port-hdpi" />
  <gap:splash src="res/screen/xhdpi.png" gap:platform="android" gap:qualifier="port-xhdpi" />
  <gap:splash src="res/screen/xxhdpi.png" gap:platform="android" gap:qualifier="port-xxhdpi" />
  <gap:splash src="res/screen/xxxhdpi.png" gap:platform="android" gap:qualifier="port-xxxhdpi" />
  <gap:splash src="res/screen/default.png" gap:platform="ios"     width="320" height="480" />
  <gap:splash src="res/screen/640x960.png" gap:platform="ios"     width="640" height="960" />
  <gap:splash src="res/screen/640x1136.png" gap:platform="ios"     width="640" height="1136" />
  <gap:splash src="res/screen/750x1334.png" gap:platform="ios"     width="750" height="1334" />
  <gap:splash src="res/screen/768x1024.png" gap:platform="ios"     width="768" height="1024" />
  <gap:splash src="res/screen/1242x2208.png"  gap:platform="ios"     width="1242" height="2208" />
  <gap:splash src="res/screen/default.png" gap:platform="winphone" />



  <gap:plugin name="cordova-plugin-camera" spec="0.3.6" source="npm" />
  <gap:plugin name="cordova-plugin-media-capture" spec="1.0.1" source="npm" />
  <gap:plugin name="cordova-plugin-device" source="npm" />
  <gap:plugin name="cordova-plugin-device-orientation" source="npm" />
  <gap:plugin name="cordova-plugin-device-motion" source="npm" />
  <gap:plugin name="cordova-plugin-file" source="npm" />
  <gap:plugin name="cordova-plugin-file" source="npm" />
  <gap:plugin name="cordova-plugin-file-transfer" source="npm" />
  <gap:plugin name="cordova-plugin-media" spec="0.2.16" source="npm" />
  <gap:plugin name="cordova-plugin-inappbrowser"  source="npm" />
  <gap:plugin name="cordova-plugin-globalization"  source="npm"/>
  <gap:plugin name="cordova-plugin-dialogs" source="npm" />
  <gap:plugin name="org.apache.cordova.splashscreen" source="npm" />
  <gap:plugin name="cordova-plugin-vibration" spec="1.2.0" source="npm" />
  <gap:plugin name="com.indigoway.cordova.whitelist.whitelistplugin" spec="1.1.1" source="pgb" />
  <gap:plugin name="com.sharinglabs.cordova.plugin.cache" spec="1.0.0" source="pgb" />
  <gap:plugin name="org.apache.cordova.statusbar" spec="0.1.4" source="pgb" />
  <access origin="*" browserOnly="true" />
  <allow-navigation href="*" />
  <allow-intent href="*" />
</widget>

So, the big question is are my plugins configured correctly for cli-5.2.0, and should the plugin request permissions during the app install?

1
They get asked on first use, no?Subjective Effect
These particular plugin permissions aren't being asked on first use (or fresh install) any more. I get some generic ones, like voice - but not "camera" or "vibration" like I used to in my earlier phonegap versions. Which makes me think I broke something in the config.apoji187

1 Answers

0
votes

Actually, nevermind. I got it sorted out for cli-5.2.0. I ended up using these plugins anyway. Here is the section from the xml

  <gap:plugin name="cordova-plugin-camera" spec="0.3.6" source="npm" />
  <gap:plugin name="cordova-plugin-file" source="npm" version="3.0.0"/>
  <gap:plugin name="cordova-plugin-file-transfer" source="npm" />
  <gap:plugin name="cordova-plugin-inappbrowser"  source="npm" />
  <gap:plugin name="cordova-plugin-dialogs" source="npm" />
  <gap:plugin name="cordova-plugin-splashscreen" source="npm" />
  <gap:plugin name="cordova-plugin-whitelist" source="npm" />
  <gap:plugin name="ionic-plugin-keyboard" source="npm" />
  <gap:plugin name="cordova-plugin-geolocation" source="npm" />