Sampath
Sampath

Reputation: 65870

White page that appears before app home view

I have developed Ionic2 app and published it into Google Play store.All are working fine except one issue.The issue is, it shows a white page that appears before app home view.Can you tell me how to solve this issue?

Please see the Video.

Note: On dev environment where there is no such issue.This issue is Only on the published version.

Hope it is related with the splash screen.Which one should I change?

config.xml

    <preference name="webviewbounce" value="false" />
    <preference name="UIWebViewBounce" value="false" />
    <preference name="DisallowOverscroll" value="true" />
    <preference name="android-minSdkVersion" value="16" />
    <preference name="BackupWebStorage" value="none" />
    <preference name="SplashMaintainAspectRatio" value="true" />
    <preference name="FadeSplashScreenDuration" value="300" />
    <preference name="SplashShowOnlyFirstTime" value="false" />
    <preference name="SplashScreen" value="screen" />
    <preference name="SplashScreenDelay" value="3000" />

Upvotes: 2

Views: 379

Answers (2)

sebaferreras
sebaferreras

Reputation: 44659

First, make sure you're using the --prod --release flags when building the apk (just to make sure you're not using the dev apk).

The issue may be also related to the splash screen being hidden before the platform is ready, so please make sure you have this configs in your config.xml file:

<preference name="AutoHideSplashScreen" value="false" />
<preference name="FadeSplashScreen" value="true" />
<preference name="FadeSplashScreenDuration" value="1000" />

And then in your app.component.ts file hide the splash screen manually like this:

import { Platform, ...} from 'ionic-angular';
import { Splashscreen, ... } from 'ionic-native';

//...

constructor(): {
    this.platform.ready().then(() => {
        Splashscreen.hide();
    });
}

Upvotes: 2

MarcGV
MarcGV

Reputation: 1262

This white page probably is the window background of the app.

You can set your color in styles.xml with windowBackground in your app theme.

This is to resolve the color, but if you want to remove the time between views, please put your code. You should start the new activity and in this activity onCreate(), the first thing use the setContentView() method.

Upvotes: 0

Related Questions