Within the lifecycle callback methods, you can declare how your activity behaves when the user leaves and re-enters the activity.