Hi all,
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.
<style name="AppTheme.NoActionBarLaunch" parent="AppTheme.NoActionBar">
<item name="android:background">@drawable/screen</item>
</style>
The second one is specified in splash screen settings in capacitor.config.json:
{
"SplashScreen": {
"launchShowDuration": 5000,
"launchAutoHide": true,
"androidSplashResourceName": "screen"
}
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.
Is there a way to fix it, or is this normal?