White page before loading

Hello,

I’m using the cordova splash screen native plugin to show a splash screen. I see that after the splash goes off a white page appears on Android 5.1 (and probably other versions too) for quite a long time (~2secs).

I tried to remove the cordova splash plugin but the problem still remains.

I tried to log inside ngOnInit of my app to see when the first console.log fires and it looks like it’s the same time after the splash appears or after the app first opens.

Attached my ionic info informations:

Your system information:

Cordova CLI: 6.3.0
Gulp version:  CLI version 3.9.0
Gulp local:   Local version 3.9.1
Ionic Framework Version: 2.0.0-beta.9
Ionic CLI Version: 2.0.0-beta.33
Ionic App Lib Version: 2.0.0-beta.19
OS: Distributor ID:     Ubuntu Description:     Ubuntu 16.04 LTS 
Node Version: v6.3.0

That’s the html page still loading.

To solve this:

  1. Set in config.xml
    <preference name="AutoHideSplashScreen" value="true"/> to <preference name="AutoHideSplashScreen" value="false"/>

  2. Manually close splashscreen after loading everything in app.ts or app.js

Typescript:
if(navigator && navigator['splashscreen']) navigator['splashscreen'].hide();

Javascript:
if(navigator && navigator.splashscreen) navigator.splashscreen.hide();

Hello, thanks for your suggestion.

It indeed works when using an high delay.

I also used “import {Splashscreen} from ‘native’” and Splashscreen.hide()

I have tired your method, but the splash screen keep loading and won’t dismiss in my Android device, may you have any idea? many thanks !