After pressing the home key on the activity screen, can I get the start screen when I re-enter the application?

Asked 2 years ago, Updated 2 years ago, 122 views

I opened the ppt through Polaris application by clicking the button on B activity, which is the first screen of application a. In that state, press the Home key to go to the Home screen.

At this time, I want the following cases to occur.

When setting the int to open the ppt file in case number 1, Setting Intent.FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET succeeded. However, I tried many methods for number 2, but the ppt screen comes out.

What do we do to be cases 1 and 2?

activity task

2022-09-22 21:12

1 Answers

For number 2, Intent.Try the FLAG_ACTIVITY_NO_HISTORY flag.

FLAG_ACTIVITY_NO_HISTORY If set, the new activity is not kept in the history stack.


2022-09-22 21:12

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.