Background-Open to access functionalities with cli-6.5.0 on iOS
robertl46051667 Feb 11, 2017 8:24 AMHello,
My app doesn´t work properly. When I open my app there is a black screen on iOS.
When I put the application on background and then open again, it works fine. But the functionalities of the phone have the same behavior.
When I try to open the camera or the gallery, it seems to do nothing, but when I put the app on background and came again, the camera or the gallery is open.
How can I fix it? I use Phonegap Build.
Thanks for your help!
My config.xml is
<widget xmlns="http://www.w3.org/ns/widgets" xmlns:gap="http://phonegap.com/ns/1.0" id="es.xxxx.www" version="1.0" versionCode = "1" >
<name>XXXXXX</name>
<description>XXXXXXX</description>
<author href="http://www.xxxxxxx.es" email="xxx@xxxxxx.es">XXXX</author>
<content src="www/index.html"/>
<preference name="phonegap-version" value="cli-6.5.0" />
<preference name="permissions" value="none"/>
<preference name="orientation" value="portrait"/>
<preference name="target-device" value="universal"/>
<preference name="fullscreen" value="false"/>
<preference name="android-windowSoftInputMode" value="adjustResize"/>
<preference name="webviewbounce" value="false"/>
<preference name="prerendered-icon" value="true"/>
<preference name="stay-in-webview" value="false"/>
<preference name="StatusBarOverlaysWebView" value="true" />
<preference name="detect-data-types" value="true"/>
<preference name="exit-on-suspend" value="false"/>
<preference name="show-splash-screen-spinner" value="true"/>
<preference name="auto-hide-splash-screen" value="true"/>
<preference name="SplashScreen" value="splash" />
<preference name="SplashScreenDelay" value="6000" />
<preference name="FadeSplashScreenDuration" value="250" />
<preference name="disable-cursor" value="false"/>
<preference name="android-minSdkVersion" value="14"/>
<preference name="android-targetSdkVersion" value="14" />
<preference name="android-installLocation" value="auto"/>
<preference name="android-build-tool" value="gradle" />
<feature name="StatusBar">
<param name="ios-package" value="CDVStatusBar" onload="true" />
</feature>
<plugin name="cordova-plugin-camera" source="npm" version="2.3.1" >
<variable name="CAMERA_USAGE_DESCRIPTION" value="La app necesita acceder a la cámara para tomar fotos y poder incluirlas en las incidencias." />
<variable name="PHOTOLIBRARY_USAGE_DESCRIPTION" value="La aplicación necesitaría acceder a la librería de fotos para poder adjuntar imágenes." />
</plugin>
<gap:plugin name="cordova-plugin-media-capture" source="npm" version="1.2.0" />
<gap:plugin name="cordova-plugin-console" source="npm" version="1.0.1" />
<gap:plugin name="cordova-plugin-device" source="npm" version="1.0.1" />
<gap:plugin name="cordova-plugin-device-motion" source="npm" version="1.1.1" />
<gap:plugin name="cordova-plugin-dialogs" source="npm" version="1.1.1" />
<gap:plugin name="cordova-plugin-file" source="npm" version="4.3.1" />
<gap:plugin name="cordova-plugin-file-transfer" source="npm" version="1.5.0" />
<gap:plugin name="cordova-plugin-geolocation" source="npm" version="1.0.1" />
<gap:plugin name="cordova-plugin-globalization" source="npm" version="1.0.1" />
<gap:plugin name="cordova-plugin-inappbrowser" source="npm" version="1.3.0" />
<gap:plugin name="cordova-plugin-media" source="npm" version="1.0.1" />
<gap:plugin name="cordova-plugin-network-information" source="npm" version="1.0.1" />
<gap:plugin name="cordova-plugin-splashscreen" source="npm" version="3.2.0" />
<gap:plugin name="cordova-plugin-statusbar" source="npm" version="2.2.1" />
<gap:plugin name="cordova-plugin-vibration" source="npm" version="1.2.0" />
<gap:plugin name="cordova-plugin-whitelist" source="npm" version="1.0.0" />
<plugin name="phonegap-plugin-push" source="npm" spec="1.7.2">
<param name="SENDER_ID" value="724087405372"/>
</plugin>
<gap:plugin name="cordova-open" source="npm" version="1.0.10" />
<gap:plugin name="cordova-plugin-x-socialsharing" source="npm" />
<platform name="ios">
<icon src="www/res/icon/ios/Icon-Small.png" width="29" height="29" />
<icon src="www/res/icon/ios/Icon.png" width="57" height="57" />
<icon src="www/res/icon/ios/Icon@2x.png" width="114" height="114" />
<icon src="www/res/icon/ios/Icon-Small@2x.png" width="58" height="58" />
<icon src="www/res/icon/ios/Icon-Small@3x.png" width="87" height="87" />
<icon src="www/res/icon/ios/Icon-Small-40.png" width="40" height="40" />
<icon src="www/res/icon/ios/Icon-Small-40@2x.png" width="80" height="80" />
<icon src="www/res/icon/ios/Icon-Small-40@3x.png" width="120" height="120" />
<icon src="www/res/icon/ios/Icon-Small-50.png" width="50" height="50" />
<icon src="www/res/icon/ios/Icon-Small-50@2x.png" width="100" height="100" />
<icon src="www/res/icon/ios/Icon-60.png" width="60" height="60" />
<icon src="www/res/icon/ios/Icon-60@2x.png" width="120" height="120" />
<icon src="www/res/icon/ios/Icon-60@3x.png" width="180" height="180" />
<icon src="www/res/icon/ios/Icon-72.png" width="72" height="72" />
<icon src="www/res/icon/ios/Icon-72@2x.png" width="144" height="144" />
<icon src="www/res/icon/ios/Icon-76.png" width="76" height="76" />
<icon src="www/res/icon/ios/Icon-76@2x.png" width="152" height="152" />
<!-- iPhone and iPod touch -->
<splash src="www/res/screen/ios/screen-iphone-portrait.png" width="320" height="480" />
<splash src="www/res/screen/ios/screen-iphone-portrait-2x.png" width="640" height="960" />
<!-- iPhone 5 / iPod Touch (5th Generation) -->
<splash src="www/res/screen/ios/screen-iphone-portrait-568h-2x.png" width="640" height="1136" />
<!-- iPhone 6 -->
<splash src="www/res/screen/ios/screen-667h-2x.png" width="750" height="1334" />
<splash src="www/res/screen/ios/screen-iphone-portrait-736h-3x.png" width="1242" height="2208" />
<splash src="www/res/screen/ios/screen-iphone-landscape-736h-3x.png" width="2208" height="1242" />
<!-- iPad -->
<splash src="www/res/screen/ios/screen-ipad-portrait.png" width="768" height="1024" />
<splash src="www/res/screen/ios/screen-ipad-landscape.png" width="1024" height="768" />
<!-- Retina iPad -->
<splash src="www/res/screen/ios/screen-ipad-portrait-2x.png" width="1536" height="2048" />
<splash src="www/res/screen/ios/screen-ipad-landscape-2x.png" width="2048" height="1536" />
</platform>
<platform name="android">
<icon src="icon.png"/>
<splash src="www/res/screen/android/screen-ldpi-portrait.png" gap:qualifier="port-ldpi"/>
<splash src="www/res/screen/android/screen-mdpi-portrait.png" gap:qualifier="port-mdpi"/>
<splash src="www/res/screen/android/screen-hdpi-portrait.png" gap:qualifier="port-hdpi"/>
<splash src="www/res/screen/android/screen-xhdpi-portrait.png" gap:qualifier="port-xhdpi"/>
</platform>
<access origin="http://www.xxxxxxxx.es"/>
<allow-navigation href="*" />
<allow-intent href="http://*" />
<allow-intent href="http://*/*" />
<allow-intent href="https://*/*" />
<allow-intent href="tel:*" />
<allow-intent href="sms:*" />
<allow-intent href="geo:*" />
<allow-intent href="mailto:*" />
<allow-navigation href="data:*" />
<allow-navigation href="file:*" />
</widget>