There is no splashscreen after I exit app with navigator.app.exitApp()


#1

I create new App with ionic start myApp. When I first use the app, there is a splasscreen like the follwing image

I click the backbutton to exit the app with the coding navigator.app.exitApp(), and then, when I click the app icon to start the app again, there is no splashscreen, like the following image

The platfor is android.

So, what’s the problem? What should I do?


#2

check for the settings of config.xml for splashcreen… https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-splashscreen/


#3

Yeah, I have tried the splashcreen plugin, and the splashcreen can show after I secondly start the app. But I meet the problem on some phone, which is that the splashcreen can’t not hide when I secondly start the app. When I use chrome to check the app, I find the index.html is not loaded.


#4

“SplashShowOnlyFirstTime” preference is also optional and defaults to true. When set to true splash screen will only appear on application launch. However, if you plan to use navigator.app.exitApp() to close application and force splash screen appear on next launch, you should set this property to false (this also applies to closing the App with Back button).

https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-splashscreen/#android-quirks


#5

I found the solution. I made a android native app with Java, and accomplished the exit with double clicking back button. I realized there is System.exit(0) after this.finish(). So I add exit(0) after ionic.Platform.exitApp();. And the problem is been soluted.