0 Replies Latest reply on Oct 29, 2017 4:28 AM by nivd99893492

    Phonegap 7.1.1 - Splash screen Android

    nivd99893492

      This question has been asked in the past but none of the answers that I have found have solved the problem for me.

       

      I try to add splash screen to my PhoneGap application and it works great in iOS, but not in Android.

       

      <?xml version='1.0' encoding='utf-8'?>
      <widget id="com.test" version="1.0.0" xmlns="http://www.w3.org/ns/widgets" xmlns:gap="http://phonegap.com/ns/1.0">
          <name>APP_NAME</name>
          <description>
              description
          </description>
      
      
          <preference name="orientation" value="portrait" />
          <preference name="StatusBarOverlaysWebView" value="false" />
          <preference name="prerendered-icon" value="true" />
          <content src="index.html" />
          <preference name="DisallowOverscroll" value="true" />
          <preference name="android-minSdkVersion" value="14" />
          <preference name="AutoHideSplashScreen" value="true" />
          <preference name="SplashScreenDelay" value="0" />
          <preference name="FadeSplashScreenDuration" value="0" />
          <preference name="SplashScreen" value="screen"/>
          <plugin name="cordova-plugin-battery-status" source="npm" spec="~1.1.1" />
          <plugin name="cordova-plugin-camera" source="npm" spec="~2.1.1" />
          <plugin name="cordova-plugin-media-capture" source="npm" spec="~1.2.0" />
          <plugin name="cordova-plugin-console" source="npm" spec="~1.0.2" />
          <plugin name="cordova-plugin-contacts" source="npm" spec="~2.0.1" />
          <plugin name="cordova-plugin-device" source="npm" spec="~1.1.1" />
          <plugin name="cordova-plugin-device-motion" source="npm" spec="~1.2.0" />
          <plugin name="cordova-plugin-device-orientation" source="npm" spec="~1.0.2" />
          <plugin name="cordova-plugin-dialogs" source="npm" spec="~1.2.0" />
          <plugin name="cordova-plugin-file" source="npm" spec="~4.1.1" />
          <plugin name="cordova-plugin-geolocation" source="npm" spec="~2.1.0" />
          <plugin name="cordova-plugin-globalization" source="npm" spec="~1.0.3" />
          <plugin name="cordova-plugin-media" source="npm" spec="~2.2.0" />
          <plugin name="cordova-plugin-network-information" source="npm" spec="~1.2.0" />
          <plugin name="cordova-plugin-splashscreen" source="npm" spec="~3.2.1" />
          <plugin name="cordova-plugin-statusbar" source="npm" spec="~2.1.2" />
          <plugin name="cordova-plugin-vibration" source="npm" spec="~2.1.0" />
          <plugin name="cordova-plugin-whitelist" source="npm" spec="~1.2.1" />
          <icon src="icon.png" />
          <splash src="splash.png" />
      
      
          <platform name="android">
              <splash src="splash.png" platform="android" density="ldpi" />
              <splash src="splash.png" platform="android" density="mdpi" />
              <splash src="splash.png" platform="android" density="hdpi" />
              <splash src="splash.png" platform="android" density="xhdpi" />
              <splash src="splash.png" platform="android" density="fr-xhdpi" />
              <splash src="splash.png" platform="android" density="port-xxhdpi" />
              <splash src="splash.png" platform="android" density="land-xxhdpi" />
              <splash src="splash.png" platform="android" density="xxxhdpi" />
          </platform>
          <platform name="ios">
              <icon height="57" platform="ios" src="res/icons/ios/icon.png" width="57" />
              <icon height="114" platform="ios" src="res/icons/ios/icon@2x.png" width="114" />
              <icon height="40" platform="ios" src="res/icons/ios/icon-40.png" width="40" />
              <icon height="80" platform="ios" src="res/icons/ios/icon-40@2x.png" width="80" />
              <icon height="50" platform="ios" src="res/icons/ios/icon-50.png" width="50" />
              <icon height="100" platform="ios" src="res/icons/ios/icon-50@2x.png" width="100" />
              <icon height="60" platform="ios" src="res/icons/ios/icon-60.png" width="60" />
              <icon height="120" platform="ios" src="res/icons/ios/icon-60@2x.png" width="120" />
              <icon height="180" platform="ios" src="res/icons/ios/icon-60@3x.png" width="180" />
              <icon height="72" platform="ios" src="res/icons/ios/icon-72.png" width="72" />
              <icon height="144" platform="ios" src="res/icons/ios/icon-72@2x.png" width="144" />
              <icon height="76" platform="ios" src="res/icons/ios/icon-76.png" width="76" />
              <icon height="152" platform="ios" src="res/icons/ios/icon-76@2x.png" width="152" />
              <icon height="29" platform="ios" src="res/icons/ios/icon-small.png" width="29" />
              <icon height="58" platform="ios" src="res/icons/ios/icon-small@2x.png" width="58" />
              <icon height="87" platform="ios" src="res/icons/ios/icon-small@3x.png" width="87" />
              <splash height="1136" platform="ios" src="res/screens/ios/Default-568h@2x~iphone.png" width="640" />
              <splash height="1334" platform="ios" src="res/screens/ios/Default-667h.png" width="750" />
              <splash height="2208" platform="ios" src="res/screens/ios/Default-736h.png" width="1242" />
              <splash height="1242" platform="ios" src="res/screens/ios/Default-Landscape-736h.png" width="2208" />
              <splash height="1536" platform="ios" src="res/screens/ios/Default-Landscape@2x~ipad.png" width="2048" />
              <splash height="768" platform="ios" src="res/screens/ios/Default-Landscape~ipad.png" width="1024" />
              <splash height="2048" platform="ios" src="res/screens/ios/Default-Portrait@2x~ipad.png" width="1536" />
              <splash height="1024" platform="ios" src="res/screens/ios/Default-Portrait~ipad.png" width="768" />
              <splash height="960" platform="ios" src="res/screens/ios/Default@2x~iphone.png" width="640" />
              <splash height="480" platform="ios" src="res/screens/ios/Default~iphone.png" width="320" />
          </platform>
          <access origin="*" />
          <allow-navigation href="https://*youtube.com/*" />
          <allow-navigation href="https://*googleapis.com/*" />
          <allow-intent href="tel:*" />
          <allow-intent href="sms:*" />
          <allow-intent href="mailto:*" />
          <allow-intent href="geo:*" />
          <platform name="android">
              <allow-intent href="market:*" />
          </platform>
          <platform name="ios">
              <allow-intent href="itms:*" />
              <allow-intent href="itms-apps:*" />
          </platform>
          <plugin name="cordova-plugin-file-transfer" spec="~1.5.1" />
          <plugin name="cordova-plugin-inappbrowser" spec="~1.3.0" />
      </widget>
      

       

      Important to note, I work with this tool to generate the codes and splash images: phonegap.appiq.software

       

      Thank you!