How to hide the white screen after splash screen ionic 4 and capacitor

How I resolved it. its been a while but you can try this out.

First, tweak this or add to your capacitor.config.json

“SplashScreen”: {

  "launchShowDuration": 3000,

  "launchAutoHide": false,

  "androidScaleType": "CENTER_INSIDE",

  "splashFullScreen": false,

  "splashImmersive": false,

  "backgroundColor": "#1C3461",

  "androidSplashResourceName": "splash"

}

then use a setTimeout to hide the splash screen in your app.component.ts

 this.platform.ready().then(async () => {
     setTimeout(()=>{
        SplashScreen.hide({
          fadeOutDuration: 1000
        });
      }, 2000)
})

You may also need to change the launcher background and relevant styles to colour in android studio
android\app\src\main\res\values\ic_launcher_background.xml
android\app\src\main\res\values\styles.xml

Good luck.

7 Likes