# IntentCompat

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/content/IntentCompat#constants)\|[Methods](https://developer.android.com/reference/android/support/v4/content/IntentCompat#pubmethods)\|[Inherited Methods](https://developer.android.com/reference/android/support/v4/content/IntentCompat#inhmethods)\|[\[Expand All\]](https://developer.android.com/reference/android/support/v4/content/IntentCompat#)  

# IntentCompat

| 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
IntentCompat
`  
`

extends Object


``


`

|---|-----------------------------------------|
| java.lang.Object                           ||
| ↳ | android.support.v4.content.IntentCompat |

<br />

*** ** * ** ***

Helper for accessing features in[Intent](https://developer.android.com/reference/android/content/Intent.html).

## Summary

|                                                                                                                                                                                                              ### Constants                                                                                                                                                                                                               ||
|----------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `String` | [CATEGORY_LEANBACK_LAUNCHER](https://developer.android.com/reference/android/support/v4/content/IntentCompat#CATEGORY_LEANBACK_LAUNCHER) Indicates an activity optimized for Leanback mode, and that should be displayed in the Leanback launcher.                                                                                                                                                                             |
| `String` | [EXTRA_HTML_TEXT](https://developer.android.com/reference/android/support/v4/content/IntentCompat#EXTRA_HTML_TEXT) A constant String that is associated with the Intent, used with[ACTION_SEND](https://developer.android.com/reference/android/content/Intent.html#ACTION_SEND)to supply an alternative to[EXTRA_TEXT](https://developer.android.com/reference/android/content/Intent.html#EXTRA_TEXT)as HTML formatted text. |
| `String` | [EXTRA_START_PLAYBACK](https://developer.android.com/reference/android/support/v4/content/IntentCompat#EXTRA_START_PLAYBACK) Used as a boolean extra field in[ACTION_VIEW](https://developer.android.com/reference/android/content/Intent.html#ACTION_VIEW)intents to indicate that content should immediately be played without any intermediate screens that require additional user input, e.g.                             |

|                                                                                                                                                                                                                            ### Public methods                                                                                                                                                                                                                             ||
|-----------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` static `[Intent](https://developer.android.com/reference/android/content/Intent.html) | ` `[makeMainSelectorActivity](https://developer.android.com/reference/android/support/v4/content/IntentCompat#makeMainSelectorActivity(java.lang.String, java.lang.String))`(String selectorAction, String selectorCategory) ` Make an Intent for the main activity of an application, without specifying a specific activity to run but giving a selector to find the activity. |

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

### CATEGORY_LEANBACK_LAUNCHER

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

```
String CATEGORY_LEANBACK_LAUNCHER
```

Indicates an activity optimized for Leanback mode, and that should be displayed in the Leanback launcher.

<br />

Constant Value: "android.intent.category.LEANBACK_LAUNCHER"  

### EXTRA_HTML_TEXT

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

```
String EXTRA_HTML_TEXT
```

A constant String that is associated with the Intent, used with[ACTION_SEND](https://developer.android.com/reference/android/content/Intent.html#ACTION_SEND)to supply an alternative to[EXTRA_TEXT](https://developer.android.com/reference/android/content/Intent.html#EXTRA_TEXT)as HTML formatted text. Note that you*must* also supply[EXTRA_TEXT](https://developer.android.com/reference/android/content/Intent.html#EXTRA_TEXT).

<br />

Constant Value: "android.intent.extra.HTML_TEXT"  

### EXTRA_START_PLAYBACK

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

```
String EXTRA_START_PLAYBACK
```

Used as a boolean extra field in[ACTION_VIEW](https://developer.android.com/reference/android/content/Intent.html#ACTION_VIEW)intents to indicate that content should immediately be played without any intermediate screens that require additional user input, e.g. a profile selection screen or a details page.

<br />

Constant Value: "android.intent.extra.START_PLAYBACK"

## Public methods

### makeMainSelectorActivity

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

```
Intent makeMainSelectorActivity (String selectorAction, 
                String selectorCategory)
```

Make an Intent for the main activity of an application, without specifying a specific activity to run but giving a selector to find the activity. This results in a final Intent that is structured the same as when the application is launched from Home. For anything else that wants to launch an application in the same way, it is important that they use an Intent structured the same way, and can use this function to ensure this is the case.

The returned Intent has[ACTION_MAIN](https://developer.android.com/reference/android/content/Intent.html#ACTION_MAIN)as its action, and includes the category[CATEGORY_LAUNCHER](https://developer.android.com/reference/android/content/Intent.html#CATEGORY_LAUNCHER). This does*not* have[FLAG_ACTIVITY_NEW_TASK](https://developer.android.com/reference/android/content/Intent.html#FLAG_ACTIVITY_NEW_TASK)set, though typically you will want to do that through[addFlags(int)](https://developer.android.com/reference/android/content/Intent.html#addFlags(int))on the returned Intent.

<br />

|                                          Parameters                                          ||
|--------------------|--------------------------------------------------------------------------|
| `selectorAction`   | `String`: The action name of the Intent's selector. <br />               |
| `selectorCategory` | `String`: The name of a category to add to the Intent's selector. <br /> |

|                                                                                          Returns                                                                                          ||
|-------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------|
| [Intent](https://developer.android.com/reference/android/content/Intent.html) | Returns a newly created Intent that can be used to launch the activity as a main application entry. <br /> |

-

  ## Interfaces

  - [Loader.OnLoadCanceledListener](https://developer.android.com/reference/android/support/v4/content/Loader.OnLoadCanceledListener)
  - [Loader.OnLoadCompleteListener](https://developer.android.com/reference/android/support/v4/content/Loader.OnLoadCompleteListener)
-

  ## Classes

  - [AsyncTaskLoader](https://developer.android.com/reference/android/support/v4/content/AsyncTaskLoader)
  - [ContentResolverCompat](https://developer.android.com/reference/android/support/v4/content/ContentResolverCompat)
  - [ContextCompat](https://developer.android.com/reference/android/support/v4/content/ContextCompat)
  - [CursorLoader](https://developer.android.com/reference/android/support/v4/content/CursorLoader)
  - [FileProvider](https://developer.android.com/reference/android/support/v4/content/FileProvider)
  - [IntentCompat](https://developer.android.com/reference/android/support/v4/content/IntentCompat)
  - [Loader](https://developer.android.com/reference/android/support/v4/content/Loader)
  - [Loader.ForceLoadContentObserver](https://developer.android.com/reference/android/support/v4/content/Loader.ForceLoadContentObserver)
  - [LocalBroadcastManager](https://developer.android.com/reference/android/support/v4/content/LocalBroadcastManager)
  - [MimeTypeFilter](https://developer.android.com/reference/android/support/v4/content/MimeTypeFilter)
  - [PermissionChecker](https://developer.android.com/reference/android/support/v4/content/PermissionChecker)
  - [SharedPreferencesCompat](https://developer.android.com/reference/android/support/v4/content/SharedPreferencesCompat)
  - [SharedPreferencesCompat.EditorCompat](https://developer.android.com/reference/android/support/v4/content/SharedPreferencesCompat.EditorCompat)
  - [WakefulBroadcastReceiver](https://developer.android.com/reference/android/support/v4/content/WakefulBroadcastReceiver)