0

I am launching YouTube with our floating window timer.

when time finishes, I want to come back to the app. Currently I am doing this by startIntent(MainActivity) but it open a fresh app that is an issue, I want to open previous opened fragment.

I used Single Activity Navigation Component Architecture in my App

  • https://stackoverflow.com/questions/12074980/bring-application-to-front-after-user-clicks-on-home-button – ADM Mar 11 '22 at 07:34

1 Answers1

0

add flag in your intent

intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK|Intent.FLAG_ACTIVITY_SINGLE_TOP);
Rohit Kumar
  • 728
  • 9
  • 13