6 Replies Latest reply on Jul 22, 2016 11:21 AM by Mike Job

    Splashscreen not working on Android only when built by Phonegap Build

    Mike Job

      If I build my app locally, the splashscreen works well. However, if I build it by Phonegap Build, it does not. Actually that happens only if I use orientations in density attribute like:

      <splash src="resources/android/splash/drawable-land-ldpi-screen.png" density="land-ldpi"/>
      

      or

      <splash src="resources/android/splash/drawable-port-ldpi-screen.png" density="port-ldpi"/>
      

       

      Removing the orientation parts "land-" or "port-" makes the splashscreen work again. But why does that happen only when compiled by Phonegap Build? How can I treat different orientations with that problem?

       

      I've already tried to downgrade the splashcreen plugin, change resources folder names, file names, locations, remove some preferences related to splashscreen, but none has worked. I've tried in Android 5.0 and 6.0 devices. Bellow is a part of my config.xml:

       

      <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
      <widget id="aaa" version="1.1.0" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
        <name>aaa</name>
        <description>aaa</description>
        <author email="aaa@aaa.com" href="https://aaa.com/"></author>
      
        <content src="index.html"/>
        <access origin="*"/>
        <allow-navigation href="*"/>
        <allow-intent href="*"/>
      
        <preference name="permissions" value="none"/>
        <preference name="webviewbounce" value="false"/>
        <preference name="UIWebViewBounce" value="false"/>
        <preference name="DisallowOverscroll" value="true"/>
        <preference name="android-minSdkVersion" value="16"/>
        <preference name="BackupWebStorage" value="none"/>
      
        <!-- Splashscreen config -->
        <preference name="SplashScreen" value="screen"/>
        <preference name="SplashScreenDelay" value="4000"/>
        <preference name="FadeSplashScreenDuration" value="1000"/>
        <preference name="SplashMaintainAspectRatio" value="true"/>
        <preference name="SplashShowOnlyFirstTime" value="false"/>
        <!-- End of splashscreen config -->
      
        <preference name="phonegap-version" value="cli-6.1.0"/>
        <plugin name="cordova-plugin-splashscreen" spec="~3.2.2"/>
        <plugin name="cordova-plugin-inappbrowser" spec="~1.4.0"/>
        <plugin name="cordova-plugin-whitelist" spec="~1.2.2"/>
        <plugin name="cordova-plugin-dialogs" spec="~1.2.1"/>
      
        <feature name="StatusBar">
          <param name="ios-package" value="CDVStatusBar" onload="true"/>
        </feature>
        <platform name="android">
          <icon src="resources/android/icon/drawable-ldpi-icon.png" density="ldpi"/>
          <icon src="resources/android/icon/drawable-mdpi-icon.png" density="mdpi"/>
          <icon src="resources/android/icon/drawable-hdpi-icon.png" density="hdpi"/>
          <icon src="resources/android/icon/drawable-xhdpi-icon.png" density="xhdpi"/>
          <icon src="resources/android/icon/drawable-xxhdpi-icon.png" density="xxhdpi"/>
          <icon src="resources/android/icon/drawable-xxxhdpi-icon.png" density="xxxhdpi"/>
          <splash src="resources/android/splash/drawable-land-ldpi-screen.png" density="land-ldpi"/>
          <splash src="resources/android/splash/drawable-land-mdpi-screen.png" density="land-mdpi"/>
          <splash src="resources/android/splash/drawable-land-hdpi-screen.png" density="land-hdpi"/>
          <splash src="resources/android/splash/drawable-land-xhdpi-screen.png" density="land-xhdpi"/>
          <splash src="resources/android/splash/drawable-land-xxhdpi-screen.png" density="land-xxhdpi"/>
          <splash src="resources/android/splash/drawable-land-xxxhdpi-screen.png" density="land-xxxhdpi"/>
          <splash src="resources/android/splash/drawable-port-ldpi-screen.png" density="port-ldpi"/>
          <splash src="resources/android/splash/drawable-port-mdpi-screen.png" density="port-mdpi"/>
          <splash src="resources/android/splash/drawable-port-hdpi-screen.png" density="port-hdpi"/>
          <splash src="resources/android/splash/drawable-port-xhdpi-screen.png" density="port-xhdpi"/>
          <splash src="resources/android/splash/drawable-port-xxhdpi-screen.png" density="port-xxhdpi"/>
          <splash src="resources/android/splash/drawable-port-xxxhdpi-screen.png" density="port-xxxhdpi"/>
        </platform>
      
        <icon src="resources/android/icon/drawable-xhdpi-icon.png"/>
      </widget>