4

Is there a way I can force the user to go back to the previous Activity? I'd like to kill my current Activity make the user "go back" possible?

Skizit
  • 43,506
  • 91
  • 209
  • 269

3 Answers3

12

Call finish in your Activity : http://d.android.com/reference/android/app/Activity.html#finish()

And to make sure you started your activity correctly to have the state in the Activity Stack, check the documentation there : http://d.android.com/guide/topics/fundamentals/tasks-and-back-stack.html

Matthieu
  • 16,103
  • 10
  • 59
  • 86
6

Call finish()

From the link: Call this when your activity is done and should be closed. The ActivityResult is propagated back to whoever launched you via onActivityResult().

nicholas.hauschild
  • 42,483
  • 9
  • 127
  • 120
5

Call finish() to end the current activity and go back.

Femi
  • 64,273
  • 8
  • 118
  • 148