Julio Del Valle
Julio Del Valle

Reputation: 381

How to finish "Activity A" since "Activity B"? (Finish an Activity since other)

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?

Upvotes: 1

Views: 344

Answers (1)

basicsharp
basicsharp

Reputation: 446

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

Upvotes: 5

Related Questions