I am writing an app with Ionic 5+angular and am using capacitor to make my builds. The problem I have is that I have two splash screens with white screen flash in between:
The"first" splash screen, if that’s the right way to call it, is specified in styles.xml in android->src->main->res->values.
Now, apparently these two can have different images. I can name the second one differently, like let’s say “splash”, and then the default capacitor splash screen image will be displayed.
That by itself wouldn’t be a problem. I can set the same image in both settings and then the same image will be displayed. The problem is, is that there is a flash of white screen between those two splash screens.
I assume what happens (I may be totally wrong) when I start the app is that the native wrapper launches and the first splash screen gets displayed. Then, when my program gets initialized, it takes a few hundred miliseconds to load the splash screen plugin for the second splash screen, of my app itself. During those few hundred miliseconds nothing is displayed and it causes that white screen - native wrapper has already launched and its splash screen is gone, but the sedond splash screen of my app hasn’t been started yet.
I’m having the exact same problem, it does not really matter wheter you add or not a custom splash screen even with default settings when you run a blank ionic project, it will behave the same with the capacitor splash screen.
This bug is really annoying, it makes your app look horrible .
Hi @mhartington thanks for the fast reply here’s a repo “https://github.com/LandazuriKastillo/two-splash-screens” with the code. it is just a blank project I’m running it on an android device(weird thing on an android emulator inside android studio the splash screen behaves as it should). I have no idea it this also happens on Ios. this is my system’s info.
This makes the first image view that appears when you open the app transparent, so when the user taps your app icon there is a delay there before the second splash screen appears. It is a good workaround but not a fix.
Hello,
Yes actually this solution introduced a delay. When the user taps the app icon the time that would be spent watching at the first splashscreen is spent instead looking at the other app icons on his phone and it can be annoying as it may seem to the user that they haven’t tapped correctly the app icon they have just launched. It takes a few seconds to load the second splashscreen so I decided to keep the flashing but I made the flashing black. Look at my capacitor.config.json file, as you can see there is android backgroundColor set to black. This is the best solutions I’ve found so far.
Anyway thank you for trying to sort it out. I have looked around so much all day but your post here is the best I found for capacitor.
I found a solution to remove the default ionic splash screen.
Only the splash that is configured with capacitor remains
You have to delete this line from your AndroidManifest.xml in your android folder
Is there any solution for this??? I am seeing two splash screen for android 12 devices. One is from android splash screen api and another from the plugin.