I want my application to launch another activity/application (in this case, the Browser application), but currently when the user presses the Back button to exit the Browser, they return back to my Activity.
How can I make it so they do not come back to my activity after leaving the Browser, but if they relaunch my application later, the Activity
stack of my application is as it was previously (i.e., cannot finish()
, because that will remove the current Activity
from the stack)?
in Activity.onActivityResult()
of the Activity
that launched the Browser, call moveTaskToBack(true). Note: this requires that the Browser was launched with Activity#startActivityForResult()
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With