1

I'm trying to finish the Activity A since Activity B when it will finish too. The Activity B was launches since Actvity A.

So I've paused the Activity A. How can I do it?

Julio Del Valle
  • 381
  • 1
  • 4
  • 17
  • check this http://stackoverflow.com/questions/7363013/android-app-doesnt-close/7363052#7363052 – jsp Sep 28 '11 at 21:31

1 Answers1

5

You may try using startActivityForResult() on the Activity A to invoke the Activity B.

And then, before calling finish() on the Activity B, you should call setResult() and call finish() on the Activity A in onActivityResult()

Example here

basicsharp
  • 446
  • 3
  • 8
  • I have also seen people setup a broadcast and have all activities listen for it, when the receive the broadcast with their class specified they finish(); – sgarman Sep 28 '11 at 22:14
  • Thank you, you right!, the best to do it is using startACtivityForResult. It's was to easy. – Julio Del Valle Sep 29 '11 at 14:23