Phonegap 3.5.0 Android Splash screen not working

  • 2
  • Problem
  • Updated 5 years ago
I try all method for Android Splahscreen i configure my config.xml:

<gap:splash gap:platform="android" gap:qualifier="port-ldpi" src="res/screen/android/screen-ldpi-portrait.png" />
<gap:splash gap:platform="android" gap:qualifier="port-mdpi" src="res/screen/android/screen-mdpi-portrait.png" />
<gap:splash gap:platform="android" gap:qualifier="port-hdpi" src="res/screen/android/screen-hdpi-portrait.png" />
<gap:splash gap:platform="android" gap:qualifier="port-xhdpi" src="res/screen/android/screen-xhdpi-portrait.png" />
<gap:splash gap:platform="android" gap:qualifier="land-ldpi" src="res/screen/android/screen-ldpi-landscape.png" />
<gap:splash gap:platform="android" gap:qualifier="land-mdpi" src="res/screen/android/screen-mdpi-landscape.png" />
<gap:splash gap:platform="android" gap:qualifier="land-hdpi" src="res/screen/android/screen-hdpi-landscape.png" />
<gap:splash gap:platform="android" gap:qualifier="land-xhdpi" src="res/screen/android/screen-xhdpi-landscape.png" />
<gap:splash gap:platform="blackberry" src="res/screen/blackberry/screen-225.png" />
<gap:splash gap:platform="ios" height="480" src="res/screen/ios/screen-iphone-portrait.png" width="320" />
<gap:splash gap:platform="ios" height="960" src="res/screen/ios/screen-iphone-portrait-2x.png" width="640" />
<gap:splash gap:platform="ios" height="1136" src="res/screen/ios/screen-iphone-portrait-568h-2x.png" width="640" />
<gap:splash gap:platform="ios" height="1024" src="res/screen/ios/screen-ipad-portrait.png" width="768" />
<gap:splash gap:platform="ios" height="768" src="res/screen/ios/screen-ipad-landscape.png" width="1024" />
<gap:splash gap:platform="winphone" src="res/screen/windows-phone/screen-portrait.jpg" />

But not work!

After that i make only this configuration:

<preference name="show-splash-screen-spinner" value="false" />
<preference name="auto-hide-splash-screen" value="true" />
<preference name="SplashScreen" value="screen" />
<preference name="SplashScreenDelay" value="10000" />


And i put image in platforms\android\res\

  • drawable-ldpi

  • drawable-hdpi

  • drawable-mdpi

  • drawable-xhdpi



On iOS works perfectly.

Thanks,
J
Photo of Jacopo Cappelli

Jacopo Cappelli

  • 5 Posts
  • 0 Reply Likes

Posted 6 years ago

  • 2
Photo of John Weidner

John Weidner, Champion

  • 435 Posts
  • 80 Reply Likes
Are you using PhoneGap Build or PhoneGap CLI???

If you are using PhoneGap Build, then when you specify

src="res/screen/android/screen-ldpi-portrait.png"

then that file should be in that directory structure relative to your config.xml and index.html. So if index.html and config.xml are in a "www" folder then this particular resource should be in "www/res/screen/android/screen-ldpi-portrait.png"
Photo of Jacopo Cappelli

Jacopo Cappelli

  • 5 Posts
  • 0 Reply Likes
I'm using Phonegap Build, i need to use the first method that i write, right?
But not work, the file exist and on iOS work correctly.

Thanks,
J
Photo of Yi Ming Kuan

Yi Ming Kuan

  • 1840 Posts
  • 78 Reply Likes
Hi Jacopo,

Can you list the app ID of your app on PhoneGap Build? We'll investigate.

-yiming
Photo of Vini Katyal

Vini Katyal

  • 1 Post
  • 0 Reply Likes
I have having the same problem can you help?
Photo of Khurshid

Khurshid

  • 1 Post
  • 0 Reply Likes
Hello Guys,

Adding the default splash screen element <gap:splash src="res/screen/default.png" /> has solved my problem. So, Jacopo, you should try that!

Best,
Khurshid
Photo of Jacopo Cappelli

Jacopo Cappelli

  • 5 Posts
  • 0 Reply Likes
Now work, but i'm battle against another problem.
Now, i have streched image on splashscreen and the logo streched is terrible...

Thanks,
Jacopo
Photo of ismael jimoh

ismael jimoh

  • 4116 Posts
  • 192 Reply Likes
Make sure you have the correct splashscreen for the various screen sizes to avoid having stretched splashscreen.
Photo of Jacopo Cappelli

Jacopo Cappelli

  • 5 Posts
  • 0 Reply Likes
Yes, i am redoing all images. After that update the thread.
Photo of Andre Reitz

Andre Reitz

  • 1 Post
  • 0 Reply Likes
I have the same problem, splash screen wont show
Photo of hutber

hutber

  • 40 Posts
  • 0 Reply Likes
Hey guys... Sadly also having the same problem :(

If only your documentation was up to date ;p
Photo of Petra V.

Petra V., Champion

  • 7794 Posts
  • 1391 Reply Likes
The documentation is up to date, but unfortunately either wrongly interpreted or mixed up with the Cordova documentation by developers.

Anyway, what is it that you are seeing (default PGB splash or something else)? Is it happening in Android, iOS, both or anything else? Are you using Build or local Cordova? And where are your index, your config and your splashes located within the zip file you're uploading?

[Just claiming "the same problem" isn't sufficient...]