Hi,
I attempted to replace he default splash screen and icons according to the documentation. While the icons have been successfully replaced, I am still stuck with the default splash screen.
How are you doing this? (There is more than one way)
Any clues in the log?
Are you sure your splash screen is a png and the right size?
I think it would be simpler if I link the project github page, includes the lates log, the size should be correct, and it is png: TheApp/config.xml at main · OndraLukas/TheApp · GitHub
Your splashTemplate.png is 2745x2745, not 2732x2732.
From the log:
2023-01-23T16:56:04.128Z cordova-res:platform Building splash resources for android platform
2023-01-23T16:56:04.129Z cordova-res:image Source image for splash: {
format: 'png',
size: 98984,
width: 2745,
height: 2745,
Let’s see what happens if you fix that.
There is also a document about splashscreens and Android 12.
Thanks for the quick responses. Unfortunately, even after this change the situation remains the same, I still get the generic cordova splashscreen.
The git has been updated, and I added the newest log as well.
Managed to fix it, according the link you sent about the android 12 by using these:
<preference name="AndroidWindowSplashScreenAnimatedIcon" value="resources/splashTemplate.png" />
<preference name="AndroidWindowSplashScreenBackground" value="#000000" />
Thanks for following up!
My apps still don’t show a splash screen despite following written advice to the letter, so I suggest a best practice example for how to configure config.xml etc to show a splash screen on any Android phone (and not just Android 12).
@anders.borg - I’d like to have a look at your job to see what is going on. Can you send me the email address you use to submit under? (PM is fine)
Have you added resources/splashTemplate.png into your cache folder?
extraFiles
Not sure about any cache folder, but I have a 2732*2732 image called splash-square.png in res/screen/android and this in config.xml:
<preference name="AndroidWindowSplashScreenAnimatedIcon" value="res/screen/android/splash-square.png" />
@anders - I tried your app on Android 12 and pre-Android 12 devices. The splash screens were fine.
Where is it not working?
On an Xiaomi 11T with Android 12. Shows the application immediately.
At least re-assuring it shows up on some phones.
What happens if you add these two lines to your config.xml:
<preference name="SplashScreenDelay" value="2000" />
<preference name="AutoHideSplashScreen" value="true" />
Interesting, I tested my app on Xiaomi too
Yes, I don’t understand it either. Unfortunately I only had that phone with Android 12, so I assumed it was generic behavior.
The page describing the differences says I could still have the splash tag in config.xml, so I’ve tried with or without.
Also, apps not built for Android 12 show a splash screen.
They don’t make a difference, except prolonging the app start. I’ll test on more phones.
And we’re at Android 13!
Does deleting the app, restarting the device, then installing again make any difference?