How to hide Splash Screen Ionic3 cordova8


#1

Hi,

I am deploying .apk file on android device. Splash screen is being appeared. How to hide it ?
I am using ionic 3.2 with cordova 8.0.0

This is what I have done to hide it but failed.

  1. In config.xml file I have set the preferences as

Screenshot_1

<preference name="ScrollEnabled" value="false" />
<preference name="android-minSdkVersion" value="16" />
<preference name="BackupWebStorage" value="none" />
<preference name="SplashMaintainAspectRatio" value="true" />
<preference name="SplashShowOnlyFirstTime" value="false" />
<preference name="SplashScreen" value="screen" />
<preference name="FadeSplashScreen" value="true" />
<preference name="FadeSplashScreenDuration" value="300" />
<preference name="SplashScreenDelay" value="3000" />
<preference name="AutoHideSplashScreen" value="false" />
<preference name="ShowSplashScreen" value="true" />
  1. In app.components.ts file I have added the following in constructor

platform.ready().then(() => {
//splashScreen.hide();
if (this.splashScreen) {
setTimeout(() => {
this.splashScreen.hide();
}, 500);
}

  statusBar.styleDefault();
});

Please help me. What to do to hide Splash Screen ?


#2

The normal code splashScreen.hide() usually is enough to hide the splash screen when the app is loaded and ready. Why did you modify that?


#3

splashScreen.hide() is also not working


#4

White splash screen is being appeared for almost 10 seconds. How to hide that one ?


#5

That is not a splash screen. That is your app being loaded. Somehow your app seems to load really slowly.

How are you building your app?
What are you doing during app start?


#6

I am not doing anything different. Using angular firebase.

Plz download the the code and see if there is something wrong.


#7

No, I won’t do that.

You can answer my questions or hope someone else will help you.


#8

This is a simple code. I am doing nothing special. Just login with angular firebase 2


#9

It is working fine if I create the .apk file in debug mode.
ionic cordova build --prod

But it does take time while loading if I generate .apk file in release mode and sign the .apk
ionic cordova build --release android


#10

Don’t leave --prod of for building the release app:

ionic cordova build android --prod --release