Did you remote debug the problem on the device already? Follow these instructions here to debug the problem in Chrome dev tools: https://ionic.zone/debug/remote-debug-your-app#android Look at the console and network tabs for errors.
When i run app in browser, i don’t see SplashScreen. Only on device (Also don’t see it in Ionic View) with apk.
I also used enableProdMode() in main.ts.
AppRate plugin i included in project today.
I’m also remarked, that when i build with command npm run build [--prod]
it’s okay, but when i used - ionic cordova build android --prod --release -- -- --keystore=C:\keys\mykeys.keystore --alias=mykey3
i have error with fonts.
I do all by instruction, in result i have connect a local browser to a remote app, but i don’t see the SplashScreen. SplashScreen only showing on app with installed apk.
This two first screens from my previous post - there is browser with connected remote app.
First, you need to post anything in your config.xml file related to splash screen. Are you telling it to auto-hide? Are you telling it to stay open for x number of ms? There’s a large chance that is related to your problem, but you haven’t posted any code from config.xml. If you want to explicitly hide the status bar in your code you should set AutoHideSplashScreen in your config.xml to false.
Secondly, add a debugger call into your platform.ready block so that if you have dev tools open the debugger will hit the breakpoint and wont’ call splashScreen.hide() until you play past it like so:
Make sure you open your dev tools right away and that should cause the app to stop there for you. Then you can see if your splash screen hides automatically or not. Hopefully though, that won’t even matter because the issue is probably in config.xml.
constructor(public platform: Platform, statusBar: StatusBar, public splashScreen: SplashScreen, app: App, public appRate: AppRate, private alertCtrl: AlertController) {
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
statusBar.overlaysWebView(true);
statusBar.backgroundColorByHexString('#0a7384');
splashScreen.hide();
//app.setScrolling();
//app._setDisableScroll(false);
let alert = this.alertCtrl.create({
title: 'splashScreen hide',
subTitle: 'WTF',
buttons: ['ХЗ']
});
alert.present();
});
platform.registerBackButtonAction(() => {
let nav = app.getActiveNav();
let activeView: ViewController = nav.getActive();
if (activeView != null) {
if (typeof activeView.instance.backHome === 'function') {
activeView.instance.backHome();
}
else if (nav.canGoBack()) {
nav.pop();
}
else nav.parent.select(0); // goes to the first tab
}
});
this.appRate.preferences = {
....
};
this.appRate.promptForRating(false);
}
`
@DmitriyLer You are confusing. What does “in browser” mean? ionic serve? Remote debugging the device? What does “is freezes” mean in the message before that?
I changed one setting in config.xml, and checked on a few devices
<preference name="SplashScreen" value="none" />
No SplashScreen - no problem.
In first i thought, that problem in code.
I thought, that some resources not installed, and when app is launched in first time, there are loaded from internet.
But now i think that problem in configuration of SplashScreen, as it was said above.
I’m tried to installed and deleted application a few times, and there was no problems with first launch
Yes, it is really strange.
I think, that some time my app will working without splash screen.
But if you have some thoughts - i will be grateful to you.
Yes, it is really strange.
I think, that some time my app will working without splash screen.
But if you have some thoughts - i will be grateful to you.