FLAG_ACTIVITY_MULTIPLE_TASK constant

int const FLAG_ACTIVITY_MULTIPLE_TASK

This flag is used to create a new task and launch an activity into it. This flag is always paired with either {@link #FLAG_ACTIVITY_NEW_DOCUMENT} or {@link #FLAG_ACTIVITY_NEW_TASK}. In both cases these flags alone would search through existing tasks for ones matching this Intent. Only if no such task is found would a new task be created. When paired with FLAG_ACTIVITY_MULTIPLE_TASK both of these behaviors are modified to skip the search for a matching task and unconditionally start a new task.

When used with {@link #FLAG_ACTIVITY_NEW_TASK} do not use this flag unless you are implementing your own top-level application launcher. Used in conjunction with {@link #FLAG_ACTIVITY_NEW_TASK} to disable the behavior of bringing an existing task to the foreground. When set, a new task is always started to host the Activity for the Intent, regardless of whether there is already an existing task running the same thing.

Because the default system does not include graphical task management, you should not use this flag unless you provide some way for a user to return back to the tasks you have launched.

See {@link #FLAG_ACTIVITY_NEW_DOCUMENT} for details of this flag's use for creating new document tasks.

This flag is ignored if one of {@link #FLAG_ACTIVITY_NEW_TASK} or {@link #FLAG_ACTIVITY_NEW_DOCUMENT} is not also set.

See Tasks and Back Stack for more information about tasks.

@see #FLAG_ACTIVITY_NEW_DOCUMENT @see #FLAG_ACTIVITY_NEW_TASK

Implementation

static const int FLAG_ACTIVITY_MULTIPLE_TASK = 0x08000000;