Skip to main content

Why white screen stuck after splash screen in ionic 4?

With using blow mention configuration 
 <preference name="AutoHideSplashScreen" value="false" />
 <preference name="SplashScreenDelay" value="10000" />
 <preference name="FadeSplashScreenDuration" value="1000" />
 <preference name="SplashScreen" value="screen" />
 <preference name="ShowSplashScreen" value="true" />
 <preference name="ShowSplashScreenSpinner" value="false" />
 <preference name="SplashShowOnlyFirstTime" value="false" />
 <preference name="FadeSplashScreen" value="true" />


Another Way



Found solution. Problem was in cordova-plugin-android-permissions. On android 6+ (maybe android 5 too, I don’t have it on my devices) user should accept permissions manually. In application permissions request looks like alert view. And this alert automatically stops splashscreen (even if you don’t hide splashscreen automatically and don’t call hide method yet) and broke fade out animation. Also this permissions request broke splashscreen even if permissions already added.
So solution is to request permissions after splashScreen.hide() after timeout delay equal to fade out timeout.
example: config.xml
<preference name="SplashMaintainAspectRatio" value="true" />
<preference name="SplashShowOnlyFirstTime" value="false" />
<preference name="FadeSplashScreenDuration" value="1000" />
<preference name="SplashScreenDelay" value="30000" />
<preference name="ShowSplashScreenSpinner" value="false" />
<preference name="AutoHideSplashScreen" value="false" />
<preference name="FadeSplashScreen" value="true" />
<preference name="ShowSplashScreen" value="true" />
In app.components.ts
  initializeApp() {
    this.platform.ready().then(() => {
      setTimeout(() => {
        this.splashScreen.hide();
      }, 1000);
    }
  }

Comments

Popular posts from this blog

how to Install MySQL Server on Ubuntu cloud serve

Install MySQL Install the MySQL server by using the Ubuntu package manager: sudo apt-get update sudo apt-get install mysql-server The installer installs MySQL and all dependencies. After installation is complete, the  mysql_secure_installation  utility runs. This utility prompts you to define the mysql root password and other security related options, including removing remote access to the root user and setting the root password. Allow remote access If you have iptables enabled and want to connect to the MySQL database from another machine, you must open a port in your server’s firewall (the default port is 3306). You don’t need to do this if the application that uses MySQL is running on the same server. Run the following command to allow remote access to the mysql server: sudo ufw allow mysql Start the MySQL service After the installation is complete, you can start the database service by running the following command. If the service is already started,...

spring boot sql server 2008 connection

first add the dependence in pom.xml file <dependency> <groupId>com.microsoft.sqlserver</groupId> <artifactId>mssql-jdbc</artifactId> <scope>runtime</scope> </dependency> then we can add the below mention configuration in application.property file spring.datasource.driverClassName=com.microsoft.sqlserver.jdbc.SQLServerDriver spring.datasource.url =jdbc:sqlserver://localhost:1433;databaseName=pos spring.datasource.username = sa spring.datasource.password = sa spring.jpa.properties.hibernate.dialect = org.hibernate.dialect.SQLServer2008Dialect then check the MS-SQL syntax for entity creation.