# TaskStackBuilder

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  
belongs to Maven artifact com.android.support:support-compat:28.0.0-alpha1  
Summary:[Nested Classes](https://developer.android.com/reference/android/support/v4/app/TaskStackBuilder#nestedclasses)\|[Methods](https://developer.android.com/reference/android/support/v4/app/TaskStackBuilder#pubmethods)\|[Inherited Methods](https://developer.android.com/reference/android/support/v4/app/TaskStackBuilder#inhmethods)\|[\[Expand All\]](https://developer.android.com/reference/android/support/v4/app/TaskStackBuilder#)  

# TaskStackBuilder

| This package is part of the Android[support library](https://developer.android.com/topic/libraries/support-library)which is no longer maintained. The support library has been superseded by[AndroidX](https://developer.android.com/jetpack/androidx)which is part of[Jetpack](https://developer.android.com/jetpack). We recommend using the AndroidX libraries in all new projects. You should also consider[migrating](https://developer.android.com/jetpack/androidx/migrate)existing projects to AndroidX. To find the AndroidX class that maps to this deprecated class, see the AndroidX support library[class mappings](https://developer.android.com/jetpack/androidx/migrate/class-mappings).

`
public

final

class
TaskStackBuilder
`  
`

extends Object


``


implements

Iterable<`[Intent](https://developer.android.com/reference/android/content/Intent.html)`>


`

|---|-----------------------------------------|
| java.lang.Object                           ||
| ↳ | android.support.v4.app.TaskStackBuilder |

<br />

*** ** * ** ***

Utility class for constructing synthetic back stacks for cross-task navigation on Android 3.0 and newer.

In API level 11 (Android 3.0/Honeycomb) the recommended conventions for app navigation using the back key changed. The back key's behavior is local to the current task and does not capture navigation across different tasks. Navigating across tasks and easily reaching the previous task is accomplished through the "recents" UI, accessible through the software-provided Recents key on the navigation or system bar. On devices with the older hardware button configuration the recents UI can be accessed with a long press on the Home key.

When crossing from one task stack to another post-Android 3.0, the application should synthesize a back stack/history for the new task so that the user may navigate out of the new task and back to the Launcher by repeated presses of the back key. Back key presses should not navigate across task stacks.

TaskStackBuilder provides a backward-compatible way to obey the correct conventions around cross-task navigation on the device's version of the platform. On devices running Android 3.0 or newer, calls to the[startActivities()](https://developer.android.com/reference/android/support/v4/app/TaskStackBuilder#startActivities())method or sending the[PendingIntent](https://developer.android.com/reference/android/app/PendingIntent.html)generated by[getPendingIntent(int, int)](https://developer.android.com/reference/android/support/v4/app/TaskStackBuilder#getPendingIntent(int, int))will construct the synthetic back stack as prescribed. On devices running older versions of the platform, these same calls will invoke the topmost activity in the supplied stack, ignoring the rest of the synthetic stack and allowing the back key to navigate back to the previous task.  

### About Navigation

For more detailed information about tasks, the back stack, and navigation design guidelines, please read[Tasks and Back Stack](https://developer.android.com/guide/topics/fundamentals/tasks-and-back-stack)from the developer guide and[Navigation](https://developer.android.com/design/patterns/navigation)from the design guide.

<br />

## Summary

|                                                                      ### Nested classes                                                                      ||
|--------------|------------------------------------------------------------------------------------------------------------------------------------------------|
| ` interface` | [TaskStackBuilder.SupportParentable](https://developer.android.com/reference/android/support/v4/app/TaskStackBuilder.SupportParentable) <br /> |

|                                                                                                                                                                                                                                                                ### Public methods                                                                                                                                                                                                                                                                ||
|---------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` `[TaskStackBuilder](https://developer.android.com/reference/android/support/v4/app/TaskStackBuilder)        | ` `[addNextIntent](https://developer.android.com/reference/android/support/v4/app/TaskStackBuilder#addNextIntent(android.content.Intent))`(`[Intent](https://developer.android.com/reference/android/content/Intent.html)` nextIntent) ` Add a new Intent to the task stack.                                                                                                                                                      |
| ` `[TaskStackBuilder](https://developer.android.com/reference/android/support/v4/app/TaskStackBuilder)        | ` `[addNextIntentWithParentStack](https://developer.android.com/reference/android/support/v4/app/TaskStackBuilder#addNextIntentWithParentStack(android.content.Intent))`(`[Intent](https://developer.android.com/reference/android/content/Intent.html)` nextIntent) ` Add a new Intent with the resolved chain of parents for the target activity to the task stack.                                                             |
| ` `[TaskStackBuilder](https://developer.android.com/reference/android/support/v4/app/TaskStackBuilder)        | ` `[addParentStack](https://developer.android.com/reference/android/support/v4/app/TaskStackBuilder#addParentStack(android.content.ComponentName))`(`[ComponentName](https://developer.android.com/reference/android/content/ComponentName.html)` sourceActivityName) ` Add the activity parent chain as specified by manifest \<meta-data\> elements to the task stack builder.                                                  |
| ` `[TaskStackBuilder](https://developer.android.com/reference/android/support/v4/app/TaskStackBuilder)        | ` `[addParentStack](https://developer.android.com/reference/android/support/v4/app/TaskStackBuilder#addParentStack(android.app.Activity))`(`[Activity](https://developer.android.com/reference/android/app/Activity.html)` sourceActivity) ` Add the activity parent chain as specified by manifest \<meta-data\> elements to the task stack builder.                                                                             |
| ` `[TaskStackBuilder](https://developer.android.com/reference/android/support/v4/app/TaskStackBuilder)        | ` `[addParentStack](https://developer.android.com/reference/android/support/v4/app/TaskStackBuilder#addParentStack(java.lang.Class<?>))`(Class<?> sourceActivityClass) ` Add the activity parent chain as specified by manifest \<meta-data\> elements to the task stack builder.                                                                                                                                                 |
| ` static `[TaskStackBuilder](https://developer.android.com/reference/android/support/v4/app/TaskStackBuilder) | ` `[create](https://developer.android.com/reference/android/support/v4/app/TaskStackBuilder#create(android.content.Context))`(`[Context](https://developer.android.com/reference/android/content/Context.html)` context) ` Return a new TaskStackBuilder for launching a fresh task stack consisting of a series of activities.                                                                                                   |
| ` `[Intent](https://developer.android.com/reference/android/content/Intent.html)                              | ` `[editIntentAt](https://developer.android.com/reference/android/support/v4/app/TaskStackBuilder#editIntentAt(int))`(int index) ` Return the intent at the specified index for modification.                                                                                                                                                                                                                                     |
| ` static `[TaskStackBuilder](https://developer.android.com/reference/android/support/v4/app/TaskStackBuilder) | ` `[from](https://developer.android.com/reference/android/support/v4/app/TaskStackBuilder#from(android.content.Context))`(`[Context](https://developer.android.com/reference/android/content/Context.html)` context) ` *This method was deprecated in API level 22.1.0. use[create(Context)](https://developer.android.com/reference/android/support/v4/app/TaskStackBuilder#create(android.content.Context))instead*             |
| ` `[Intent](https://developer.android.com/reference/android/content/Intent.html)                              | ` `[getIntent](https://developer.android.com/reference/android/support/v4/app/TaskStackBuilder#getIntent(int))`(int index) ` *This method was deprecated in API level 22.1.0. Renamed to editIntentAt to better reflect intended usage*                                                                                                                                                                                           |
| ` int`                                                                                                        | ` `[getIntentCount](https://developer.android.com/reference/android/support/v4/app/TaskStackBuilder#getIntentCount())`() `                                                                                                                                                                                                                                                                                                        |
| ` `[Intent[]](https://developer.android.com/reference/android/content/Intent.html)                            | ` `[getIntents](https://developer.android.com/reference/android/support/v4/app/TaskStackBuilder#getIntents())`() ` Return an array containing the intents added to this builder.                                                                                                                                                                                                                                                  |
| ` `[PendingIntent](https://developer.android.com/reference/android/app/PendingIntent.html)                    | ` `[getPendingIntent](https://developer.android.com/reference/android/support/v4/app/TaskStackBuilder#getPendingIntent(int, int))`(int requestCode, int flags) ` Obtain a[PendingIntent](https://developer.android.com/reference/android/app/PendingIntent.html)for launching the task constructed by this builder so far.                                                                                                        |
| ` `[PendingIntent](https://developer.android.com/reference/android/app/PendingIntent.html)                    | ` `[getPendingIntent](https://developer.android.com/reference/android/support/v4/app/TaskStackBuilder#getPendingIntent(int, int, android.os.Bundle))`(int requestCode, int flags, `[Bundle](https://developer.android.com/reference/android/os/Bundle.html)` options) ` Obtain a[PendingIntent](https://developer.android.com/reference/android/app/PendingIntent.html)for launching the task constructed by this builder so far. |
| ` Iterator<`[Intent](https://developer.android.com/reference/android/content/Intent.html)`>`                  | ` `[iterator](https://developer.android.com/reference/android/support/v4/app/TaskStackBuilder#iterator())`() ` *This method was deprecated in API level 22.1.0. Use editIntentAt instead*                                                                                                                                                                                                                                         |
| ` void`                                                                                                       | ` `[startActivities](https://developer.android.com/reference/android/support/v4/app/TaskStackBuilder#startActivities())`() ` Start the task stack constructed by this builder.                                                                                                                                                                                                                                                    |
| ` void`                                                                                                       | ` `[startActivities](https://developer.android.com/reference/android/support/v4/app/TaskStackBuilder#startActivities(android.os.Bundle))`(`[Bundle](https://developer.android.com/reference/android/os/Bundle.html)` options) ` Start the task stack constructed by this builder.                                                                                                                                                 |

| ### Inherited methods |
|-----------------------|---|
| [![](https://developer.android.com/static/assets/images/styles/disclosure_down.png)](https://developer.android.com/reference/android/support/v4/app/TaskStackBuilder#)From class` java.lang.Object ` |-------------------|-------------------------------| | ` Object`         | ` clone() `                   | | ` boolean`        | ` equals(Object arg0) `       | | ` void`           | ` finalize() `                | | ` final Class<?>` | ` getClass() `                | | ` int`            | ` hashCode() `                | | ` final void`     | ` notify() `                  | | ` final void`     | ` notifyAll() `               | | ` String`         | ` toString() `                | | ` final void`     | ` wait(long arg0, int arg1) ` | | ` final void`     | ` wait(long arg0) `           | | ` final void`     | ` wait() `                    | ||
| [![](https://developer.android.com/static/assets/images/styles/disclosure_down.png)](https://developer.android.com/reference/android/support/v4/app/TaskStackBuilder#)From interface` java.lang.Iterable ` |---------------------------------------------------------------------------------------------------------|---------------------------------------| | ` default void`                                                                                         | ` forEach(Consumer<? super T> arg0) ` | | ` abstract Iterator<`[Intent](https://developer.android.com/reference/android/content/Intent.html)`>`   | ` iterator() `                        | | ` default Spliterator<`[Intent](https://developer.android.com/reference/android/content/Intent.html)`>` | ` spliterator() `                     | ||

## Public methods

### addNextIntent

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
TaskStackBuilder addNextIntent (Intent nextIntent)
```

Add a new Intent to the task stack. The most recently added Intent will invoke the Activity at the top of the final task stack.

<br />

|                                        Parameters                                         ||
|--------------|-----------------------------------------------------------------------------|
| `nextIntent` | `Intent`: Intent for the next Activity in the synthesized task stack <br /> |

|                                                                        Returns                                                                        ||
|-----------------------------------------------------------------------------------------------------|--------------------------------------------------|
| [TaskStackBuilder](https://developer.android.com/reference/android/support/v4/app/TaskStackBuilder) | This TaskStackBuilder for method chaining <br /> |

### addNextIntentWithParentStack

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
TaskStackBuilder addNextIntentWithParentStack (Intent nextIntent)
```

Add a new Intent with the resolved chain of parents for the target activity to the task stack.

This is equivalent to calling[addParentStack](https://developer.android.com/reference/android/support/v4/app/TaskStackBuilder#addParentStack(android.content.ComponentName))with the resolved ComponentName of nextIntent (if it can be resolved), followed by[addNextIntent](https://developer.android.com/reference/android/support/v4/app/TaskStackBuilder#addNextIntent(android.content.Intent))with nextIntent.

<br />

<br />

|                                                                           Parameters                                                                           ||
|--------------|--------------------------------------------------------------------------------------------------------------------------------------------------|
| `nextIntent` | `Intent`: Intent for the topmost Activity in the synthesized task stack. Its chain of parents as specified in the manifest will be added. <br /> |

|                                                                        Returns                                                                         ||
|-----------------------------------------------------------------------------------------------------|---------------------------------------------------|
| [TaskStackBuilder](https://developer.android.com/reference/android/support/v4/app/TaskStackBuilder) | This TaskStackBuilder for method chaining. <br /> |

### addParentStack

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
TaskStackBuilder addParentStack (ComponentName sourceActivityName)
```

Add the activity parent chain as specified by manifest \<meta-data\> elements to the task stack builder.

<br />

|                                                          Parameters                                                          ||
|----------------------|--------------------------------------------------------------------------------------------------------|
| `sourceActivityName` | `ComponentName`: Must specify an Activity component. All parents of this activity will be added <br /> |

|                                                                        Returns                                                                        ||
|-----------------------------------------------------------------------------------------------------|--------------------------------------------------|
| [TaskStackBuilder](https://developer.android.com/reference/android/support/v4/app/TaskStackBuilder) | This TaskStackBuilder for method chaining <br /> |

### addParentStack

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
TaskStackBuilder addParentStack (Activity sourceActivity)
```

Add the activity parent chain as specified by manifest \<meta-data\> elements to the task stack builder.

<br />

|                                   Parameters                                    ||
|------------------|---------------------------------------------------------------|
| `sourceActivity` | `Activity`: All parents of this activity will be added <br /> |

|                                                                        Returns                                                                        ||
|-----------------------------------------------------------------------------------------------------|--------------------------------------------------|
| [TaskStackBuilder](https://developer.android.com/reference/android/support/v4/app/TaskStackBuilder) | This TaskStackBuilder for method chaining <br /> |

### addParentStack

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
TaskStackBuilder addParentStack (Class<?> sourceActivityClass)
```

Add the activity parent chain as specified by manifest \<meta-data\> elements to the task stack builder.

<br />

|                                    Parameters                                     ||
|-----------------------|------------------------------------------------------------|
| `sourceActivityClass` | `Class`: All parents of this activity will be added <br /> |

|                                                                        Returns                                                                        ||
|-----------------------------------------------------------------------------------------------------|--------------------------------------------------|
| [TaskStackBuilder](https://developer.android.com/reference/android/support/v4/app/TaskStackBuilder) | This TaskStackBuilder for method chaining <br /> |

### create

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
TaskStackBuilder create (Context context)
```

Return a new TaskStackBuilder for launching a fresh task stack consisting of a series of activities.

<br />

|                                                Parameters                                                ||
|-----------|-----------------------------------------------------------------------------------------------|
| `context` | `Context`: The context that will launch the new task stack or generate a PendingIntent <br /> |

|                                                              Returns                                                               ||
|-----------------------------------------------------------------------------------------------------|-------------------------------|
| [TaskStackBuilder](https://developer.android.com/reference/android/support/v4/app/TaskStackBuilder) | A new TaskStackBuilder <br /> |

### editIntentAt

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
Intent editIntentAt (int index)
```

Return the intent at the specified index for modification. Useful if you need to modify the flags or extras of an intent that was previously added, for example with[addParentStack(Activity)](https://developer.android.com/reference/android/support/v4/app/TaskStackBuilder#addParentStack(android.app.Activity)).

<br />

|                      Parameters                      ||
|---------|---------------------------------------------|
| `index` | `int`: Index from 0-getIntentCount() <br /> |

|                                                      Returns                                                       ||
|-------------------------------------------------------------------------------|-------------------------------------|
| [Intent](https://developer.android.com/reference/android/content/Intent.html) | the intent at position index <br /> |

### from

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
TaskStackBuilder from (Context context)
```

<br />

**This method was deprecated in API level 22.1.0.**   
use[create(Context)](https://developer.android.com/reference/android/support/v4/app/TaskStackBuilder#create(android.content.Context))instead

Return a new TaskStackBuilder for launching a fresh task stack consisting of a series of activities.

<br />

|                                                Parameters                                                ||
|-----------|-----------------------------------------------------------------------------------------------|
| `context` | `Context`: The context that will launch the new task stack or generate a PendingIntent <br /> |

|                                                              Returns                                                               ||
|-----------------------------------------------------------------------------------------------------|-------------------------------|
| [TaskStackBuilder](https://developer.android.com/reference/android/support/v4/app/TaskStackBuilder) | A new TaskStackBuilder <br /> |

### getIntent

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
Intent getIntent (int index)
```

<br />

**This method was deprecated in API level 22.1.0.**   
Renamed to editIntentAt to better reflect intended usage

Get the intent at the specified index. Useful if you need to modify the flags or extras of an intent that was previously added, for example with[addParentStack(Activity)](https://developer.android.com/reference/android/support/v4/app/TaskStackBuilder#addParentStack(android.app.Activity)).

<br />

|                      Parameters                      ||
|---------|---------------------------------------------|
| `index` | `int`: Index from 0-getIntentCount() <br /> |

|                                                      Returns                                                       ||
|-------------------------------------------------------------------------------|-------------------------------------|
| [Intent](https://developer.android.com/reference/android/content/Intent.html) | the intent at position index <br /> |

### getIntentCount

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
int getIntentCount ()
```

<br />

<br />

|                      Returns                      ||
|-------|--------------------------------------------|
| `int` | the number of intents added so far. <br /> |

### getIntents

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
Intent[] getIntents ()
```

Return an array containing the intents added to this builder. The intent at the root of the task stack will appear as the first item in the array and the intent at the top of the stack will appear as the last item.

<br />

|                                                                    Returns                                                                     ||
|---------------------------------------------------------------------------------|---------------------------------------------------------------|
| [Intent[]](https://developer.android.com/reference/android/content/Intent.html) | An array containing the intents added to this builder. <br /> |

### getPendingIntent

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
PendingIntent getPendingIntent (int requestCode, 
                int flags)
```

Obtain a[PendingIntent](https://developer.android.com/reference/android/app/PendingIntent.html)for launching the task constructed by this builder so far.

<br />

|                                                                                                                                                                                                                                                                                                                                                                       Parameters                                                                                                                                                                                                                                                                                                                                                                        ||
|---------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `requestCode` | `int`: Private request code for the sender <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| `flags`       | `int`: May be[FLAG_ONE_SHOT](https://developer.android.com/reference/android/app/PendingIntent.html#FLAG_ONE_SHOT),[FLAG_NO_CREATE](https://developer.android.com/reference/android/app/PendingIntent.html#FLAG_NO_CREATE),[FLAG_CANCEL_CURRENT](https://developer.android.com/reference/android/app/PendingIntent.html#FLAG_CANCEL_CURRENT),[FLAG_UPDATE_CURRENT](https://developer.android.com/reference/android/app/PendingIntent.html#FLAG_UPDATE_CURRENT), or any of the flags supported by[fillIn(Intent, int)](https://developer.android.com/reference/android/content/Intent.html#fillIn(android.content.Intent, int))to control which unspecified parts of the intent that can be supplied when the actual send happens. <br /> |

|                                                                                                                                   Returns                                                                                                                                    ||
|-----------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [PendingIntent](https://developer.android.com/reference/android/app/PendingIntent.html) | The obtained PendingIntent. May return null only if[FLAG_NO_CREATE](https://developer.android.com/reference/android/app/PendingIntent.html#FLAG_NO_CREATE)has been supplied. <br /> |

### getPendingIntent

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
PendingIntent getPendingIntent (int requestCode, 
                int flags, 
                Bundle options)
```

Obtain a[PendingIntent](https://developer.android.com/reference/android/app/PendingIntent.html)for launching the task constructed by this builder so far.

<br />

|                                                                                                                                                                                                                                                                                                                                                                       Parameters                                                                                                                                                                                                                                                                                                                                                                        ||
|---------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `requestCode` | `int`: Private request code for the sender <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| `flags`       | `int`: May be[FLAG_ONE_SHOT](https://developer.android.com/reference/android/app/PendingIntent.html#FLAG_ONE_SHOT),[FLAG_NO_CREATE](https://developer.android.com/reference/android/app/PendingIntent.html#FLAG_NO_CREATE),[FLAG_CANCEL_CURRENT](https://developer.android.com/reference/android/app/PendingIntent.html#FLAG_CANCEL_CURRENT),[FLAG_UPDATE_CURRENT](https://developer.android.com/reference/android/app/PendingIntent.html#FLAG_UPDATE_CURRENT), or any of the flags supported by[fillIn(Intent, int)](https://developer.android.com/reference/android/content/Intent.html#fillIn(android.content.Intent, int))to control which unspecified parts of the intent that can be supplied when the actual send happens. <br /> |
| `options`     | `Bundle`: Additional options for how the Activity should be started. See[startActivity(Intent, Bundle)](https://developer.android.com/reference/android/content/Context.html#startActivity(android.content.Intent, android.os.Bundle)) <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |

|                                                                                                                                   Returns                                                                                                                                    ||
|-----------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [PendingIntent](https://developer.android.com/reference/android/app/PendingIntent.html) | The obtained PendingIntent. May return null only if[FLAG_NO_CREATE](https://developer.android.com/reference/android/app/PendingIntent.html#FLAG_NO_CREATE)has been supplied. <br /> |

### iterator

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
Iterator<Intent> iterator ()
```

<br />

**This method was deprecated in API level 22.1.0.**   
Use editIntentAt instead

<br />

<br />

|                                               Returns                                               ||
|---------------------------------------------------------------------------------------------|--------|
| `Iterator<`[Intent](https://developer.android.com/reference/android/content/Intent.html)`>` | <br /> |

### startActivities

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
void startActivities ()
```

Start the task stack constructed by this builder. The Context used to obtain this builder must be an Activity.

On devices that do not support API level 11 or higher the topmost activity will be started as a new task. On devices that do support API level 11 or higher the new task stack will be created in its entirety.

<br />

<br />

### startActivities

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
void startActivities (Bundle options)
```

Start the task stack constructed by this builder. The Context used to obtain this builder must be an Activity.

On devices that do not support API level 11 or higher the topmost activity will be started as a new task. On devices that do support API level 11 or higher the new task stack will be created in its entirety.

<br />

<br />

|                                                                                                                        Parameters                                                                                                                        ||
|-----------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `options` | `Bundle`: Additional options for how the Activity should be started. See[startActivity(Intent, Bundle)](https://developer.android.com/reference/android/content/Context.html#startActivity(android.content.Intent, android.os.Bundle)) <br /> |

-

  ## Annotations

  - [NotificationCompat.Action.SemanticAction](https://developer.android.com/reference/android/support/v4/app/NotificationCompat.Action.SemanticAction)
-

  ## Interfaces

  - [ActionBarDrawerToggle.Delegate](https://developer.android.com/reference/android/support/v4/app/ActionBarDrawerToggle.Delegate)
  - [ActionBarDrawerToggle.DelegateProvider](https://developer.android.com/reference/android/support/v4/app/ActionBarDrawerToggle.DelegateProvider)
  - [ActivityCompat.OnRequestPermissionsResultCallback](https://developer.android.com/reference/android/support/v4/app/ActivityCompat.OnRequestPermissionsResultCallback)
  - [ActivityCompat.PermissionCompatDelegate](https://developer.android.com/reference/android/support/v4/app/ActivityCompat.PermissionCompatDelegate)
  - [FragmentManager.BackStackEntry](https://developer.android.com/reference/android/support/v4/app/FragmentManager.BackStackEntry)
  - [FragmentManager.OnBackStackChangedListener](https://developer.android.com/reference/android/support/v4/app/FragmentManager.OnBackStackChangedListener)
  - [LoaderManager.LoaderCallbacks](https://developer.android.com/reference/android/support/v4/app/LoaderManager.LoaderCallbacks)
  - [NotificationCompat.Action.Extender](https://developer.android.com/reference/android/support/v4/app/NotificationCompat.Action.Extender)
  - [NotificationCompat.Extender](https://developer.android.com/reference/android/support/v4/app/NotificationCompat.Extender)
  - [SharedElementCallback.OnSharedElementsReadyListener](https://developer.android.com/reference/android/support/v4/app/SharedElementCallback.OnSharedElementsReadyListener)
  - [TaskStackBuilder.SupportParentable](https://developer.android.com/reference/android/support/v4/app/TaskStackBuilder.SupportParentable)
-

  ## Classes

  - [ActionBarDrawerToggle](https://developer.android.com/reference/android/support/v4/app/ActionBarDrawerToggle)
  - [ActivityCompat](https://developer.android.com/reference/android/support/v4/app/ActivityCompat)
  - [ActivityManagerCompat](https://developer.android.com/reference/android/support/v4/app/ActivityManagerCompat)
  - [ActivityOptionsCompat](https://developer.android.com/reference/android/support/v4/app/ActivityOptionsCompat)
  - [AlarmManagerCompat](https://developer.android.com/reference/android/support/v4/app/AlarmManagerCompat)
  - [AppLaunchChecker](https://developer.android.com/reference/android/support/v4/app/AppLaunchChecker)
  - [AppOpsManagerCompat](https://developer.android.com/reference/android/support/v4/app/AppOpsManagerCompat)
  - [BundleCompat](https://developer.android.com/reference/android/support/v4/app/BundleCompat)
  - [DialogFragment](https://developer.android.com/reference/android/support/v4/app/DialogFragment)
  - [Fragment](https://developer.android.com/reference/android/support/v4/app/Fragment)
  - [Fragment.SavedState](https://developer.android.com/reference/android/support/v4/app/Fragment.SavedState)
  - [FragmentActivity](https://developer.android.com/reference/android/support/v4/app/FragmentActivity)
  - [FragmentContainer](https://developer.android.com/reference/android/support/v4/app/FragmentContainer)
  - [FragmentController](https://developer.android.com/reference/android/support/v4/app/FragmentController)
  - [FragmentHostCallback](https://developer.android.com/reference/android/support/v4/app/FragmentHostCallback)
  - [FragmentManager](https://developer.android.com/reference/android/support/v4/app/FragmentManager)
  - [FragmentManager.FragmentLifecycleCallbacks](https://developer.android.com/reference/android/support/v4/app/FragmentManager.FragmentLifecycleCallbacks)
  - [FragmentManagerNonConfig](https://developer.android.com/reference/android/support/v4/app/FragmentManagerNonConfig)
  - [FragmentPagerAdapter](https://developer.android.com/reference/android/support/v4/app/FragmentPagerAdapter)
  - [FragmentStatePagerAdapter](https://developer.android.com/reference/android/support/v4/app/FragmentStatePagerAdapter)
  - [FragmentTabHost](https://developer.android.com/reference/android/support/v4/app/FragmentTabHost)
  - [FragmentTransaction](https://developer.android.com/reference/android/support/v4/app/FragmentTransaction)
  - [FrameMetricsAggregator](https://developer.android.com/reference/android/support/v4/app/FrameMetricsAggregator)
  - [JobIntentService](https://developer.android.com/reference/android/support/v4/app/JobIntentService)
  - [ListFragment](https://developer.android.com/reference/android/support/v4/app/ListFragment)
  - [LoaderManager](https://developer.android.com/reference/android/support/v4/app/LoaderManager)
  - [NavUtils](https://developer.android.com/reference/android/support/v4/app/NavUtils)
  - [NotificationCompat](https://developer.android.com/reference/android/support/v4/app/NotificationCompat)
  - [NotificationCompat.Action](https://developer.android.com/reference/android/support/v4/app/NotificationCompat.Action)
  - [NotificationCompat.Action.Builder](https://developer.android.com/reference/android/support/v4/app/NotificationCompat.Action.Builder)
  - [NotificationCompat.Action.WearableExtender](https://developer.android.com/reference/android/support/v4/app/NotificationCompat.Action.WearableExtender)
  - [NotificationCompat.BigPictureStyle](https://developer.android.com/reference/android/support/v4/app/NotificationCompat.BigPictureStyle)
  - [NotificationCompat.BigTextStyle](https://developer.android.com/reference/android/support/v4/app/NotificationCompat.BigTextStyle)
  - [NotificationCompat.Builder](https://developer.android.com/reference/android/support/v4/app/NotificationCompat.Builder)
  - [NotificationCompat.CarExtender](https://developer.android.com/reference/android/support/v4/app/NotificationCompat.CarExtender)
  - [NotificationCompat.CarExtender.UnreadConversation](https://developer.android.com/reference/android/support/v4/app/NotificationCompat.CarExtender.UnreadConversation)
  - [NotificationCompat.CarExtender.UnreadConversation.Builder](https://developer.android.com/reference/android/support/v4/app/NotificationCompat.CarExtender.UnreadConversation.Builder)
  - [NotificationCompat.DecoratedCustomViewStyle](https://developer.android.com/reference/android/support/v4/app/NotificationCompat.DecoratedCustomViewStyle)
  - [NotificationCompat.InboxStyle](https://developer.android.com/reference/android/support/v4/app/NotificationCompat.InboxStyle)
  - [NotificationCompat.MessagingStyle](https://developer.android.com/reference/android/support/v4/app/NotificationCompat.MessagingStyle)
  - [NotificationCompat.MessagingStyle.Message](https://developer.android.com/reference/android/support/v4/app/NotificationCompat.MessagingStyle.Message)
  - [NotificationCompat.Style](https://developer.android.com/reference/android/support/v4/app/NotificationCompat.Style)
  - [NotificationCompat.WearableExtender](https://developer.android.com/reference/android/support/v4/app/NotificationCompat.WearableExtender)
  - [NotificationCompatExtras](https://developer.android.com/reference/android/support/v4/app/NotificationCompatExtras)
  - [NotificationCompatSideChannelService](https://developer.android.com/reference/android/support/v4/app/NotificationCompatSideChannelService)
  - [NotificationManagerCompat](https://developer.android.com/reference/android/support/v4/app/NotificationManagerCompat)
  - [RemoteInput](https://developer.android.com/reference/android/support/v4/app/RemoteInput)
  - [RemoteInput.Builder](https://developer.android.com/reference/android/support/v4/app/RemoteInput.Builder)
  - [ServiceCompat](https://developer.android.com/reference/android/support/v4/app/ServiceCompat)
  - [ShareCompat](https://developer.android.com/reference/android/support/v4/app/ShareCompat)
  - [ShareCompat.IntentBuilder](https://developer.android.com/reference/android/support/v4/app/ShareCompat.IntentBuilder)
  - [ShareCompat.IntentReader](https://developer.android.com/reference/android/support/v4/app/ShareCompat.IntentReader)
  - [SharedElementCallback](https://developer.android.com/reference/android/support/v4/app/SharedElementCallback)
  - [TaskStackBuilder](https://developer.android.com/reference/android/support/v4/app/TaskStackBuilder)
-

  ## Exceptions

  - [Fragment.InstantiationException](https://developer.android.com/reference/android/support/v4/app/Fragment.InstantiationException)