Does ExitApp put app into backround or complete remove


#1

If I quit the app with ionic.Platform.exitApp() the app is still in the background. But when I activate the app from background the app starts all over with splashscreen.

What does exitApp() do??? Can anybody help???


#2

Platform.exitApp() is just a wrapper around Cordova’s window.navigator.app.exitApp() method. It doesn’t do anything else.


#3

I see. How do you explain behavior: I do extApp(), app is closed, app is still in background, but activating the app again the app is not resumed but initialised (starting with splashscreen)


#4

If I use exitApp() is the app pushed into background or complete removed?


#5

I did not solved exitApp but implemented a work around in the initialization of my ‘intro’ controller with calling the function:

function startupCheck() { var alertPopup; var alertExit = false; var dayNumber = new Date().getDay(); // // startup logic if (dayNumber === 1) { alertExit = true; } // if (!alertExit) { return; } // alertPopup = $ionicPopup.alert( {title: 'start up failure', template: "I don't like mondays"} ); alertPopup.then(function (res) { if (ionic.Platform.isWebView()) { console.log("webview: attempt to exit.."); ionic.Platform.exitApp(); console.log("Oops, exit app NOT working(ios?), try again!"); startupCheck(); } else { console.log("NOT webview(in browser?); to test loop, uncomment code line below"); //startupCheck(); } }); }