Detect that an activity has closed in Android

Depending on your application's design you can refresh the list each time the Main activity is returned to by watching the onResume() or onRestart() events. In addition there is startActivityForResult(). All of these methods are in Activity.


Quick snippet showing use of startActivityForResult:

private static final int MY_REQUEST_CODE = 0xe110; // Or whatever number you want
// ensure it's unique compared to other activity request codes you use

@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data)
{
    super.onActivityResult(requestCode, resultCode, data);

    if (requestCode == MY_REQUEST_CODE)
        ActiviyFinishedNowDoSomethingAmazing();
}

public void onClickStartMyActivity(View view)
{
    startActivityForResult(new Intent(this, GameActivity.class), MY_REQUEST_CODE);
}

More reading on getting a result from an activity.