Possible Duplicate:
Quitting an application - is that frowned upon?
I have written a app,and override the onBackPress() method:
@Override
public void onBackPressed() {
Log.e("Main Activity", "onBackPressed!");
exitAlert.show();//when the user click the ok button it will call the MainActivity.this.finish();
}
But I found that when the finish()
function is called.I can still find this app running in "Setting->Applications->RunningServices".So I have to manually stop it here.
I cannot understand why it still runs when the finish()
called.
How can I destroy my app by click a dialog?
Thanks in advance!