Marcus Toepper
Marcus Toepper

Reputation: 2433

Android: How to notify activity of an other activities finish()

I do have a activity, which I don't have access to (we're working at an AIR ANE). From this activity, the one we're working on is triggered, but we can't use onActivityResult, as we don't have access to the calling activity. How can I work around this? If I close the second activity via finish(), it's to late to send an event. If I sent it before, the underlaying activity is still paused, as I've understood. I thought about using an Handler with a postDelayed, but I think, the timing will make this approach messy. Is there something like didFinish(), that's called once the next activity has already resumed?

Any thoughts appreciated! Thnx, Marcus

Upvotes: 1

Views: 2831

Answers (2)

Udit Roy
Udit Roy

Reputation: 85

You can use toast,alert or even broadcast receiver before calling finish();

Upvotes: 0

znat
znat

Reputation: 13474

The easiest way would be to send a broadcast before calling finish() and to register a BroadcastReceiver where you want to be notified.

Upvotes: 4

Related Questions