pritam kale
pritam kale

Reputation: 75

How to remove white blank page which appears after splash screen in ionic?

I am working on a project which is in ionic framework.When I start the app there is a splash screen of login. When I logged in , for some time there is a white Blank screen appears and then next view is get rendered. I want to remove that white blank screen. any help will be appreciated.

Upvotes: 0

Views: 1580

Answers (3)

Killa
Killa

Reputation: 58

You can also use a setTimeout function to programatically hide the splash screen: Previously you need set:

<preference name="AutoHideSplashScreen" value="false"/>

Then:

initializeApp() {
this.platform.ready().then(() => {
  // Okay, so the platform is ready and our plugins are available.
  // Here you can do any higher level native things you might need.
  this.statusBar.styleDefault();
  setTimeout(() => {
    this.splashScreen.hide();
  }, 3000);
});

}

Upvotes: 0

Insoutt
Insoutt

Reputation: 11

Install splashscreen

cordova plugin add https://github.com/apache/cordova-plugin-splashscreen.git

And set the following preferences in the config.xml

<preference name="SplashScreen" value="screen"/>
<preference name="SplashScreenDelay" value="2000"/>
<preference name="AutoHideSplashScreen" value="false"/>
<preference name="ShowSplashScreenSpinner" value="true"/>
<preference name="SplashShowOnlyFirstTime" value="false"/>
<preference name="FadeSplashScreenDuration" value="1000"/>

Upvotes: 1

user6032296
user6032296

Reputation:

I tried many versions of cordova-plugin-splashscreen, and I found that version 2.0.0 works perfect. Please try it, regards:

cordova plugin add [email protected]

Upvotes: 2

Related Questions