Using Ionic 2 beta 11, I have an app with the root page using tabs.
App works fine in browser and iOS but on Android it shows a white screen after the splash screen is hidden. Interestingly, if I tap the Recent Apps button and select the app, or home button the switch back to the app, the root page loads.
I have debugged with chrome://inspect and the main app loads, but the tabs page does not load at all the first time the app is run on Android only.
Extract from config.xml
<preference name="webviewbounce" value="false"/>
<preference name="UIWebViewBounce" value="false"/>
<preference name="DisallowOverscroll" value="true"/>
<preference name="android-minSdkVersion" value="19"/>
<preference name="BackupWebStorage" value="none"/>
<preference name="SplashScreenDelay" value="2000"/>
<preference name="AutoHideSplashScreen" value="false"/>
<preference name="FadeSplashScreenDuration" value="300"/>
<preference name="SplashScreen" value="screen"/>
<preference name="Orientation" value="portrait"/>
<feature name="StatusBar">
<param name="ios-package" onload="true" value="CDVStatusBar"/>
</feature>
<plugin name="cordova-plugin-device" spec="~1.1.2"/>
<plugin name="cordova-plugin-console" spec="~1.0.3"/>
<plugin name="cordova-plugin-whitelist" spec="~1.2.2"/>
<plugin name="cordova-plugin-splashscreen" spec="~3.2.2"/>
<plugin name="cordova-plugin-statusbar" spec="~2.1.3"/>
<plugin name="ionic-plugin-keyboard" spec="~2.2.1"/>
Extract from app.ts
export class MyApp {
private rootPage: any;
constructor(private platform: Platform) {
this.rootPage = TabsPage;
platform.ready().then(() => {
StatusBar.overlaysWebView(false);
StatusBar.styleLightContent();
StatusBar.backgroundColorByHexString('#387ef5');
Splashscreen.hide();
});
}
}