store activity object and pass it to signal the end of the activity