Managing the Activity Lifecycle