Ending application
I've overwritten onPause, onDestroy and onStop to contain the following:
finalize();
super.on...();
I've over开发者_C百科written finalize to contain the following:
setHighScores();
nView.release();
try {
super.finalize();
} catch (Throwable e) {
e.printStackTrace();
}
But the application keeps on running when closing it (home-button, back-button, red-tele-button).
Yes, I am sure I want to end it. Don't try swaying me into this mobile-multitasking. It's unnecesary for games.
TLDR: How do you forcefully close an android app?
All you have to do is call the activity's Finish
method:
http://developer.android.com/reference/android/app/Activity.html#finish()
精彩评论