How to detect if came back from child activity?

android, android-activity

Solution

The method you're looking for may be the onResume method you can implements in your mother class ;). You must know that the onResume is also called the first time you launch any activity. Look at the lifecycle of an activity : http://developer.android.com/images/activity_lifecycle.png

Regards,

Problem

How can I detect if an activity came to focus after pressing the back button from a child activity, and how can I execute some code at that time?

Original source