Search code examples
ionic-frameworkspinnerionic4splash-screen

How to disable Splash screen spinner in ionic v4?


I know this is a duplicate question, and I follow this link but it doesn't work for me, Here is my config.xml code:

<preference name="ScrollEnabled" value="false" />
    <preference name="android-minSdkVersion" value="19" />
    <preference name="BackupWebStorage" value="none" />
    <preference name="GOOGLE_MAPS_ANDROID_API_KEY" value="AIzaSyB1aYGNVG30GtCQ56jlgBApneVdVRfAfy4" />
    <preference name="GOOGLE_MAPS_IOS_API_KEY" value="AIzaSyB1aYGNVG30GtCQ56jlgBApneVdVRfAfy4" />
    <preference name="SplashMaintainAspectRatio" value="true" />
    <preference name="AutoHideSplashScreen" value="false" />
    <preference name="SplashScreenDelay" value="30000" />
    <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" />

And the app.component.ts code:

initializeApp() {
    this.checkConnection.checkConnection();
    this.platform.ready().then(() => {
      setTimeout(() => {
        this.splashScreen.hide();
      }, 1000);

      this.statusBar.styleDefault();
     this.fcmService.tokenSave();
     this.fcmService.notification();
      this.StorageService.get("Auth_Token").then((data)=>{ 
        if (SingletonService.Auth_Token == null)
          this.StorageService.getAuth_Token();
        if(data && data != null && data != undefined) {
          SingletonService.Auth_Token = data;
          this.authenticationService.authenticationState.subscribe(state => {
            console.log('state',state);
            if (state != true) {
                this.route.navigate(['main-page']);
             }
          });
        }

    }).catch(err => {
      console.log(err);
      // this.route.navigate(['main-page']);
    });

    });
  }

I search I lot and I asked from my friend but I can't solve my problem, Please help me, Thanks.


Solution

  • You must ensure that Your change set on your project you must delete www folder and delete build folder in android