2

So without altering the Java activity code (as many posts here suggest), is it possible to fully exit (kill) an app instead of just putting it on hold in the background?

With Cordova 3 & Android, if we want to "pause" an app we call;

navigator.app.exitApp();

But as said, this is just pausing it.

Tha java solutions proposed to edit the main activity and set;

super.setBooleanProperty("keepRunning", false);

But again, this prevents your app from going to background all the time (not when you want to).

Some even suggested driving your app to crash thus force exit!

Another issue, Android discourages killing apps. The same thing with Apple iOS and their iOS Human Interface Guidelines stating; Never quit an iOS app programmatically. People tend to interpret this as a crash.

So again; How to peacefully kill my app to free space/reset?

Community
  • 1
  • 1
numediaweb
  • 16,362
  • 12
  • 74
  • 110
  • did u ever figure this out? – Mark Mar 20 '15 at 15:34
  • Sorry, was long ago.. i don't really remember :( – numediaweb Mar 20 '15 at 15:35
  • Like you said, Android discourages killing apps. Android's Resource management will keep things in memory as long as they need to, and will remove them when it needs more Ram. There is a saying that "Unused RAM is wasted RAM". By having everything loaded all the time, the expeirence will appear faster when you load it the next time. What reason do you have to fully kill the app, if Cordova will pause all JS runtimes and effectively take up no CPU cycles? – mix3d Jun 05 '15 at 16:43

0 Answers0