# ActivityOptionsCompat

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:[Constants](https://developer.android.com/reference/android/support/v4/app/ActivityOptionsCompat#constants)\|[Protected Ctors](https://developer.android.com/reference/android/support/v4/app/ActivityOptionsCompat#proctors)\|[Methods](https://developer.android.com/reference/android/support/v4/app/ActivityOptionsCompat#pubmethods)\|[Inherited Methods](https://developer.android.com/reference/android/support/v4/app/ActivityOptionsCompat#inhmethods)\|[\[Expand All\]](https://developer.android.com/reference/android/support/v4/app/ActivityOptionsCompat#)  

# ActivityOptionsCompat

| 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


class
ActivityOptionsCompat
`  
`

extends Object


``


`

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

<br />

*** ** * ** ***

Helper for accessing features in[ActivityOptions](https://developer.android.com/reference/android/app/ActivityOptions.html)in a backwards compatible fashion.

## Summary

|                                                                                                                                                                                                                                                                             ### Constants                                                                                                                                                                                                                                                                             ||
|----------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `String` | [EXTRA_USAGE_TIME_REPORT](https://developer.android.com/reference/android/support/v4/app/ActivityOptionsCompat#EXTRA_USAGE_TIME_REPORT) A long in the extras delivered by[requestUsageTimeReport(PendingIntent)](https://developer.android.com/reference/android/support/v4/app/ActivityOptionsCompat#requestUsageTimeReport(android.app.PendingIntent))that contains the total time (in ms) the user spent in the app flow.                                                                                                                                |
| `String` | [EXTRA_USAGE_TIME_REPORT_PACKAGES](https://developer.android.com/reference/android/support/v4/app/ActivityOptionsCompat#EXTRA_USAGE_TIME_REPORT_PACKAGES) A Bundle in the extras delivered by[requestUsageTimeReport(PendingIntent)](https://developer.android.com/reference/android/support/v4/app/ActivityOptionsCompat#requestUsageTimeReport(android.app.PendingIntent))that contains detailed information about the time spent in each package associated with the app; each key is a package name, whose value is a long containing the time (in ms). |

|                                                            ### Protected constructors                                                            ||
|-----------------------------------------------------------------------------------------------------------------------------------------------|---|
| ` `[ActivityOptionsCompat](https://developer.android.com/reference/android/support/v4/app/ActivityOptionsCompat#ActivityOptionsCompat())`() ` |

|                                                                                                                                                                                                                                                                                                                                                                      ### Public methods                                                                                                                                                                                                                                                                                                                                                                      ||
|-------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` `[Rect](https://developer.android.com/reference/android/graphics/Rect.html)                                           | ` `[getLaunchBounds](https://developer.android.com/reference/android/support/v4/app/ActivityOptionsCompat#getLaunchBounds())`() ` Returns the bounds that should be used to launch the activity.                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| ` static `[ActivityOptionsCompat](https://developer.android.com/reference/android/support/v4/app/ActivityOptionsCompat) | ` `[makeBasic](https://developer.android.com/reference/android/support/v4/app/ActivityOptionsCompat#makeBasic())`() ` Create a basic ActivityOptions that has no special animation associated with it.                                                                                                                                                                                                                                                                                                                                                                                                                              |
| ` static `[ActivityOptionsCompat](https://developer.android.com/reference/android/support/v4/app/ActivityOptionsCompat) | ` `[makeClipRevealAnimation](https://developer.android.com/reference/android/support/v4/app/ActivityOptionsCompat#makeClipRevealAnimation(android.view.View, int, int, int, int))`(`[View](https://developer.android.com/reference/android/view/View.html)` source, int startX, int startY, int width, int height) ` Create an ActivityOptions specifying an animation where the new activity is revealed from a small originating area of the screen to its final full representation.                                                                                                                                             |
| ` static `[ActivityOptionsCompat](https://developer.android.com/reference/android/support/v4/app/ActivityOptionsCompat) | ` `[makeCustomAnimation](https://developer.android.com/reference/android/support/v4/app/ActivityOptionsCompat#makeCustomAnimation(android.content.Context, int, int))`(`[Context](https://developer.android.com/reference/android/content/Context.html)` context, int enterResId, int exitResId) ` Create an ActivityOptions specifying a custom animation to run when the activity is displayed.                                                                                                                                                                                                                                   |
| ` static `[ActivityOptionsCompat](https://developer.android.com/reference/android/support/v4/app/ActivityOptionsCompat) | ` `[makeScaleUpAnimation](https://developer.android.com/reference/android/support/v4/app/ActivityOptionsCompat#makeScaleUpAnimation(android.view.View, int, int, int, int))`(`[View](https://developer.android.com/reference/android/view/View.html)` source, int startX, int startY, int startWidth, int startHeight) ` Create an ActivityOptions specifying an animation where the new activity is scaled from a small originating area of the screen to its final full representation.                                                                                                                                           |
| ` static `[ActivityOptionsCompat](https://developer.android.com/reference/android/support/v4/app/ActivityOptionsCompat) | ` `[makeSceneTransitionAnimation](https://developer.android.com/reference/android/support/v4/app/ActivityOptionsCompat#makeSceneTransitionAnimation(android.app.Activity, android.support.v4.util.Pair<android.view.View, java.lang.String>...))`(`[Activity](https://developer.android.com/reference/android/app/Activity.html)` activity, `[Pair...](https://developer.android.com/reference/android/support/v4/util/Pair)`<`[View](https://developer.android.com/reference/android/view/View.html)`, String> sharedElements) ` Create an ActivityOptions to transition between Activities using cross-Activity scene animations. |
| ` static `[ActivityOptionsCompat](https://developer.android.com/reference/android/support/v4/app/ActivityOptionsCompat) | ` `[makeSceneTransitionAnimation](https://developer.android.com/reference/android/support/v4/app/ActivityOptionsCompat#makeSceneTransitionAnimation(android.app.Activity, android.view.View, java.lang.String))`(`[Activity](https://developer.android.com/reference/android/app/Activity.html)` activity, `[View](https://developer.android.com/reference/android/view/View.html)` sharedElement, String sharedElementName) ` Create an ActivityOptions to transition between Activities using cross-Activity scene animations.                                                                                                    |
| ` static `[ActivityOptionsCompat](https://developer.android.com/reference/android/support/v4/app/ActivityOptionsCompat) | ` `[makeTaskLaunchBehind](https://developer.android.com/reference/android/support/v4/app/ActivityOptionsCompat#makeTaskLaunchBehind())`() ` If set along with Intent.FLAG_ACTIVITY_NEW_DOCUMENT then the task being launched will not be presented to the user but will instead be only available through the recents task list.                                                                                                                                                                                                                                                                                                    |
| ` static `[ActivityOptionsCompat](https://developer.android.com/reference/android/support/v4/app/ActivityOptionsCompat) | ` `[makeThumbnailScaleUpAnimation](https://developer.android.com/reference/android/support/v4/app/ActivityOptionsCompat#makeThumbnailScaleUpAnimation(android.view.View, android.graphics.Bitmap, int, int))`(`[View](https://developer.android.com/reference/android/view/View.html)` source, `[Bitmap](https://developer.android.com/reference/android/graphics/Bitmap.html)` thumbnail, int startX, int startY) ` Create an ActivityOptions specifying an animation where a thumbnail is scaled from a given position to the new activity window that is being started.                                                          |
| ` void`                                                                                                                 | ` `[requestUsageTimeReport](https://developer.android.com/reference/android/support/v4/app/ActivityOptionsCompat#requestUsageTimeReport(android.app.PendingIntent))`(`[PendingIntent](https://developer.android.com/reference/android/app/PendingIntent.html)` receiver) ` Ask the the system track that time the user spends in the app being launched, and report it back once done.                                                                                                                                                                                                                                              |
| ` `[ActivityOptionsCompat](https://developer.android.com/reference/android/support/v4/app/ActivityOptionsCompat)        | ` `[setLaunchBounds](https://developer.android.com/reference/android/support/v4/app/ActivityOptionsCompat#setLaunchBounds(android.graphics.Rect))`(`[Rect](https://developer.android.com/reference/android/graphics/Rect.html)` screenSpacePixelRect) ` Sets the bounds (window size) that the activity should be launched in.                                                                                                                                                                                                                                                                                                      |
| ` `[Bundle](https://developer.android.com/reference/android/os/Bundle.html)                                             | ` `[toBundle](https://developer.android.com/reference/android/support/v4/app/ActivityOptionsCompat#toBundle())`() ` Returns the created options as a Bundle, which can be passed to[startActivity(Context, android.content.Intent, Bundle)](https://developer.android.com/reference/android/support/v4/content/ContextCompat#startActivity(android.content.Context, android.content.Intent, android.os.Bundle)).                                                                                                                                                                                                                    |
| ` void`                                                                                                                 | ` `[update](https://developer.android.com/reference/android/support/v4/app/ActivityOptionsCompat#update(android.support.v4.app.ActivityOptionsCompat))`(`[ActivityOptionsCompat](https://developer.android.com/reference/android/support/v4/app/ActivityOptionsCompat)` otherOptions) ` Update the current values in this ActivityOptions from those supplied in otherOptions.                                                                                                                                                                                                                                                      |

| ### Inherited methods |
|-----------------------|---|
| [![](https://developer.android.com/static/assets/images/styles/disclosure_down.png)](https://developer.android.com/reference/android/support/v4/app/ActivityOptionsCompat#)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() `                    | ||

## Constants

### EXTRA_USAGE_TIME_REPORT

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

```
String EXTRA_USAGE_TIME_REPORT
```

A long in the extras delivered by[requestUsageTimeReport(PendingIntent)](https://developer.android.com/reference/android/support/v4/app/ActivityOptionsCompat#requestUsageTimeReport(android.app.PendingIntent))that contains the total time (in ms) the user spent in the app flow.

<br />

Constant Value: "android.activity.usage_time"  

### EXTRA_USAGE_TIME_REPORT_PACKAGES

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

```
String EXTRA_USAGE_TIME_REPORT_PACKAGES
```

A Bundle in the extras delivered by[requestUsageTimeReport(PendingIntent)](https://developer.android.com/reference/android/support/v4/app/ActivityOptionsCompat#requestUsageTimeReport(android.app.PendingIntent))that contains detailed information about the time spent in each package associated with the app; each key is a package name, whose value is a long containing the time (in ms).

<br />

Constant Value: "android.usage_time_packages"

## Protected constructors

### ActivityOptionsCompat

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

```
ActivityOptionsCompat ()
```

<br />

<br />

## Public methods

### getLaunchBounds

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

```
Rect getLaunchBounds ()
```

Returns the bounds that should be used to launch the activity.

<br />

|                                                        Returns                                                         ||
|----------------------------------------------------------------------------|--------------------------------------------|
| [Rect](https://developer.android.com/reference/android/graphics/Rect.html) | Bounds used to launch the activity. <br /> |

**See also:**

- [setLaunchBounds(Rect)](https://developer.android.com/reference/android/support/v4/app/ActivityOptionsCompat#setLaunchBounds(android.graphics.Rect))  

### makeBasic

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

```
ActivityOptionsCompat makeBasic ()
```

Create a basic ActivityOptions that has no special animation associated with it. Other options can still be set.

<br />

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

### makeClipRevealAnimation

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

```
ActivityOptionsCompat makeClipRevealAnimation (View source, 
                int startX, 
                int startY, 
                int width, 
                int height)
```

Create an ActivityOptions specifying an animation where the new activity is revealed from a small originating area of the screen to its final full representation.

<br />

|                                                                                      Parameters                                                                                      ||
|----------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `source` | `View`: The View that the new activity is animating from. This defines the coordinate space for<var translate="no">startX</var>and<var translate="no">startY</var>. <br /> |
| `startX` | `int`: The x starting location of the new activity, relative to<var translate="no">source</var>. <br />                                                                    |
| `startY` | `int`: The y starting location of the activity, relative to<var translate="no">source</var>. <br />                                                                        |
| `width`  | `int`: The initial width of the new activity. <br />                                                                                                                       |
| `height` | `int`: The initial height of the new activity. <br />                                                                                                                      |

|                                                                                                                       Returns                                                                                                                        ||
|---------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------|
| [ActivityOptionsCompat](https://developer.android.com/reference/android/support/v4/app/ActivityOptionsCompat) | Returns a new ActivityOptions object that you can use to supply these options as the options Bundle when starting an activity. <br /> |

### makeCustomAnimation

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

```
ActivityOptionsCompat makeCustomAnimation (Context context, 
                int enterResId, 
                int exitResId)
```

Create an ActivityOptions specifying a custom animation to run when the activity is displayed.

<br />

|                                                           Parameters                                                            ||
|--------------|-------------------------------------------------------------------------------------------------------------------|
| `context`    | `Context`: Who is defining this. This is the application that the animation resources will be loaded from. <br /> |
| `enterResId` | `int`: A resource ID of the animation resource to use for the incoming activity. Use 0 for no animation. <br />   |
| `exitResId`  | `int`: A resource ID of the animation resource to use for the outgoing activity. Use 0 for no animation. <br />   |

|                                                                                                                       Returns                                                                                                                        ||
|---------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------|
| [ActivityOptionsCompat](https://developer.android.com/reference/android/support/v4/app/ActivityOptionsCompat) | Returns a new ActivityOptions object that you can use to supply these options as the options Bundle when starting an activity. <br /> |

### makeScaleUpAnimation

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

```
ActivityOptionsCompat makeScaleUpAnimation (View source, 
                int startX, 
                int startY, 
                int startWidth, 
                int startHeight)
```

Create an ActivityOptions specifying an animation where the new activity is scaled from a small originating area of the screen to its final full representation.

<br />

If the Intent this is being used with has not set its[setSourceBounds(android.graphics.Rect)](https://developer.android.com/reference/android/content/Intent.html#setSourceBounds(android.graphics.Rect)), those bounds will be filled in for you based on the initial bounds passed in here.

<br />

<br />

|                                                                Parameters                                                                ||
|---------------|---------------------------------------------------------------------------------------------------------------------------|
| `source`      | `View`: The View that the new activity is animating from. This defines the coordinate space for startX and startY. <br /> |
| `startX`      | `int`: The x starting location of the new activity, relative to source. <br />                                            |
| `startY`      | `int`: The y starting location of the activity, relative to source. <br />                                                |
| `startWidth`  | `int`: The initial width of the new activity. <br />                                                                      |
| `startHeight` | `int`: The initial height of the new activity. <br />                                                                     |

|                                                                                                                       Returns                                                                                                                        ||
|---------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------|
| [ActivityOptionsCompat](https://developer.android.com/reference/android/support/v4/app/ActivityOptionsCompat) | Returns a new ActivityOptions object that you can use to supply these options as the options Bundle when starting an activity. <br /> |

### makeSceneTransitionAnimation

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

```
ActivityOptionsCompat makeSceneTransitionAnimation (Activity activity, 
                Pair...<View, String> sharedElements)
```

Create an ActivityOptions to transition between Activities using cross-Activity scene animations. This method carries the position of multiple shared elements to the started Activity. The position of the first element in sharedElements will be used as the epicenter for the exit Transition. The position of the associated shared element in the launched Activity will be the epicenter of its entering Transition.

This requires[FEATURE_CONTENT_TRANSITIONS](https://developer.android.com/reference/android/view/Window.html#FEATURE_CONTENT_TRANSITIONS)to be enabled on the calling Activity to cause an exit transition. The same must be in the called Activity to get an entering transition.

<br />

<br />

|                                                                                       Parameters                                                                                        ||
|------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `activity`       | `Activity`: The Activity whose window contains the shared elements. <br />                                                                                            |
| `sharedElements` | `Pair`: The names of the shared elements to transfer to the called Activity and their associated Views. The Views must each have a unique shared element name. <br /> |

|                                                                                                                       Returns                                                                                                                        ||
|---------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------|
| [ActivityOptionsCompat](https://developer.android.com/reference/android/support/v4/app/ActivityOptionsCompat) | Returns a new ActivityOptions object that you can use to supply these options as the options Bundle when starting an activity. <br /> |

### makeSceneTransitionAnimation

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

```
ActivityOptionsCompat makeSceneTransitionAnimation (Activity activity, 
                View sharedElement, 
                String sharedElementName)
```

Create an ActivityOptions to transition between Activities using cross-Activity scene animations. This method carries the position of one shared element to the started Activity. The position of`sharedElement`will be used as the epicenter for the exit Transition. The position of the shared element in the launched Activity will be the epicenter of its entering Transition.

This requires[FEATURE_CONTENT_TRANSITIONS](https://developer.android.com/reference/android/view/Window.html#FEATURE_CONTENT_TRANSITIONS)to be enabled on the calling Activity to cause an exit transition. The same must be in the called Activity to get an entering transition.

<br />

<br />

|                                                                        Parameters                                                                        ||
|---------------------|-------------------------------------------------------------------------------------------------------------------------------------|
| `activity`          | `Activity`: The Activity whose window contains the shared elements. <br />                                                          |
| `sharedElement`     | `View`: The View to transition to the started Activity. sharedElement must have a non-null sharedElementName. <br />                |
| `sharedElementName` | `String`: The shared element name as used in the target Activity. This may be null if it has the same name as sharedElement. <br /> |

|                                                                                                                       Returns                                                                                                                        ||
|---------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------|
| [ActivityOptionsCompat](https://developer.android.com/reference/android/support/v4/app/ActivityOptionsCompat) | Returns a new ActivityOptions object that you can use to supply these options as the options Bundle when starting an activity. <br /> |

### makeTaskLaunchBehind

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

```
ActivityOptionsCompat makeTaskLaunchBehind ()
```

If set along with Intent.FLAG_ACTIVITY_NEW_DOCUMENT then the task being launched will not be presented to the user but will instead be only available through the recents task list. In addition, the new task wil be affiliated with the launching activity's task. Affiliated tasks are grouped together in the recents task list.

This behavior is not supported for activities with[launchMode](https://developer.android.com/reference/android/R.attr#launchMode)values of`singleInstance`or`singleTask`.

<br />

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

### makeThumbnailScaleUpAnimation

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

```
ActivityOptionsCompat makeThumbnailScaleUpAnimation (View source, 
                Bitmap thumbnail, 
                int startX, 
                int startY)
```

Create an ActivityOptions specifying an animation where a thumbnail is scaled from a given position to the new activity window that is being started.

<br />

If the Intent this is being used with has not set its[setSourceBounds(android.graphics.Rect)](https://developer.android.com/reference/android/content/Intent.html#setSourceBounds(android.graphics.Rect)), those bounds will be filled in for you based on the initial thumbnail location and size provided here.

<br />

<br />

|                                                              Parameters                                                              ||
|-------------|-------------------------------------------------------------------------------------------------------------------------|
| `source`    | `View`: The View that this thumbnail is animating from. This defines the coordinate space for startX and startY. <br /> |
| `thumbnail` | `Bitmap`: The bitmap that will be shown as the initial thumbnail of the animation. <br />                               |
| `startX`    | `int`: The x starting location of the bitmap, relative to source. <br />                                                |
| `startY`    | `int`: The y starting location of the bitmap, relative to source. <br />                                                |

|                                                                                                                       Returns                                                                                                                        ||
|---------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------|
| [ActivityOptionsCompat](https://developer.android.com/reference/android/support/v4/app/ActivityOptionsCompat) | Returns a new ActivityOptions object that you can use to supply these options as the options Bundle when starting an activity. <br /> |

### requestUsageTimeReport

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

```
void requestUsageTimeReport (PendingIntent receiver)
```

Ask the the system track that time the user spends in the app being launched, and report it back once done. The report will be sent to the given receiver, with the extras[EXTRA_USAGE_TIME_REPORT](https://developer.android.com/reference/android/support/v4/app/ActivityOptionsCompat#EXTRA_USAGE_TIME_REPORT)and[EXTRA_USAGE_TIME_REPORT_PACKAGES](https://developer.android.com/reference/android/support/v4/app/ActivityOptionsCompat#EXTRA_USAGE_TIME_REPORT_PACKAGES)filled in.

The time interval tracked is from launching this activity until the user leaves that activity's flow. They are considered to stay in the flow as long as new activities are being launched or returned to from the original flow, even if this crosses package or task boundaries. For example, if the originator starts an activity to view an image, and while there the user selects to share, which launches their email app in a new task, and they complete the share, the time during that entire operation will be included until they finally hit back from the original image viewer activity.

The user is considered to complete a flow once they switch to another activity that is not part of the tracked flow. This may happen, for example, by using the notification shade, launcher, or recents to launch or switch to another app. Simply going in to these navigation elements does not break the flow (although the launcher and recents stops time tracking of the session); it is the act of going somewhere else that completes the tracking.

<br />

<br />

|                                       Parameters                                       ||
|------------|----------------------------------------------------------------------------|
| `receiver` | `PendingIntent`: A broadcast receiver that will receive the report. <br /> |

### setLaunchBounds

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

```
ActivityOptionsCompat setLaunchBounds (Rect screenSpacePixelRect)
```

Sets the bounds (window size) that the activity should be launched in. Rect position should be provided in pixels and in screen coordinates. Set to null explicitly for fullscreen.

**NOTE:This value is ignored on devices that don't have[FEATURE_FREEFORM_WINDOW_MANAGEMENT](https://developer.android.com/reference/android/content/pm/PackageManager.html#FEATURE_FREEFORM_WINDOW_MANAGEMENT)or[FEATURE_PICTURE_IN_PICTURE](https://developer.android.com/reference/android/content/pm/PackageManager.html#FEATURE_PICTURE_IN_PICTURE)enabled.**

<br />

**| Parameters ||
|------------------------|------------------------------------------------------------------------------|
| `screenSpacePixelRect` | `Rect`: Launch bounds to use for the activity or null for fullscreen. <br /> |
| Returns ||
|---------------------------------------------------------------------------------------------------------------|--------|
| [ActivityOptionsCompat](https://developer.android.com/reference/android/support/v4/app/ActivityOptionsCompat) | <br /> |**
**### toBundle
added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)
```
Bundle toBundle ()
```
Returns the created options as a Bundle, which can be passed to[startActivity(Context, android.content.Intent, Bundle)](https://developer.android.com/reference/android/support/v4/content/ContextCompat#startActivity(android.content.Context, android.content.Intent, android.os.Bundle)). Note that the returned Bundle is still owned by the ActivityOptions object; you must not modify it, but can supply it to the startActivity methods that take an options Bundle.
<br />
| Returns ||
|--------------------------------------------------------------------------|--------|
| [Bundle](https://developer.android.com/reference/android/os/Bundle.html) | <br /> |
### update
added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)
```
void update (ActivityOptionsCompat otherOptions)
```
Update the current values in this ActivityOptions from those supplied in otherOptions. Any values defined in otherOptions replace those in the base options.
<br />
| Parameters ||
|----------------|--------------------------------|
| `otherOptions` | `ActivityOptionsCompat` <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)**