FLAGACTIVITYNEWTASK
FLAGACTIVITYNEWTASK, more commonly known as Intent.FLAG_ACTIVITY_NEW_TASK, is an Android Intent flag that directs the system to start the target activity in a new task on the device’s activity back stack. A task is a collection of activities that users interact with as a unit, with the launched activity becoming the root of that new task.
Value and usage context: The flag is defined in android.content.Intent and is typically used when starting an
Behavior and interaction with task management: With NEW_TASK, the launched activity starts in a separate task,
Usage considerations: Using NEW_TASK can improve isolation of workflows or support specific navigation patterns, such as
See also: related intent flags for task and back stack management, including FLAG_ACTIVITY_MULTIPLE_TASK and FLAG_ACTIVITY_CLEAR_TASK.