Answer the question
In order to leave comments, you need to log in
How to prevent the activity from returning to the past and remove it from memory?
Hello everyone, how can I forbid returning to the previous activity and delete it from memory?
As far as I know, disable it:
@Override
public void onBackPressed() {
// do nothing
}
Answer the question
In order to leave comments, you need to log in
how would I think it’s better for you to play around with Intent.flags, that is, in the mainfest, you can specify that the first one is activated, for example, in the backstack of the activity, or in general 1 instance in the task, or add noHistory to the mainfest in the activity, it also helps, but not very correctly, it is best to read about the flags, the most correct will be
a link read about "Using the mainfest file"
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question