C
C
Chvalov2015-10-08 11:59:17
Android
Chvalov, 2015-10-08 11:59:17

Is it possible to remove my program from the list of recently launched when I exit it?

Interested in whether it is possible to completely kill the application on exit, so as not to go into the settings - applications and press the Force Close button to completely complete it.
If this is possible, tell me how.
And even after closing it, is it possible to remove it from the list of recently launched processes?
sposobzakrytprilozhenijabeztask-killera.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander, 2015-10-08
@Chvalov

For a complete exit, you can simply kill the process like this

@Override
public void onBackPressed() {
    android.os.Process.killProcess(android.os.Process.myPid());
}
or so
@Override
public void onBackPressed() {
    System.exit(0);
}

To delist in AndroidManifest.xml, add the key to the main activity
android:excludeFromRecents="true"

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question