3
votes

I'm having a couple of issues with the Android splash screen using PhoneGap 3.5.0. When I do a build, I'm seeing some weird results with the splash screen files in platforms/android/res:

  • Some folders copy over the splash.png file as expected (drawable, drawable-land, drawable-hdpi, drawable-ldpi, drawable-mdpi, drawable-xhdpi)
  • Some folders copy over splash.png and also include a default PhoneGap splash screen with the name screen.png (drawable-land-hdpi, drawable-land-ldpi, drawable-land-mdpi, drawable-land-xhdpi)
  • Some folders only include a default PhoneGap splash screen with the name screen.png (drawable-port-hdpi, drawable-port-ldpi, drawable-port-mdpi, drawable-port-xhdpi)

The second issue is that despite splash images being in the folders, when I test the app I see a black screen rather than either my custom splash screens or a default PhoneGap splash screen.

I've found several articles around this issue, but none of the fixes worked for me. Some of the things I've tried included:

A few other notes:

  • The splash screen works fine in the iOS build.
  • I'd like to solve this in the PhoneGap build... I'd like to avoid editing Android-specific files
  • I wonder if it's possible that I need to clear out a cache somewhere. I've had success with the Android splash screen in earlier versions of this project and have since updated my versions of PhoneGap.
  • I have a grunt-phonegap setup going, but I see the same errors if I use phonegap local build rather than grunt platform-build.
  • My splash links look like <gap:splash src="www/res/screen/android/drawable-land-hdpi/splash.png" gap:platform="android" gap:qualifier="land-hdpi" />

If anybody has any suggestions, I'd love to hear them. Thanks!

3
have to got any solution to your problem - Bala Saikrupa Puram

3 Answers

1
votes

If that can help you when I used qualifier instead of density, if I want that the Splash Screen work I have to configure :

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

instead of

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

In the config.xml add the following keys:

<feature name="SplashScreen">
  <param name="android-package" value="org.apache.cordova.splashscreen.SplashScreen" />
</feature>
<preference name="ShowSplashScreen" value="true" />
<preference name="SplashScreen" value="screen"/>
<preference name="SplashScreenDelay" value="3000"/>
<preference name="AutoHideSplashScreen" value="true" />
<preference name="SplashShowOnlyFirstTime" value="false" />
<preference name="FadeSplashScreen" value="false"/>
0
votes

I tried everything, and then I figured to ignore the minimum size and make my splash.png image in my resources folder 5000px by 3000px. Then it worked. So: If all else fails, try making the splash image ENORMOUS.