Launch Modes — Android

Deepak Kaligotla
2 min readSep 12

--

  1. Single top:
    This launch mode is similar to the standard mode, but if an instance of the activity already exists at the top of the stack, Android will not create a new instance of the activity. Instead, Android will route the intent to the existing instance by calling its onNewIntent() method.
  2. Single task:
    This launch mode creates a new task and places the activity at the root of the task. If an instance of the activity already exists in a task, Android will route the intent to that task. If the activity is not in the task, Android will create a new instance of the activity in a new task.
  3. Standard (Default):
    This launch mode creates a new instance of the activity each time an intent is received, regardless of whether an instance of the activity already exists in the stack.
  4. Single Instance:
    This launch mode is similar to the single task mode, but the activity is the only activity in the task. If any other activity is launched with an intent, a new task will be created for that activity.
  5. Single Instance per task:
    This launch mode is similar to the single instance mode, but allows multiple instances of the activity to be created in different tasks.

Note: These launch modes can also be set programmatically using the setLaunchMode() method in the Activity class.

--

--

Deepak Kaligotla

I love developing mobile applications - Android, iOs, Hybrid models, & Mobile Web Apps. Please look into my resume & projects mentioned on LinkedIn for details.