Prepare activity.