How to close an application in the background when a button is pressed in android

I show a message when I click ("plz verify email."). And when the user clicks on the button, the browser will be open, and I want to redirect my application to the first activity in the background.

I want my application to return to its first state when the user returned to it.

+3
source share
3 answers

When the user clicks the button to close the dialog box, create an Intent from the calling action and start the browser with startActivityForResult().

In the same exercise, complete onActivityResult(). There, create an intention and begin your initial action with startActivity().

Android Activities Intents.

+1

onResume

, . , startMode singleTop

0

Just call the finish line (); when you want to complete an action.

0
source

All Articles