Search code examples
androideventsandroid-activityactivity-finish

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


Solution

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