2 Replies Latest reply on Apr 14, 2016 1:32 PM by vimifyd79368427

    Android Splash Screen not showing...?

    vimifyd79368427 Level 1

      I can't seem to get the splash screen to show for Android. When I unpack the .apk I don't see any of the splashscreen images. I have tried using the latest plugin 3.2.1 from npm... I don't know what else to do.

       

      Phonegap Build cli-6.0.0 (Cordova Android 5.1.0)

      Testing on Nexus 5 with Android 5.1

       

      Here is my relevant config:

       

      <preference name="phonegap-version" value="cli-6.0.0" />

       

      <platform name="android">

              <splash src="res/screen/android/splash-land-hdpi_320x200px.png" density="land-hdpi"/>

              <splash src="res/screen/android/splash-land-ldpi_480x320px.png" density="land-ldpi"/>

              <splash src="res/screen/android/splash-land-mdpi_800x480px.png" density="land-mdpi"/>

              <splash src="res/screen/android/splash-land-xhdpi_1280x720px.png" density="land-xhdpi"/>

              <splash src="res/screen/android/splash-land-xxhdpi_1600x960px.png" density="land-xxhdpi"/>

              <splash src="res/screen/android/splash-land-xxxhdpi_1920x1280px.png" density="land-xxxhdpi"/>

              <splash src="res/screen/android/splash-port-hdpi_200x320px.png" density="port-hdpi"/>

              <splash src="res/screen/android/splash-port-ldpi_320x480px.png" density="port-ldpi"/>

              <splash src="res/screen/android/splash-port-mdpi_480x800px.png" density="port-mdpi"/>

              <splash src="res/screen/android/splash-port-xhdpi_720px1280px.png" density="port-xhdpi"/>

              <splash src="res/screen/android/splash-port-xxhdpi_960px1600px.png" density="port-xxhdpi"/>

              <splash src="res/screen/android/splash-port-xxxhdpi_1280px1920px.png" density="port-xxxhdpi"/>

      </platform>

       

      <plugin name="cordova-plugin-splashscreen" spec="2.1.0" source="pgb" />


      <preference name="AutoHideSplashScreen" value="false" />

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

      <preference name="FadeSplashScreenDuration" value="500" />

      <preference name="ShowSplashScreenSpinner" value="false"/>

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

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

      <preference name="SplashScreen" value="screen" />

      <preference name="SplashScreenDelay" value="10000" />

        • 1. Re: Android Splash Screen not showing...?
          jcesarmobile_ Level 1

          Latest version of the splash plugin is 3.2.1, you have to use the NPM version, not the pgb.

           

          Try installing the plugin like this:

          <plugin name="cordova-plugin-splashscreen" />


          • 2. Re: Android Splash Screen not showing...?
            vimifyd79368427 Level 1

            Figured it out!!!!!!!

             

            So I have:

            <preference name="orientation" value="portrait" />

             

            and yes, jcesarmobile_ I am using 3.2.1. Thank you.

            <plugin name="cordova-plugin-splashscreen" source="npm" version="3.2.1" />

             

            When you lock the orientation you need to remove "port-" and "land-" from the density attributes in:

             

            <splash src="res/screen/android/splash-port-xhdpi_720px1280px.png" density="port-xhdpi"/>

             

            When I removed the "port-" across all of my density attributes on my splash screen images it worked fine!

            <splash src="res/screen/android/splash-port-ldpi_200x320px.png" density="ldpi"/>

            <splash src="res/screen/android/splash-port-mdpi_320x480px.png" density="mdpi"/>

            <splash src="res/screen/android/splash-port-hdpi_480x800px.png" density="hdpi"/>

            <splash src="res/screen/android/splash-port-xhdpi_720px1280px.png" density="xhdpi"/>

            <splash src="res/screen/android/splash-port-xxhdpi_960px1600px.png" density="xxhdpi"/>

            <splash src="res/screen/android/splash-port-xxxhdpi_1280px1920px.png" density="xxxhdpi"/>

             

            Big thanks to Petra V. (Petra V.'s Profile) for finding this for me here: Android splash screen not working

            1 person found this helpful