3

I am having difficulty getting the splash screen to show up for both iOS and Android through Phonegap Build. Here is the reference code in my config.xml:

<gap:splash src="res/screen/android/screen-ldpi-portrait.png"  gap:platform="android" gap:qualifier="port-ldpi" />
<gap:splash src="res/screen/android/screen-mdpi-portrait.png"  gap:platform="android" gap:qualifier="port-mdpi" />
<gap:splash src="res/screen/android/screen-hdpi-portrait.png"  gap:platform="android" gap:qualifier="port-hdpi" />
<gap:splash src="res/screen/android/screen-xhdpi-portrait.png" gap:platform="android" gap:qualifier="port-xhdpi" />
<gap:splash src="res/screen/android/screen-ldpi-landscape.png"  gap:platform="android" gap:qualifier="land-ldpi" />
<gap:splash src="res/screen/android/screen-mdpi-landscape.png"  gap:platform="android" gap:qualifier="land-mdpi" />
<gap:splash src="res/screen/android/screen-hdpi-landscape.png"  gap:platform="android" gap:qualifier="land-hdpi" />
<gap:splash src="res/screen/android/screen-xhdpi-landscape.png" gap:platform="android" gap:qualifier="land-xhdpi" />

<gap:splash gap:platform="ios" src="res/screen/ios/screen-ipad-portrait-2x.png" width="1536" height="2048"/>
<gap:splash gap:platform="ios" src="res/screen/ios/screen-ipad-portrait.png" width="768" height="1024"/>
<gap:splash gap:platform="ios" src="res/screen/ios/screen-ipad-landscape-2x.png" width="2048" height="1536"/>
<gap:splash gap:platform="ios" src="res/screen/ios/screen-ipad-landscape.png" width="1024" height="768"/>

I get a black screen for Android and the default Phonegap splash screen for iOS. I have ready nearly all articles and posts on this topic here and on phonegap blog, but nothing is working. Even the default <gap:splash src="splash.png" />doesn't come up.

There seems to be many variations online in the naming convention and folder structure and didn't know which was correct. Could that be my mistake?

Akhil
  • 6,667
  • 4
  • 31
  • 61
Alen Giliana
  • 2,144
  • 3
  • 17
  • 30

2 Answers2

0

Try this

<gap:splash src="splash.png" />
<gap:splash src="res/screen/android/screen-ldpi-portrait.png" gap:platform="android" gap:density="ldpi" />
<gap:splash src="res/screen/android/screen-mdpi-portrait.png" gap:platform="android" gap:density="mdpi" />
<gap:splash src="res/screen/android/screen-hdpi-portrait.png" gap:platform="android" gap:density="hdpi" />
<gap:splash src="res/screen/android/screen-xhdpi-portrait.png" gap:platform="android" gap:density="xhdpi" />
<gap:splash src="res/screen/ios/screen-iphone-portrait.png" gap:platform="ios" width="320" height="480" />
<gap:splash src="res/screen/ios/screen-iphone-portrait-2x.png" gap:platform="ios" width="640" height="960" />
<gap:splash src="res/screen/ios/screen-ipad-portrait.png" gap:platform="ios" width="768" height="1024" />
<gap:splash src="res/screen/ios/screen-ipad-portrait-2x.png" gap:platform="ios" width="1536" height="2048" />
<gap:splash src="res/screen/ios/screen-iphone-portrait-568h-2x.png" gap:platform="ios" width="640" height="1136" />
<gap:splash src="res/screen/ios/screen-ipad-landscape.png" gap:platform="ios" width="1024" height="768" />
<gap:splash src="res/screen/ios/screen-ipad-landscape-2x.png" gap:platform="ios" width="2048" height="1536" />
<gap:splash src="res/screen/ios/screen-iphone-landscape.png" gap:platform="ios" width="480" height="320" />
<gap:splash src="res/screen/ios/screen-iphone-landscape-2x.png" gap:platform="ios" width="960" height="640" />
Nijil Nair
  • 1,608
  • 1
  • 11
  • 14
  • Still nothing comes up but a black screen. Here is the app from Phonegap Build https://build.phonegap.com/apps/210013. – Alen Giliana Oct 14 '14 at 05:00
  • Do you have splash screen folder res in your root folder? EmmanuelChaldeanPrayer-release/res/drawable folders do not have splash screen. I think you missed splash screen in res folder. – Nijil Nair Oct 14 '14 at 12:18
  • The screens are the following directory `/res/screen/ios/.png`. Should I change it to `/res/drawable/screen/ios/.png`? – Alen Giliana Oct 15 '14 at 05:03
  • You should add images in following folder. For android /res/screen/android/.png; E.g;/res/screen/android/screen-hdpi-portrait.png should be there. Other resolution images also. – Nijil Nair Oct 15 '14 at 19:34
  • No it didn't. The res folder is how I originally had it. Even the splash.png in the root directory doesn't come up I delete reference to the others. – Alen Giliana Oct 17 '14 at 14:05
0

Unfortunatly not for Phonegap Build..

But this would apply to anyone that has found themselves here that has this same issue but builds locally..

You might find that phonegap/cordova has a set of its default screens somewhere within your project. Overwrite them with your own.

iOS: platforms/ios/{PROJECT_NAME}/Resources/splash

Android: platforms/android/res/drawable (and any other drawable folders for other resolutions -hdpi, etc)