Added in API level 1

Intent


open class Intent : Parcelable, Cloneable
kotlin.Any
   ↳ android.content.Intent

An intent is an abstract description of an operation to be performed. It can be used with startActivity to launch an android.app.Activity, broadcastIntent to send it to any interested BroadcastReceiver components, and android.content.Context#startService or android.content.Context#bindService to communicate with a background android.app.Service.

An Intent provides a facility for performing late runtime binding between the code in different applications. Its most significant use is in the launching of activities, where it can be thought of as the glue between activities. It is basically a passive data structure holding an abstract description of an action to be performed.

Intent Structure

The primary pieces of information in an intent are:

Some examples of action/data pairs are:

  • ACTION_VIEW content://contacts/people/1 -- Display information about the person whose identifier is "1".

  • ACTION_DIAL content://contacts/people/1 -- Display the phone dialer with the person filled in.

  • ACTION_VIEW tel:123 -- Display the phone dialer with the given number filled in. Note how the VIEW action does what is considered the most reasonable thing for a particular URI.

  • ACTION_DIAL tel:123 -- Display the phone dialer with the given number filled in.

  • ACTION_EDIT content://contacts/people/1 -- Edit information about the person whose identifier is "1".

  • ACTION_VIEW content://contacts/people/ -- Display a list of people, which the user can browse through. This example is a typical top-level entry into the Contacts application, showing you the list of people. Selecting a particular person to view would result in a new intent { ACTION_VIEW content://contacts/people/N } being used to start an activity to display that person.

In addition to these primary attributes, there are a number of secondary attributes that you can also include with an intent:

  • category -- Gives additional information about the action to execute. For example, CATEGORY_LAUNCHER means it should appear in the Launcher as a top-level application, while CATEGORY_ALTERNATIVE means it should be included in a list of alternative actions the user can perform on a piece of data.

  • type -- Specifies an explicit type (a MIME type) of the intent data. Normally the type is inferred from the data itself. By setting this attribute, you disable that evaluation and force an explicit type.

  • component -- Specifies an explicit name of a component class to use for the intent. Normally this is determined by looking at the other information in the intent (the action, data/type, and categories) and matching that with a component that can handle it. If this attribute is set then none of the evaluation is performed, and this component is used exactly as is. By specifying this attribute, all of the other Intent attributes become optional.

  • extras -- This is a Bundle of any additional information. This can be used to provide extended information to the component. For example, if we have a action to send an e-mail message, we could also include extra pieces of data here to supply a subject, body, etc.

Here are some examples of other operations you can specify as intents using these additional parameters:

There are a variety of standard Intent action and category constants defined in the Intent class, but applications can also define their own. These strings use Java-style scoping, to ensure they are unique -- for example, the standard ACTION_VIEW is called "android.intent.action.VIEW".

Put together, the set of actions, data types, categories, and extra data defines a language for the system allowing for the expression of phrases such as "call john smith's cell". As applications are added to the system, they can extend this language by adding new actions, types, and categories, or they can modify the behavior of existing phrases by supplying their own activities that handle them.

Intent Resolution

There are two primary forms of intents you will use.

  • Explicit Intents have specified a component (via setComponent or setClass), which provides the exact class to be run. Often these will not include any other information, simply being a way for an application to launch various internal activities it has as the user interacts with the application.

  • Implicit Intents have not specified a component; instead, they must include enough information for the system to determine which of the available components is best to run for that intent.

When using implicit intents, given such an arbitrary intent we need to know what to do with it. This is handled by the process of Intent resolution, which maps an Intent to an android.app.Activity, BroadcastReceiver, or android.app.Service (or sometimes two or more activities/receivers) that can handle it.

The intent resolution mechanism basically revolves around matching an Intent against all of the <intent-filter> descriptions in the installed application packages. (Plus, in the case of broadcasts, any BroadcastReceiver objects explicitly registered with android.content.Context#registerReceiver.) More details on this can be found in the documentation on the IntentFilter class.

There are three pieces of information in the Intent that are used for resolution: the action, type, and category. Using this information, a query is done on the PackageManager for a component that can handle the intent. The appropriate component is determined based on the intent information supplied in the AndroidManifest.xml file as follows:

  • The action, if given, must be listed by the component as one it handles.

  • The type is retrieved from the Intent's data, if not already supplied in the Intent. Like the action, if a type is included in the intent (either explicitly or implicitly in its data), then this must be listed by the component as one it handles.

  • For data that is not a content: URI and where no explicit type is included in the Intent, instead the scheme of the intent data (such as http: or mailto:) is considered. Again like the action, if we are matching a scheme it must be listed by the component as one it can handle.
  • The categories, if supplied, must all be listed by the activity as categories it handles. That is, if you include the categories CATEGORY_LAUNCHER and CATEGORY_ALTERNATIVE, then you will only resolve to components with an intent that lists both of those categories. Activities will very often need to support the CATEGORY_DEFAULT so that they can be found by android.content.Context#startActivity.

For example, consider the Note Pad sample application that allows a user to browse through a list of notes data and view details about individual items. Text in italics indicates places where you would replace a name with one specific to your own package.

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
        package="<i>com.android.notepad</i>">
      <application android:icon="@drawable/app_notes"
              android:label="@string/app_name">
 
          <provider class=".NotePadProvider"
                  android:authorities="<i>com.google.provider.NotePad</i>" />
 
          <activity class=".NotesList" android:label="@string/title_notes_list">
              <intent-filter>
                  <action android:name="android.intent.action.MAIN" />
                  <category android:name="android.intent.category.LAUNCHER" />
              </intent-filter>
              <intent-filter>
                  <action android:name="android.intent.action.VIEW" />
                  <action android:name="android.intent.action.EDIT" />
                  <action android:name="android.intent.action.PICK" />
                  <category android:name="android.intent.category.DEFAULT" />
                  <data android:mimeType="vnd.android.cursor.dir/<i>vnd.google.note</i>" />
              </intent-filter>
              <intent-filter>
                  <action android:name="android.intent.action.GET_CONTENT" />
                  <category android:name="android.intent.category.DEFAULT" />
                  <data android:mimeType="vnd.android.cursor.item/<i>vnd.google.note</i>" />
              </intent-filter>
          </activity>
 
          <activity class=".NoteEditor" android:label="@string/title_note">
              <intent-filter android:label="@string/resolve_edit">
                  <action android:name="android.intent.action.VIEW" />
                  <action android:name="android.intent.action.EDIT" />
                  <category android:name="android.intent.category.DEFAULT" />
                  <data android:mimeType="vnd.android.cursor.item/<i>vnd.google.note</i>" />
              </intent-filter>
 
              <intent-filter>
                  <action android:name="android.intent.action.INSERT" />
                  <category android:name="android.intent.category.DEFAULT" />
                  <data android:mimeType="vnd.android.cursor.dir/<i>vnd.google.note</i>" />
              </intent-filter>
 
          </activity>
 
          <activity class=".TitleEditor" android:label="@string/title_edit_title"
                  android:theme="@android:style/Theme.Dialog">
              <intent-filter android:label="@string/resolve_title">
                  <action android:name="<i>com.android.notepad.action.EDIT_TITLE</i>" />
                  <category android:name="android.intent.category.DEFAULT" />
                  <category android:name="android.intent.category.ALTERNATIVE" />
                  <category android:name="android.intent.category.SELECTED_ALTERNATIVE" />
                  <data android:mimeType="vnd.android.cursor.item/<i>vnd.google.note</i>" />
              </intent-filter>
          </activity>
 
      </application>
  </manifest>

The first activity, com.android.notepad.NotesList, serves as our main entry into the app. It can do three things as described by its three intent templates:

  1. <intent-filter>
          <action android:name="<code><a docref="android.content.Intent$ACTION_MAIN">android.intent.action.MAIN</a></code>" />
          <category android:name="<code><a docref="android.content.Intent$CATEGORY_LAUNCHER">android.intent.category.LAUNCHER</a></code>" />
      </intent-filter>

    This provides a top-level entry into the NotePad application: the standard MAIN action is a main entry point (not requiring any other information in the Intent), and the LAUNCHER category says that this entry point should be listed in the application launcher.

  2. <intent-filter>
          <action android:name="<code><a docref="android.content.Intent$ACTION_VIEW">android.intent.action.VIEW</a></code>" />
          <action android:name="<code><a docref="android.content.Intent$ACTION_EDIT">android.intent.action.EDIT</a></code>" />
          <action android:name="<code><a docref="android.content.Intent$ACTION_PICK">android.intent.action.PICK</a></code>" />
          <category android:name="<code><a docref="android.content.Intent$CATEGORY_DEFAULT">android.intent.category.DEFAULT</a></code>" />
          <data android:mimeType="vnd.android.cursor.dir/<i>vnd.google.note</i>" />
      </intent-filter>

    This declares the things that the activity can do on a directory of notes. The type being supported is given with the <type> tag, where vnd.android.cursor.dir/vnd.google.note is a URI from which a Cursor of zero or more items (vnd.android.cursor.dir) can be retrieved which holds our note pad data (vnd.google.note). The activity allows the user to view or edit the directory of data (via the VIEW and EDIT actions), or to pick a particular note and return it to the caller (via the PICK action). Note also the DEFAULT category supplied here: this is required for the android.content.Context#startActivity method to resolve your activity when its component name is not explicitly specified.

  3. <intent-filter>
          <action android:name="<code><a docref="android.content.Intent$ACTION_GET_CONTENT">android.intent.action.GET_CONTENT</a></code>" />
          <category android:name="<code><a docref="android.content.Intent$CATEGORY_DEFAULT">android.intent.category.DEFAULT</a></code>" />
          <data android:mimeType="vnd.android.cursor.item/<i>vnd.google.note</i>" />
      </intent-filter>

    This filter describes the ability to return to the caller a note selected by the user without needing to know where it came from. The data type vnd.android.cursor.item/vnd.google.note is a URI from which a Cursor of exactly one (vnd.android.cursor.item) item can be retrieved which contains our note pad data (vnd.google.note). The GET_CONTENT action is similar to the PICK action, where the activity will return to its caller a piece of data selected by the user. Here, however, the caller specifies the type of data they desire instead of the type of data the user will be picking from.

Given these capabilities, the following intents will resolve to the NotesList activity:

  • { action=android.app.action.MAIN } matches all of the activities that can be used as top-level entry points into an application.

  • { action=android.app.action.MAIN, category=android.app.category.LAUNCHER } is the actual intent used by the Launcher to populate its top-level list.

  • { action=android.intent.action.VIEW data=content://com.google.provider.NotePad/notes } displays a list of all the notes under "content://com.google.provider.NotePad/notes", which the user can browse through and see the details on.

  • { action=android.app.action.PICK data=content://com.google.provider.NotePad/notes } provides a list of the notes under "content://com.google.provider.NotePad/notes", from which the user can pick a note whose data URL is returned back to the caller.

  • { action=android.app.action.GET_CONTENT type=vnd.android.cursor.item/vnd.google.note } is similar to the pick action, but allows the caller to specify the kind of data they want back so that the system can find the appropriate activity to pick something of that data type.

The second activity, com.android.notepad.NoteEditor, shows the user a single note entry and allows them to edit it. It can do two things as described by its two intent templates:

  1. <intent-filter android:label="@string/resolve_edit">
          <action android:name="<code><a docref="android.content.Intent$ACTION_VIEW">android.intent.action.VIEW</a></code>" />
          <action android:name="<code><a docref="android.content.Intent$ACTION_EDIT">android.intent.action.EDIT</a></code>" />
          <category android:name="<code><a docref="android.content.Intent$CATEGORY_DEFAULT">android.intent.category.DEFAULT</a></code>" />
          <data android:mimeType="vnd.android.cursor.item/<i>vnd.google.note</i>" />
      </intent-filter>

    The first, primary, purpose of this activity is to let the user interact with a single note, as decribed by the MIME type vnd.android.cursor.item/vnd.google.note. The activity can either VIEW a note or allow the user to EDIT it. Again we support the DEFAULT category to allow the activity to be launched without explicitly specifying its component.

  2. <intent-filter>
          <action android:name="<code><a docref="android.content.Intent$ACTION_INSERT">android.intent.action.INSERT</a></code>" />
          <category android:name="<code><a docref="android.content.Intent$CATEGORY_DEFAULT">android.intent.category.DEFAULT</a></code>" />
          <data android:mimeType="vnd.android.cursor.dir/<i>vnd.google.note</i>" />
      </intent-filter>

    The secondary use of this activity is to insert a new note entry into an existing directory of notes. This is used when the user creates a new note: the INSERT action is executed on the directory of notes, causing this activity to run and have the user create the new note data which it then adds to the content provider.

Given these capabilities, the following intents will resolve to the NoteEditor activity:

  • { action=android.intent.action.VIEW data=content://com.google.provider.NotePad/notes/{ID} } shows the user the content of note {ID}.

  • { action=android.app.action.EDIT data=content://com.google.provider.NotePad/notes/{ID} } allows the user to edit the content of note {ID}.

  • { action=android.app.action.INSERT data=content://com.google.provider.NotePad/notes } creates a new, empty note in the notes list at "content://com.google.provider.NotePad/notes" and allows the user to edit it. If they keep their changes, the URI of the newly created note is returned to the caller.

The last activity, com.android.notepad.TitleEditor, allows the user to edit the title of a note. This could be implemented as a class that the application directly invokes (by explicitly setting its component in the Intent), but here we show a way you can publish alternative operations on existing data:

<intent-filter android:label="@string/resolve_title">
      <action android:name="<i>com.android.notepad.action.EDIT_TITLE</i>" />
      <category android:name="<code><a docref="android.content.Intent$CATEGORY_DEFAULT">android.intent.category.DEFAULT</a></code>" />
      <category android:name="<code><a docref="android.content.Intent$CATEGORY_ALTERNATIVE">android.intent.category.ALTERNATIVE</a></code>" />
      <category android:name="<code><a docref="android.content.Intent$CATEGORY_SELECTED_ALTERNATIVE">android.intent.category.SELECTED_ALTERNATIVE</a></code>" />
      <data android:mimeType="vnd.android.cursor.item/<i>vnd.google.note</i>" />
  </intent-filter>

In the single intent template here, we have created our own private action called com.android.notepad.action.EDIT_TITLE which means to edit the title of a note. It must be invoked on a specific note (data type vnd.android.cursor.item/vnd.google.note) like the previous view and edit actions, but here displays and edits the title contained in the note data.

In addition to supporting the default category as usual, our title editor also supports two other standard categories: ALTERNATIVE and SELECTED_ALTERNATIVE. Implementing these categories allows others to find the special action it provides without directly knowing about it, through the android.content.pm.PackageManager#queryIntentActivityOptions method, or more often to build dynamic menu items with android.view.Menu#addIntentOptions. Note that in the intent template here was also supply an explicit name for the template (via android:label="@string/resolve_title") to better control what the user sees when presented with this activity as an alternative action to the data they are viewing.

Given these capabilities, the following intent will resolve to the TitleEditor activity:

  • { action=com.android.notepad.action.EDIT_TITLE data=content://com.google.provider.NotePad/notes/{ID} } displays and allows the user to edit the title associated with note {ID}.

Standard Activity Actions

These are the current standard actions that Intent defines for launching activities (usually through android.content.Context#startActivity. The most important, and by far most frequently used, are ACTION_MAIN and ACTION_EDIT.

Standard Broadcast Actions

These are the current standard actions that Intent defines for receiving broadcasts (usually through android.content.Context#registerReceiver or a <receiver> tag in a manifest).

Note: If your app targets Android 11 (API level 30) or higher, registering broadcast such as ACTION_PACKAGES_SUSPENDED that includes package details in the extras receives a filtered list of apps or nothing. Learn more about how to manage package visibility.

Standard Categories

These are the current standard categories that can be used to further clarify an Intent via addCategory.

Standard Extra Data

These are the current standard fields that can be used as extra data via #putExtra.

Flags

These are the possible flags that can be used in the Intent via setFlags and addFlags. See setFlags for a list of all possible flags.

Summary

Nested classes

Wrapper class holding an Intent and implementing comparisons on it for the purpose of filtering.

open

Represents a shortcut/live folder icon resource.

Constants
static String

Broadcast Action: The user has switched the phone into or out of Airplane Mode.

static String

Activity Action: List all available applications.

static String

Activity Action: Handle an incoming phone call.

static String

Broadcast Action: Locale of a particular app has changed.

static String

An activity that provides a user interface for adjusting application preferences.

static String

Broadcast Action: Sent after application restrictions are changed.

static String

Activity Action: The user pressed the "Report" button in the crash/ANR dialog.

static String

Activity Action: Perform assist action.

static String

Used to indicate that some piece of data should be attached to some other place.

static String

Activity action: Launch UI to manage auto-revoke state.

static String

Broadcast Action: This is a sticky broadcast containing the charging state, level, and other information about the battery.

static String

Broadcast Action: Indicates low battery condition on the device.

static String

Broadcast Action: Indicates the battery is now okay after being low.

static String

Broadcast Action: This is broadcast once, after the user has finished booting.

static String

Activity Action: Show activity for reporting a bug.

static String

Activity Action: Perform a call to someone specified by the data.

static String

Activity Action: The user pressed the "call" button to go to the dialer or other appropriate UI for placing a call.

static String

Broadcast Action: The "Camera Button" was pressed.

static String

Activity Action: Main entry point for carrier setup apps.

static String

Activity Action: Display an activity chooser, allowing the user to pick what they want to before proceeding.

static String

Broadcast Action: This is broadcast when a user action should request a temporary system dialog to dismiss.

static String

Broadcast Action: The current device android.content.res.Configuration (orientation, locale, etc) has changed.

static String

Activity Action: Allow the user to create a new document.

static String

Activity Action: Starts a note-taking activity that can be used to create a note.

static String

Activity Action: Creates a reminder.

static String

Activity Action: Creates a shortcut.

static String

Broadcast Action: The date has changed.

static String

A synonym for ACTION_VIEW, the "standard" action that is performed on a piece of data.

static String

Activity Action: Define the meaning of the selected word(s).

static String

Activity Action: Delete the given data from its container.

static String

Broadcast Action: A sticky broadcast that indicates low storage space condition on the device

static String

Broadcast Action: Indicates low storage space condition on the device no longer exists

static String

Activity Action: Dial a number as specified by the data.

static String

Broadcast Action: A sticky broadcast for changes in the physical docking state of the device.

static String

Broadcast Action: Sent after the system starts dreaming.

static String

Broadcast Action: Sent after the system stops dreaming.

static String

Activity Action: Provide explicit editable access to the given data.

static String

Broadcast Action: Resources for a set of packages (which were previously unavailable) are currently available since the media on which they exist is available.

static String

Broadcast Action: Resources for a set of packages are currently unavailable since the media on which they exist is unavailable.

static String

Activity Action: Main entry point for factory tests.

static String

Activity Action: Allow the user to select a particular kind of data and return it.

static String

Broadcast to a specific application to query any supported restrictions to impose on restricted users.

static String

Broadcast Action: A GTalk connection has been established.

static String

Broadcast Action: A GTalk connection has been disconnected.

static String

Broadcast Action: Wired Headset plugged in or unplugged.

static String

Broadcast Action: An input method has been changed.

static String

Activity Action: Insert an empty item into the given container.

static String

Activity Action: Pick an existing item, or insert a new item, and then edit it.

static String

Activity Action: Activity to handle split installation failures.

static String

Activity Action: Launch application installer.

static String

Activity Action: Use with startActivityForResult to start a system activity that captures content on the screen to take a screenshot and present it to the user for editing.

static String

Broadcast Action: The receiver's effective locale has changed.

static String

Broadcast Action: This is broadcast once, after the user has finished booting, but while still in the "locked" state.

static String

Activity Action: Start as a main entry point, does not expect to receive data.

static String

Broadcast sent to the primary user when an associated managed profile is added (the profile was created and is ready to be used).

static String

Broadcast sent to the primary user when an associated managed profile has become available.

static String

Broadcast sent to the primary user when an associated managed profile is removed.

static String

Broadcast sent to the primary user when an associated managed profile has become unavailable.

static String

Broadcast sent to the primary user when the credential-encrypted private storage for an associated managed profile is unlocked.

static String

Activity Action: Show settings for managing network data usage of a specific application.

static String

Broadcast Action: Indicates low memory condition notification acknowledged by user and package management should be started.

static String

Activity action: Launch UI to manage unused apps (hibernated apps).

static String

Broadcast Action: External media was removed from SD card slot, but mount point was not unmounted.

static String

Broadcast Action: The "Media Button" was pressed.

static String

Broadcast Action: External media is present, and being disk-checked The path to the mount point for the checking media is contained in the Intent.

static String

Broadcast Action: User has expressed the desire to remove the external storage media.

static String

Broadcast Action: External media is present and mounted at its mount point.

static String

Broadcast Action: External media is present, but is using an incompatible fs (or is blank) The path to the mount point for the checking media is contained in the Intent.

static String

Broadcast Action: External media has been removed.

static String

Broadcast Action: The media scanner has finished scanning a directory.

static String

Broadcast Action: Request the media scanner to scan a file and add it to the media database.

static String

Broadcast Action: The media scanner has started scanning a directory.

static String

Broadcast Action: External media is unmounted because it is being shared via USB mass storage.

static String

Broadcast Action: External media is present but cannot be mounted.

static String

Broadcast Action: External media is present, but not mounted at its mount point.

static String

Broadcast Action: A new version of your application has been installed over an existing one.

static String

Broadcast Action: Sent to a package that has been suspended by the system.

static String

Broadcast Action: Sent to a package that has been unsuspended.

static String

Broadcast Action: An outgoing call is about to be placed.

static String

Activity Action: Allow the user to select and return one or more existing documents.

static String

Activity Action: Allow the user to pick a directory subtree.

static String

Broadcast Action: Packages have been suspended.

static String

Broadcast Action: Packages have been unsuspended.

static String

Broadcast Action: A new application package has been installed on the device.

static String

Broadcast Action: An existing application package has been changed (for example, a component has been enabled or disabled).

static String

Broadcast Action: The user has cleared the data of a package.

static String

Broadcast Action: Sent to the installer package of an application when that application is first launched (that is the first time it is moved out of the stopped state).

static String

Broadcast Action: An existing application package has been completely removed from the device.

static String

Broadcast Action: Trigger the download and eventual installation of a package.

static String

Broadcast Action: Sent to the system package verifier when a package needs to be verified.

static String

Broadcast Action: An existing application package has been removed from the device.

static String

Broadcast Action: A new version of an application package has been installed, replacing an existing version that was previously installed.

static String

Broadcast Action: The user has restarted a package, and all of its processes have been killed.

static String

Broadcast Action: An application package that was previously in the stopped state has been started and is no longer considered stopped.

static String

Broadcast Action: Sent to the system package verifier when a package is verified.

static String

Activity Action: Create a new item in the given container, initializing it from the current contents of the clipboard.

static String

Activity Action: Pick an item from the data, returning what was selected.

static String

Activity Action: Pick an activity given an intent, returning the class selected.

static String

Broadcast Action: External power has been connected to the device.

static String

Broadcast Action: External power has been removed from the device.

static String

Activity Action: Show power usage information to the user.

static String

Activity Action: Process a piece of text.

static String

Broadcast sent to the parent user when an associated profile has been started and unlocked.

static String

Broadcast sent to the parent user when an associated profile is added (the profile was created and is ready to be used).

static String

Broadcast sent to the primary user when an associated profile has become available.

static String

Broadcast sent to the parent user when an associated profile has stopped.

static String

Broadcast sent to the parent user when an associated profile is removed.

static String

Broadcast sent to the primary user when an associated profile has become unavailable.

static String

Broadcast Action: Some content providers have parts of their namespace where they publish new events or items that the user may be especially interested in.

static String

Sent when the user taps on the clock widget in the system's "quick settings" area.

static String

Activity Action: Quick view the data.

static String

Broadcast Action: Have the device reboot.

static String

Activity Action: Run the data, whatever that means.

static String

Activity action: Launch UI to open the Safety Center, which highlights the user's security and privacy status.

static String

Broadcast Action: Sent when the device goes to sleep and becomes non-interactive.

static String

Broadcast Action: Sent when the device wakes up and becomes interactive.

static String

Activity Action: Perform a search.

static String

Activity Action: Start action associated with long pressing on the search key.

static String

Activity Action: Deliver some data to someone else.

static String

Activity Action: Send a message to someone specified by the data.

static String

Activity Action: Deliver multiple data to someone else.

static String

Activity Action: Show settings for choosing wallpaper.

static String

Activity Action: Launch an activity showing the app information.

static String

Activity Action: Action to show the list of all work apps in the launcher.

static String

Broadcast Action: Device is shutting down.

static String

Activity Action: Perform a data synchronization.

static String

Activity Action: Start the platform-defined tutorial

static String

Broadcast Action: The timezone has changed.

static String

Broadcast Action: The time was set.

static String

Broadcast Action: The current time has changed.

static String

Activity Action: Perform text translation.

static String

Broadcast Action: A uid has been removed from the system.

static String

Broadcast Action: The device has entered USB Mass Storage mode.

static String

Broadcast Action: The device has exited USB Mass Storage mode.

static String

Broadcast Action: Sent to the responsible installer of an archived package when unarchival is requested.

static String

Activity Action: Launch application uninstaller.

static String

Sent after a user switch is complete, if the switch caused the process's user to be sent to the background.

static String

Sent after a user switch is complete, if the switch caused the process's user to be brought to the foreground.

static String

Sent the first time a user is starting, to allow system apps to perform one time initialization.

static String

Broadcast Action: Sent when the user is present after device wakes up (e.g when the keyguard is gone).

static String

Broadcast Action: Sent when the credential-encrypted private storage has become unlocked for the target user.

static String

Activity Action: Display the data to the user.

static String

Activity Action: Display an activity state associated with an unique LocusId.

static String

Activity action: Launch UI to show information about the usage of a given permission group.

static String

Activity action: Launch UI to show information about the usage of a given permission group in a given period.

static String

Activity Action: Start Voice Command.

static String

Broadcast Action: The current system wallpaper has changed.

static String

Activity Action: Perform a web search.

static Int

A response code used with EXTRA_CAPTURE_CONTENT_FOR_NOTE_STATUS_CODE to indicate that screenshot is blocked by IT admin.

static Int

A response code used with EXTRA_CAPTURE_CONTENT_FOR_NOTE_STATUS_CODE to indicate that something went wrong.

static Int

A response code used with EXTRA_CAPTURE_CONTENT_FOR_NOTE_STATUS_CODE to indicate that the request was a success.

static Int

A response code used with EXTRA_CAPTURE_CONTENT_FOR_NOTE_STATUS_CODE to indicate that user canceled the content capture flow.

static Int

A response code used with EXTRA_CAPTURE_CONTENT_FOR_NOTE_STATUS_CODE to indicate that the intent action ACTION_LAUNCH_CAPTURE_CONTENT_ACTIVITY_FOR_NOTE was started by an activity that is running in a non-supported window mode.

static String

The accessibility shortcut is a global gesture for users with disabilities to trigger an important for them accessibility feature to help developers determine whether they want to make their activity a shortcut target.

static String

Set if the activity should be considered as an alternative action to the data the user is currently viewing.

static String

Used with ACTION_MAIN to launch the browser application.

static String

Used with ACTION_MAIN to launch the calculator application.

static String

Used with ACTION_MAIN to launch the calendar application.

static String

Used with ACTION_MAIN to launch the contacts application.

static String

Used with ACTION_MAIN to launch the email application.

static String

Used with ACTION_MAIN to launch the files application.

static String

Used with ACTION_MAIN to launch the fitness application.

static String

Used with ACTION_MAIN to launch the gallery application.

static String

Used with ACTION_MAIN to launch the maps application.

static String

This activity allows the user to browse and download new applications.

static String

Used with ACTION_MAIN to launch the messaging application.

static String

Used with ACTION_MAIN to launch the music application.

static String

Used with ACTION_MAIN to launch the weather application.

static String

Activities that can be safely invoked from a browser must support this category.

static String

An activity to run when device is inserted into a car dock.

static String

Used to indicate that the activity can be used in a car environment.

static String

Set if the activity should be an option for the default action (center press) to perform on a piece of data.

static String

An activity to run when device is inserted into a desk dock.

static String

This activity is a development preference panel.

static String

Capable of running inside a parent activity container.

static String

To be used as code under test for framework instrumentation tests.

static String

An activity to run when device is inserted into a digital (high end) dock.

static String

This is the home activity, that is the first activity that is displayed when the device boots.

static String

Provides information about the package it is in; typically used if a package does not contain a CATEGORY_LAUNCHER to provide a front-door to the user without having to be shown in the all apps list.

static String

Should be displayed in the top-level launcher.

static String

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

static String

An activity to run when device is inserted into a analog (low end) dock.

static String

This activity may be exercised by the monkey or other automated test tools.

static String

Used to indicate that an intent only wants URIs that can be opened with ContentResolver#openFileDescriptor(Uri, String).

static String

This activity is a preference panel.

static String

To be used as a sample code example (not part of the normal user experience).

static String

The home activity shown on secondary displays that support showing home activities.

static String

Set if the activity should be considered as an alternative selection action to the data the user has currently selected.

static String

Intended to be used as a tab inside of a containing TabActivity.

static String

To be used as a test (not part of the normal user experience).

static String

Used to indicate that an intent filter can accept files which are not necessarily openable by ContentResolver#openFileDescriptor(Uri, String), but at least streamable via ContentResolver#openTypedAssetFileDescriptor(Uri, String, Bundle) using one of the stream types exposed via ContentResolver#getStreamTypes(Uri, String).

static String

To be used as a unit test (run through the Test Harness).

static String

Categories for activities that can participate in voice interaction.

static String

An activity to use for the launcher when the device is placed in a VR Headset viewer.

static Int

Indicates that the content being shared with ACTION_SEND represents an album (e.g. containing photos).

static String

Used as an int extra field in android.app.AlarmManager pending intents to tell the application being invoked how many pending alarms are being delivered with the intent.

static String

Extra used to indicate that an intent can allow the user to select and return multiple items.

static String

Used as a boolean extra field with ACTION_INSTALL_PACKAGE to install a package.

static String

An Intent[] describing additional, alternate choices you would like shown with ACTION_CHOOSER.

static String

Used as a boolean extra field in android.content.Intent#ACTION_PACKAGE_ADDED and android.content.Intent#ACTION_PACKAGE_REMOVED intents to indicate that the package is being archived.

static String

An optional field on ACTION_ASSIST and containing additional contextual information supplied by the current foreground app at the time of the assist request.

static String

An optional field on ACTION_ASSIST containing the InputDevice id that was used to invoke the assist.

static String

An optional field on ACTION_ASSIST suggesting that the user will likely use a keyboard as the primary input device for assistance.

static String

An optional field on ACTION_ASSIST containing the name of the current foreground application package at the time the assist was invoked.

static String

An optional field on ACTION_ASSIST containing the uid of the current foreground application package at the time the assist was invoked.

static String

A String[] holding attribution tags when used with ACTION_VIEW_PERMISSION_USAGE_FOR_PERIOD and ACTION_MANAGE_PERMISSION_USAGE E.

static String

Used as a boolean extra field in ACTION_CHOOSER intents to specify whether to show the chooser or not when there is only one application available to choose from.

static String

A String[] holding e-mail addresses that should be blind carbon copied.

static String

Used as a parcelable extra field in ACTION_APP_ERROR, containing the bug report.

static String

An int extra used by activity started with ACTION_LAUNCH_CAPTURE_CONTENT_ACTIVITY_FOR_NOTE to indicate status of the response.

static String

A String[] holding e-mail addresses that should be carbon copied.

static String

static String

This field is part of android.content.Intent#ACTION_PACKAGE_CHANGED, and contains a string array of all of the components that have changed.

static String

This field is part of android.content.Intent#ACTION_EXTERNAL_APPLICATIONS_AVAILABLE, android.content.Intent#ACTION_EXTERNAL_APPLICATIONS_UNAVAILABLE, android.content.Intent#ACTION_PACKAGES_SUSPENDED, android.content.Intent#ACTION_PACKAGES_UNSUSPENDED and contains a string array of all of the components that have changed.

static String

This field is part of android.content.Intent#ACTION_EXTERNAL_APPLICATIONS_AVAILABLE, android.content.Intent#ACTION_EXTERNAL_APPLICATIONS_UNAVAILABLE and contains an integer array of uids of all of the components that have changed.

static String

Optional argument used to provide a ContentProviderUri to an ACTION_CHOOSER Intent which allows additional toggleable items to be included in the sharing UI.

static String

Optional integer extra to be used with ACTION_CHOOSER to describe conteng being shared.

static String

A Parcelable[] of ChooserAction objects to provide the Android Sharesheet with app-specific actions to be presented to the user when invoking ACTION_CHOOSER.

static String

Optional argument to be used with EXTRA_CHOOSER_ADDITIONAL_CONTENT_URI, used in combination with EXTRA_CHOOSER_ADDITIONAL_CONTENT_URI.

static String

Optional argument to be used with ACTION_CHOOSER.

static String

An IntentSender for an Activity that will be invoked when the user makes a selection from the chooser activity presented by ACTION_CHOOSER.

static String

A ChooserResult which describes how the sharing session completed.

static String

An IntentSender that will be notified when a user successfully chooses a target component or initiates an action such as copy or edit within an ACTION_CHOOSER activity.

static String

A ChooserTarget[] for ACTION_CHOOSER describing additional high-priority deep-link targets for the chooser to present to the user.

static String

The ComponentName chosen by the user to complete an action.

static String

An IntentSender that will be notified if a user successfully chooses a target component to handle an action in an ACTION_CHOOSER activity.

static String

Intent extra: A ComponentName value.

static String

An ArrayList of String annotations describing content for ACTION_CHOOSER.

static String

Optional CharSequence extra to provide a search query.

static String

Used as a boolean extra field in android.content.Intent#ACTION_PACKAGE_REMOVED intents to indicate whether this represents a full uninstall (removing both the code and its data) or a partial uninstall (leaving its data, implying that this is an update).

static String

Used as an int extra field in android.content.Intent#ACTION_DOCK_EVENT intents to request the dock state.

static Int

Used as an int value for android.content.Intent#EXTRA_DOCK_STATE to represent that the phone is in a car dock.

static Int

Used as an int value for android.content.Intent#EXTRA_DOCK_STATE to represent that the phone is in a desk dock.

static Int

Used as an int value for android.content.Intent#EXTRA_DOCK_STATE to represent that the phone is in a digital (high end) dock.

static Int

Used as an int value for android.content.Intent#EXTRA_DOCK_STATE to represent that the phone is in a analog (low end) dock.

static Int

Used as an int value for android.content.Intent#EXTRA_DOCK_STATE to represent that the phone is not in any dock.

static String

Used as a boolean extra field in android.content.Intent#ACTION_PACKAGE_REMOVED or android.content.Intent#ACTION_PACKAGE_CHANGED intents to override the default action of restarting the application.

static String

Intent extra: The number of milliseconds.

static String

A String[] holding e-mail addresses that should be delivered to.

static String

A long representing the end timestamp (epoch time in millis) of the permission usage when used with ACTION_VIEW_PERMISSION_USAGE_FOR_PERIOD and ACTION_MANAGE_PERMISSION_USAGE

static String

A ComponentName[] describing components that should be filtered out and omitted from a list of components presented to the user.

static String

Extra that can be included on activity intents coming from the storage UI when it launches sub-activities to manage various types of storage.

static String

A constant String that is associated with the Intent, used with ACTION_SEND to supply an alternative to EXTRA_TEXT as HTML formatted text.

static String

Optional index with semantics depending on the intent action.

static String

A Parcelable[] of Intent or android.content.pm.LabeledIntent objects as set with putExtra(java.lang.String,android.os.Parcelable[]) to place at the front of the list of choices, when shown to the user with an ACTION_CHOOSER.

static String

Used as a string extra field with ACTION_INSTALL_PACKAGE to install a package.

static String

An Intent describing the choices you would like shown with ACTION_PICK_ACTIVITY or ACTION_CHOOSER.

static String

A android.view.KeyEvent object containing the event that triggered the creation of the Intent it is in.

static String

Intent extra: A android.os.LocaleList

static String

Extra used to indicate that an intent should only return data that is on the local device.

static String

Intent extra: ID of the context used on ACTION_VIEW_LOCUS.

static String

A CharSequence of additional text describing the content being shared.

static String

Extra used to communicate a set of acceptable MIME types.

static String

Used as a boolean extra field with ACTION_INSTALL_PACKAGE to install a package.

static String

Used as a URI extra field with ACTION_INSTALL_PACKAGE and ACTION_VIEW to indicate the URI from which the local APK in the Intent data field originated from.

static String

String array of package names.

static String

Intent extra: An app package name.

static String

Intent extra: The name of a permission group.

static String

A String holding the phone number originally entered in android.content.Intent#ACTION_NEW_OUTGOING_CALL, or the actual number to call in a android.content.Intent#ACTION_CALL.

static String

The name of the extra used to define the text to be processed, as a CharSequence.

static String

The name of the boolean extra used to define if the processed text will be used as read-only.

static String

An optional extra of String[] indicating which quick view features should be made available to the user in the quick view UI while handing a Intent#ACTION_QUICK_VIEW intent.

static String

Optional boolean extra indicating whether quiet mode has been switched on or off.

static String

This extra can be used with any Intent used to launch an activity, supplying information about who is launching that activity.

static String

Alternate version of EXTRA_REFERRER that supplies the URI as a String rather than a android.net.Uri object.

static String

Used in the extra field in the remote intent.

static String

A Bundle forming a mapping of potential target package names to different extras Bundles to add to the default intent extras in EXTRA_INTENT when used with ACTION_CHOOSER.

static String

Used as a boolean extra field in android.content.Intent#ACTION_PACKAGE_REMOVED intents to indicate that this is a replacement of the package, so this broadcast will immediately be followed by an add broadcast for a different version of the same package.

static String

Extra sent in the intent to the BroadcastReceiver that handles ACTION_GET_RESTRICTION_ENTRIES.

static String

Extra used in the response from a BroadcastReceiver that handles ACTION_GET_RESTRICTION_ENTRIES.

static String

Extra used in the response from a BroadcastReceiver that handles ACTION_GET_RESTRICTION_ENTRIES.

static String

A ResultReceiver used to return data back to the sender.

static String

Used as a boolean extra field with ACTION_INSTALL_PACKAGE or ACTION_UNINSTALL_PACKAGE.

static String

The name of the extra used to define the icon, as a Bitmap, of a shortcut.

static String

The name of the extra used to define the icon, as a ShortcutIconResource, of a shortcut.

static String

Intent extra: ID of the shortcut used to send the share intent.

static String

The name of the extra used to define the Intent of a shortcut.

static String

The name of the extra used to define the name of a shortcut.

static String

Optional extra for ACTION_SHUTDOWN that allows the sender to qualify that this shutdown is only for the user space of the system, not a complete shutdown.

static String

Intent extra: An app split name.

static String

A long representing the start timestamp (epoch time in millis) of the permission usage when used with ACTION_VIEW_PERMISSION_USAGE_FOR_PERIOD and ACTION_MANAGE_PERMISSION_USAGE

static String

A content: URI holding a stream of data associated with the Intent, used with ACTION_SEND to supply the data being sent.

static String

A constant string holding the desired subject line of a message.

static String

Intent extra: A Bundle of extras for a package being suspended.

static String

The initial data to place in a newly created record.

static String

A constant CharSequence that is associated with the Intent, used with ACTION_SEND to supply the literal data to be sent.

static String

Optional extra specifying a time in milliseconds.

static String

Extra sent with ACTION_TIMEZONE_CHANGED specifying the new time zone of the device.

static String

A CharSequence dialog title to provide to the user when used with a ACTION_CHOOSER.

static String

Used as an int extra field in android.content.Intent#ACTION_UID_REMOVED intents to supply the uid the package had been assigned.

static String

The UserHandle carried with intents.

static String

Used as a boolean extra field in android.content.Intent#ACTION_PACKAGE_REMOVED intents to signal that the application was removed with the user-initiated action.

static String

A boolean extra used with ACTION_CREATE_NOTE indicating whether the launched note-taking activity should show a UI that is suitable to use with stylus input.

static Int

Use with fillIn to allow the current action value to be overwritten, even if it is already set.

static Int

Use with fillIn to allow the current categories to be overwritten, even if they are already set.

static Int

Use with fillIn to allow the current ClipData to be overwritten, even if it is already set.

static Int

Use with fillIn to allow the current component value to be overwritten, even if it is already set.

static Int

Use with fillIn to allow the current data or type value overwritten, even if it is already set.

static Int

Use with fillIn to allow the current identifier value to be overwritten, even if it is already set.

static Int

Use with fillIn to allow the current package value to be overwritten, even if it is already set.

static Int

Use with fillIn to allow the current selector to be overwritten, even if it is already set.

static Int

Use with fillIn to allow the current bounds rectangle to be overwritten, even if it is already set.

static Int

This flag is not normally set by application code, but set for you by the system as described in the launchMode documentation for the singleTask mode.

static Int

If set in an Intent passed to android.

static Int

If set, and the activity being launched is already running in the current task, then instead of launching a new instance of that activity, all of the other activities on top of it will be closed and this Intent will be delivered to the (now on top) old activity as a new Intent.

static Int

static Int

If set, the new activity is not kept in the list of recently launched activities.

static Int

If set and this intent is being used to launch a new activity from an existing one, then the reply target of the existing activity will be transferred to the new activity.

static Int

This flag is not normally set by application code, but set for you by the system if this activity is being launched from history.

static Int

This flag is only used for split-screen multi-window mode.

static Int

If set in an Intent passed to android.

static Int

This flag is used to create a new task and launch an activity into it.

static Int

This flag is used to open a document into a new task rooted at the activity launched by this Intent.

static Int

If set, this activity will become the start of a new task on this history stack.

static Int

If set in an Intent passed to android.

static Int

If set, the new activity is not kept in the history stack.

static Int

If set, this flag will prevent the normal android.app.Activity#onUserLeaveHint callback from occurring on the current frontmost activity before it is paused as the newly-started activity is brought to the front.

static Int

If set and this intent is being used to launch a new activity from an existing one, the current activity will not be counted as the top activity for deciding whether the new intent should be delivered to the top instead of starting a new one.

static Int

If set in an Intent passed to android.

static Int

If set in an intent passed to android.

static Int

If set in an intent passed to android.

static Int

If set, and this activity is either being started in a new task or bringing to the top an existing task, then it will be launched as the front door of the task.

static Int

By default a document created by FLAG_ACTIVITY_NEW_DOCUMENT will have its entry in recent tasks removed when the user closes it (with back or however else it may finish()).

static Int

If set, the activity will not be launched if it is already running at the top of the history stack.

static Int

If set in an Intent passed to android.

static Int

A flag you can enable for debugging: when set, log messages will be printed during the resolution of this intent to show you what has been found to create the final resolved list.

static Int

Flag used to automatically match intents based on their Direct Boot awareness and the current user state.

static Int

If set, this intent will not match any components in packages that are currently stopped.

static Int

Can be set by the caller to indicate that this Intent is coming from a background operation, not from direct user interaction.

static Int

When combined with FLAG_GRANT_READ_URI_PERMISSION and/or FLAG_GRANT_WRITE_URI_PERMISSION, the URI permission grant can be persisted across device reboots until explicitly revoked with Context#revokeUriPermission(Uri, int).

static Int

When combined with FLAG_GRANT_READ_URI_PERMISSION and/or FLAG_GRANT_WRITE_URI_PERMISSION, the URI permission grant applies to any URI that is a prefix match against the original granted URI.

static Int

If set, the recipient of this Intent will be granted permission to perform read operations on the URI in the Intent's data and any URIs specified in its ClipData.

static Int

If set, the recipient of this Intent will be granted permission to perform write operations on the URI in the Intent's data and any URIs specified in its ClipData.

static Int

If set, this intent will always match any components in packages that are currently stopped.

static Int

If set, when sending a broadcast the recipient is allowed to run at foreground priority, with a shorter timeout interval.

static Int

If this is an ordered broadcast, don't allow receivers to abort the broadcast.

static Int

If set, when sending a broadcast only registered receivers will be called -- no BroadcastReceiver components will be launched.

static Int

If set, when sending a broadcast the new broadcast will replace any existing pending broadcast that matches it.

static Int

If set, the broadcast will be visible to receivers in Instant Apps.

static String

Boolean that can be supplied as meta-data with a dock activity, to indicate that the dock should take over the home key when it is active.

static Int

Flag for use with toUri and parseUri: allow parsing of unsafe information.

static Int

Flag for use with toUri and parseUri: the URI string always has the "android-app:" scheme.

static Int

Flag for use with toUri and parseUri: the URI string always has the "intent:" scheme.

Inherited constants
Public constructors

Create an empty intent.

Copy constructor.

Intent(action: String!)

Create an intent with a given action.

Intent(action: String!, uri: Uri!)

Create an intent with a given action and for a given data url.

Intent(packageContext: Context!, cls: Class<*>!)

Create an intent for a specific component.

Intent(action: String!, uri: Uri!, packageContext: Context!, cls: Class<*>!)

Create an intent for a specific component with a specified action and data.

Public methods
open Intent
addCategory(category: String!)

Add a new category to the intent.

open Intent
addFlags(flags: Int)

Add additional flags to the intent (or with existing flags value).

open Any

open Intent

Make a clone of only the parts of the Intent that are relevant for filter matching: the action, data, type, component, and categories.

open static Intent!
createChooser(target: Intent!, title: CharSequence!)

Convenience function for creating a ACTION_CHOOSER Intent.

open static Intent!
createChooser(target: Intent!, title: CharSequence!, sender: IntentSender!)

Convenience function for creating a ACTION_CHOOSER Intent.

open Int

open Int
fillIn(other: Intent, flags: Int)

Copy the contents of other in to this object, but only where fields are not defined by this object.

open Boolean

Determine if two intents are the same for the purposes of intent resolution (filtering).

open Int

Generate hash code that matches semantics of filterEquals().

open String?

Retrieve the general action to be performed, such as ACTION_VIEW.

open BooleanArray?

Retrieve extended data from the intent.

open Boolean
getBooleanExtra(name: String!, defaultValue: Boolean)

Retrieve extended data from the intent.

open Bundle?

Retrieve extended data from the intent.

open ByteArray?

Retrieve extended data from the intent.

open Byte
getByteExtra(name: String!, defaultValue: Byte)

Retrieve extended data from the intent.

open MutableSet<String!>!

Return the set of all categories in the intent.

open CharArray?

Retrieve extended data from the intent.

open Char
getCharExtra(name: String!, defaultValue: Char)

Retrieve extended data from the intent.

open Array<CharSequence!>?

Retrieve extended data from the intent.

open ArrayList<CharSequence!>?

Retrieve extended data from the intent.

open CharSequence?

Retrieve extended data from the intent.

open ClipData?

Return the ClipData associated with this Intent.

open ComponentName?

Retrieve the concrete component associated with the intent.

open Uri?

Retrieve data this intent is operating on.

open String?

The same as getData(), but returns the URI as an encoded String.

open DoubleArray?

Retrieve extended data from the intent.

open Double
getDoubleExtra(name: String!, defaultValue: Double)

Retrieve extended data from the intent.

open Bundle?

Retrieves a map of extended data from the intent.

open Int

Retrieve any special flags associated with this intent.

open FloatArray?

Retrieve extended data from the intent.

open Float
getFloatExtra(name: String!, defaultValue: Float)

Retrieve extended data from the intent.

open String?

Retrieve the identifier for this Intent.

open IntArray?

Retrieve extended data from the intent.

open Int
getIntExtra(name: String!, defaultValue: Int)

Retrieve extended data from the intent.

open ArrayList<Int!>?

Retrieve extended data from the intent.

open static Intent!

Call parseUri with 0 flags.

open static Intent!

open LongArray?

Retrieve extended data from the intent.

open Long
getLongExtra(name: String!, defaultValue: Long)

Retrieve extended data from the intent.

open String?

Retrieve the application package name this Intent is limited to.

open Array<Parcelable!>?

Retrieve extended data from the intent.

open Array<T>?
getParcelableArrayExtra(name: String?, clazz: Class<T>)

Retrieve extended data from the intent.

open ArrayList<T>?

Retrieve extended data from the intent.

open ArrayList<T>?
getParcelableArrayListExtra(name: String?, clazz: Class<out T>)

Retrieve extended data from the intent.

open T?

Retrieve extended data from the intent.

open T?
getParcelableExtra(name: String?, clazz: Class<T>)

Retrieve extended data from the intent.

open String?

Return the scheme portion of the intent's data.

open Intent?

Return the specific selector associated with this Intent.

open Serializable?

Retrieve extended data from the intent.

open T?
getSerializableExtra(name: String?, clazz: Class<T>)

Retrieve extended data from the intent.

open ShortArray?

Retrieve extended data from the intent.

open Short
getShortExtra(name: String!, defaultValue: Short)

Retrieve extended data from the intent.

open Rect?

Get the bounds of the sender of this intent, in screen coordinates.

open Array<String!>?

Retrieve extended data from the intent.

open ArrayList<String!>?

Retrieve extended data from the intent.

open String?

Retrieve extended data from the intent.

open String?

Retrieve any explicit MIME type included in the intent.

open Boolean
hasCategory(category: String!)

Check if a category exists in the intent.

open Boolean
hasExtra(name: String!)

Returns true if an extra value is associated with the given name.

open Boolean

Returns true if the Intent's extras contain a parcelled file descriptor.

open Boolean

Whether the intent mismatches all intent filters declared in the receiving component.

open static Intent!

Create an intent to launch the main (root) activity of a task.

open static Intent!
makeMainSelectorActivity(selectorAction: String!, selectorCategory: String!)

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.

open static Intent!

Make an Intent that can be used to re-launch an application's task in its base state.

open static String?

Normalize a MIME data type.

open static Intent
parseIntent(resources: Resources, parser: XmlPullParser, attrs: AttributeSet!)

Parses the "intent" element (and its children) from XML and instantiates an Intent object.

open static Intent!
parseUri(uri: String!, flags: Int)

Create an intent from a URI.

open Intent

Add extended data to the intent.

open Intent
putExtra(name: String!, value: Boolean)

Add extended data to the intent.

open Intent
putExtra(name: String!, value: Byte)

Add extended data to the intent.

open Intent
putExtra(name: String!, value: Char)

Add extended data to the intent.

open Intent
putExtra(name: String!, value: Short)

Add extended data to the intent.

open Intent
putExtra(name: String!, value: Int)

Add extended data to the intent.

open Intent
putExtra(name: String!, value: Long)

Add extended data to the intent.

open Intent
putExtra(name: String!, value: Float)

Add extended data to the intent.

open Intent
putExtra(name: String!, value: Double)

Add extended data to the intent.

open Intent
putExtra(name: String!, value: String?)

Add extended data to the intent.

open Intent
putExtra(name: String!, value: CharSequence?)

Add extended data to the intent.

open Intent
putExtra(name: String!, value: Parcelable?)

Add extended data to the intent.

open Intent
putExtra(name: String!, value: Array<Parcelable!>?)

Add extended data to the intent.

open Intent
putExtra(name: String!, value: Serializable?)

Add extended data to the intent.

open Intent
putExtra(name: String!, value: BooleanArray?)

Add extended data to the intent.

open Intent
putExtra(name: String!, value: ByteArray?)

Add extended data to the intent.

open Intent
putExtra(name: String!, value: ShortArray?)

Add extended data to the intent.

open Intent
putExtra(name: String!, value: CharArray?)

Add extended data to the intent.

open Intent
putExtra(name: String!, value: IntArray?)

Add extended data to the intent.

open Intent
putExtra(name: String!, value: LongArray?)

Add extended data to the intent.

open Intent
putExtra(name: String!, value: FloatArray?)

Add extended data to the intent.

open Intent
putExtra(name: String!, value: DoubleArray?)

Add extended data to the intent.

open Intent
putExtra(name: String!, value: Array<String!>?)

Add extended data to the intent.

open Intent
putExtra(name: String!, value: Array<CharSequence!>?)

Add extended data to the intent.

open Intent
putExtra(name: String!, value: Bundle?)

Add extended data to the intent.

open Intent

Copy all extras in 'src' in to this intent.

open Intent
putExtras(extras: Bundle)

Add a set of extended data to the intent.

open Intent

Add extended data to the intent.

open Intent

Add extended data to the intent.

open Intent

Add extended data to the intent.

open Unit

open Unit
removeCategory(category: String!)

Remove a category from an intent.

open Unit

Remove extended data from the intent.

open Unit
removeFlags(flags: Int)

Remove these flags from the intent.

open Intent

Completely replace the extras in the Intent with the extras in the given Intent.

open Intent

Completely replace the extras in the Intent with the given Bundle of extras.

open ComponentName!

Return the Activity component that should be used to handle this intent.

open ActivityInfo!

Resolve the Intent into an ActivityInfo describing the activity that should execute the intent.

open String?
resolveType(context: Context)

Return the MIME data type of this intent.

open String?

Return the MIME data type of this intent.

open String?

Return the MIME data type of this intent, only if it will be needed for intent resolution.

open Intent
setAction(action: String?)

Set the general action to be performed.

open Intent
setClass(packageContext: Context, cls: Class<*>)

Convenience for calling setComponent(android.content.ComponentName) with the name returned by a Class object.

open Intent
setClassName(packageContext: Context, className: String)

Convenience for calling setComponent with an explicit class name.

open Intent
setClassName(packageName: String, className: String)

Convenience for calling setComponent with an explicit application package name and class name.

open Unit

Set a ClipData associated with this Intent.

open Intent

(Usually optional) Explicitly set the component to handle the intent.

open Intent
setData(data: Uri?)

Set the data this intent is operating on.

open Intent

Normalize and set the data this intent is operating on.

open Intent
setDataAndType(data: Uri?, type: String?)

(Usually optional) Set the data for the intent along with an explicit MIME data type.

open Intent

(Usually optional) Normalize and set both the data Uri and an explicit MIME data type.

open Unit

Sets the ClassLoader that will be used when unmarshalling any Parcelable values from the extras of this Intent.

open Intent
setFlags(flags: Int)

Set special flags controlling how this intent is handled.

open Intent
setIdentifier(identifier: String?)

Set an identifier for this Intent.

open Intent
setPackage(packageName: String?)

(Usually optional) Set an explicit application package name that limits the components this Intent will resolve to.

open Unit
setSelector(selector: Intent?)

Set a selector for this Intent.

open Unit

Set the bounds of the sender of this intent, in screen coordinates.

open Intent
setType(type: String?)

Set an explicit MIME data type.

open Intent

Normalize and set an explicit MIME data type.

open String

open String!

Call toUri with 0 flags.

open String!
toUri(flags: Int)

Convert this Intent into a String holding a URI representation of it.

open Unit
writeToParcel(out: Parcel, flags: Int)

Properties
static Parcelable.Creator<Intent!>

Constants

ACTION_AIRPLANE_MODE_CHANGED

Added in API level 1
static val ACTION_AIRPLANE_MODE_CHANGED: String

Broadcast Action: The user has switched the phone into or out of Airplane Mode. One or more radios have been turned off or on. The intent will have the following extra value:

  • state - A boolean value indicating whether Airplane Mode is on. If true, then cell radio and possibly other radios such as bluetooth or WiFi may have also been turned off

This is a protected intent that can only be sent by the system.

Value: "android.intent.action.AIRPLANE_MODE"

ACTION_ALL_APPS

Added in API level 1
static val ACTION_ALL_APPS: String

Activity Action: List all available applications.

Input: Nothing.

Output: nothing.

Value: "android.intent.action.ALL_APPS"

ACTION_ANSWER

Added in API level 1
static val ACTION_ANSWER: String

Activity Action: Handle an incoming phone call.

Input: nothing.

Output: nothing.

Value: "android.intent.action.ANSWER"

ACTION_APPLICATION_LOCALE_CHANGED

Added in API level 33
static val ACTION_APPLICATION_LOCALE_CHANGED: String

Broadcast Action: Locale of a particular app has changed.

This broadcast is explicitly sent to the android.content.pm.InstallSourceInfo#getInstallingPackageName installer of the app whose locale has changed.

The broadcast could also be received by manifest-declared receivers with android.permission.READ_APP_SPECIFIC_LOCALES

This is a protected intent that can only be sent by the system.

Includes the following extras:

Value: "android.intent.action.APPLICATION_LOCALE_CHANGED"

ACTION_APPLICATION_PREFERENCES

Added in API level 24
static val ACTION_APPLICATION_PREFERENCES: String

An activity that provides a user interface for adjusting application preferences. Optional but recommended settings for all applications which have settings.

Value: "android.intent.action.APPLICATION_PREFERENCES"

ACTION_APPLICATION_RESTRICTIONS_CHANGED

Added in API level 21
static val ACTION_APPLICATION_RESTRICTIONS_CHANGED: String

Broadcast Action: Sent after application restrictions are changed.

This is a protected intent that can only be sent by the system.

Value: "android.intent.action.APPLICATION_RESTRICTIONS_CHANGED"

ACTION_APP_ERROR

Added in API level 14
static val ACTION_APP_ERROR: String

Activity Action: The user pressed the "Report" button in the crash/ANR dialog. This intent is delivered to the package which installed the application, usually Google Play.

Input: No data is specified. The bug report is passed in using an EXTRA_BUG_REPORT field.

Output: Nothing.

Value: "android.intent.action.APP_ERROR"

ACTION_ASSIST

Added in API level 16
static val ACTION_ASSIST: String

Activity Action: Perform assist action.

Input: EXTRA_ASSIST_PACKAGE, EXTRA_ASSIST_CONTEXT, can provide additional optional contextual information about where the user was when they requested the assist; EXTRA_REFERRER may be set with additional referrer information. Output: nothing.

Value: "android.intent.action.ASSIST"

ACTION_ATTACH_DATA

Added in API level 1
static val ACTION_ATTACH_DATA: String

Used to indicate that some piece of data should be attached to some other place. For example, image data could be attached to a contact. It is up to the recipient to decide where the data should be attached; the intent does not specify the ultimate destination.

Input: getData is URI of data to be attached.

Output: nothing.

Value: "android.intent.action.ATTACH_DATA"

ACTION_AUTO_REVOKE_PERMISSIONS

Added in API level 30
static val ACTION_AUTO_REVOKE_PERMISSIONS: String

Activity action: Launch UI to manage auto-revoke state. This is equivalent to Intent#ACTION_APPLICATION_DETAILS_SETTINGS

Input: data should be a package-scheme Uri with a package name, whose auto-revoke state will be reviewed (mandatory). E.g. Uri.fromParts("package", packageName, null)

Output: Nothing.

Value: "android.intent.action.AUTO_REVOKE_PERMISSIONS"

ACTION_BATTERY_CHANGED

Added in API level 1
static val ACTION_BATTERY_CHANGED: String

Broadcast Action: This is a sticky broadcast containing the charging state, level, and other information about the battery. See android.os.BatteryManager for documentation on the contents of the Intent.

You cannot receive this through components declared in manifests, only by explicitly registering for it with Context.registerReceiver(). See ACTION_BATTERY_LOW, ACTION_BATTERY_OKAY, ACTION_POWER_CONNECTED, and ACTION_POWER_DISCONNECTED for distinct battery-related broadcasts that are sent and can be received through manifest receivers.

This is a protected intent that can only be sent by the system.

Value: "android.intent.action.BATTERY_CHANGED"

ACTION_BATTERY_LOW

Added in API level 1
static val ACTION_BATTERY_LOW: String

Broadcast Action: Indicates low battery condition on the device. This broadcast corresponds to the "Low battery warning" system dialog.

This is a protected intent that can only be sent by the system.

Value: "android.intent.action.BATTERY_LOW"

ACTION_BATTERY_OKAY

Added in API level 4
static val ACTION_BATTERY_OKAY: String

Broadcast Action: Indicates the battery is now okay after being low. This will be sent after ACTION_BATTERY_LOW once the battery has gone back up to an okay state.

This is a protected intent that can only be sent by the system.

Value: "android.intent.action.BATTERY_OKAY"

ACTION_BOOT_COMPLETED

Added in API level 1
static val ACTION_BOOT_COMPLETED: String

Broadcast Action: This is broadcast once, after the user has finished booting. It can be used to perform application-specific initialization, such as installing alarms. You must hold the android.Manifest.permission#RECEIVE_BOOT_COMPLETED permission in order to receive this broadcast.

This broadcast is sent at boot by all devices (both with and without direct boot support). Upon receipt of this broadcast, the user is unlocked and both device-protected and credential-protected storage can accessed safely.

If you need to run while the user is still locked (before they've entered their lock pattern or PIN for the first time), you can listen for the ACTION_LOCKED_BOOT_COMPLETED broadcast.

This is a protected intent that can only be sent by the system.

Value: "android.intent.action.BOOT_COMPLETED"

ACTION_BUG_REPORT

Added in API level 1
static val ACTION_BUG_REPORT: String

Activity Action: Show activity for reporting a bug.

Input: Nothing.

Output: Nothing.

Value: "android.intent.action.BUG_REPORT"

ACTION_CALL

Added in API level 1
static val ACTION_CALL: String

Activity Action: Perform a call to someone specified by the data.

Input: If nothing, an empty dialer is started; else getData is URI of a phone number to be dialed or a tel: URI of an explicit phone number.

Output: nothing.

Note: there will be restrictions on which applications can initiate a call; most applications should use the ACTION_DIAL.

Note: this Intent cannot be used to call emergency numbers. Applications can dial emergency numbers using ACTION_DIAL, however.

Note: This Intent can only be used to dial call forwarding MMI codes if the application using this intent is set as the default or system dialer. The system will treat any other application using this Intent for the purpose of dialing call forwarding MMI codes as if the ACTION_DIAL Intent was used instead.

Note: An app filling the android.app.role.RoleManager#ROLE_DIALER role should use android.telecom.TelecomManager#placeCall(Uri, Bundle) to place calls rather than relying on this intent.

Note: if you app targets M and above and declares as using the android.Manifest.permission#CALL_PHONE permission which is not granted, then attempting to use this action will result in a java.lang.SecurityException.

Value: "android.intent.action.CALL"

ACTION_CALL_BUTTON

Added in API level 1
static val ACTION_CALL_BUTTON: String

Activity Action: The user pressed the "call" button to go to the dialer or other appropriate UI for placing a call.

Input: Nothing.

Output: Nothing.

Value: "android.intent.action.CALL_BUTTON"

ACTION_CAMERA_BUTTON

Added in API level 1
static val ACTION_CAMERA_BUTTON: String

Broadcast Action: The "Camera Button" was pressed. Includes a single extra field, EXTRA_KEY_EVENT, containing the key event that caused the broadcast.

Value: "android.intent.action.CAMERA_BUTTON"

ACTION_CARRIER_SETUP

Added in API level 26
static val ACTION_CARRIER_SETUP: String

Activity Action: Main entry point for carrier setup apps.

Carrier apps that provide an implementation for this action may be invoked to configure carrier service and typically require carrier privileges to fulfill their duties.

Value: "android.intent.action.CARRIER_SETUP"

ACTION_CHOOSER

Added in API level 1
static val ACTION_CHOOSER: String

Activity Action: Display an activity chooser, allowing the user to pick what they want to before proceeding. This can be used as an alternative to the standard activity picker that is displayed by the system when you try to start an activity with multiple possible matches, with these differences in behavior:

  • You can specify the title that will appear in the activity chooser.
  • The user does not have the option to make one of the matching activities a preferred activity, and all possible activities will always be shown even if one of them is currently marked as the preferred activity.

This action should be used when the user will naturally expect to select an activity in order to proceed. An example if when not to use it is when the user clicks on a "mailto:" link. They would naturally expect to go directly to their mail app, so startActivity() should be called directly: it will either launch the current preferred app, or put up a dialog allowing the user to pick an app to use and optionally marking that as preferred.

In contrast, if the user is selecting a menu item to send a picture they are viewing to someone else, there are many different things they may want to do at this point: send it through e-mail, upload it to a web service, etc. In this case the CHOOSER action should be used, to always present to the user a list of the things they can do, with a nice title given by the caller such as "Send this photo with:".

If you need to grant URI permissions through a chooser, you must specify the permissions to be granted on the ACTION_CHOOSER Intent in addition to the EXTRA_INTENT inside. This means using setClipData to specify the URIs to be granted as well as FLAG_GRANT_READ_URI_PERMISSION and/or FLAG_GRANT_WRITE_URI_PERMISSION as appropriate.

As a convenience, an Intent of this form can be created with the #createChooser function.

Input: No data should be specified. get*Extra must have a EXTRA_INTENT field containing the Intent being executed, and can optionally have a EXTRA_TITLE field containing the title text to display in the chooser.

Output: Depends on the protocol of EXTRA_INTENT.

Value: "android.intent.action.CHOOSER"

ACTION_CLOSE_SYSTEM_DIALOGS

Added in API level 1
Deprecated in API level 31
static val ACTION_CLOSE_SYSTEM_DIALOGS: String

Deprecated: This intent is deprecated for third-party applications starting from Android Build.VERSION_CODES#S for security reasons. Unauthorized usage by applications will result in the broadcast intent being dropped for apps targeting API level less than Build.VERSION_CODES#S and in a SecurityException for apps targeting SDK level Build.VERSION_CODES#S or higher. Instrumentation initiated from the shell (eg. tests) is still able to use the intent. The platform will automatically collapse the proper system dialogs in the proper use-cases. For all others, the user is the one in control of closing dialogs.

Broadcast Action: This is broadcast when a user action should request a temporary system dialog to dismiss. Some examples of temporary system dialogs are the notification window-shade and the recent tasks dialog.
Requires android.Manifest.permission.BROADCAST_CLOSE_SYSTEM_DIALOGS

Value: "android.intent.action.CLOSE_SYSTEM_DIALOGS"

ACTION_CONFIGURATION_CHANGED

Added in API level 1
static val ACTION_CONFIGURATION_CHANGED: String

Broadcast Action: The current device android.content.res.Configuration (orientation, locale, etc) has changed. When such a change happens, the UIs (view hierarchy) will need to be rebuilt based on this new information; for the most part, applications don't need to worry about this, because the system will take care of stopping and restarting the application to make sure it sees the new changes. Some system code that can not be restarted will need to watch for this action and handle it appropriately.

You cannot receive this through components declared in manifests, only by explicitly registering for it with Context.registerReceiver().

This is a protected intent that can only be sent by the system.

Value: "android.intent.action.CONFIGURATION_CHANGED"

ACTION_CREATE_DOCUMENT

Added in API level 19
static val ACTION_CREATE_DOCUMENT: String

Activity Action: Allow the user to create a new document. When invoked, the system will display the various DocumentsProvider instances installed on the device, letting the user navigate through them. The returned document may be a newly created document with no content, or it may be an existing document with the requested MIME type.

Each document is represented as a content:// URI backed by a DocumentsProvider, which can be opened as a stream with ContentResolver#openFileDescriptor(Uri, String), or queried for android.provider.DocumentsContract.Document metadata.

Callers must indicate the concrete MIME type of the document being created by setting setType(java.lang.String). This MIME type cannot be changed after the document is created.

Callers can provide an initial display name through EXTRA_TITLE, but the user may change this value before creating the file.

Callers must include CATEGORY_OPENABLE in the Intent to obtain URIs that can be opened with ContentResolver#openFileDescriptor(Uri, String).

Callers can set a document URI through DocumentsContract#EXTRA_INITIAL_URI to indicate the initial location of documents navigator. System will do its best to launch the navigator in the specified document if it's a folder, or the folder that contains the specified document if not.

Output: The URI of the item that was created. This must be a content:// URI so that any receiver can access it.

Value: "android.intent.action.CREATE_DOCUMENT"

ACTION_CREATE_NOTE

Added in API level 34
static val ACTION_CREATE_NOTE: String

Activity Action: Starts a note-taking activity that can be used to create a note. This action can be used to start an activity on the lock screen. Activity should ensure to appropriately handle privacy sensitive data and features when launched on the lock screen. See android.app.KeyguardManager for lock screen checks.

Value: "android.intent.action.CREATE_NOTE"

ACTION_CREATE_REMINDER

Added in API level 30
static val ACTION_CREATE_REMINDER: String

Activity Action: Creates a reminder.

Input: EXTRA_TITLE The title of the reminder that will be shown to the user. EXTRA_TEXT The reminder text that will be shown to the user. The intent should at least specify a title or a text. EXTRA_TIME The time when the reminder will be shown to the user. The time is specified in milliseconds since the Epoch (optional).

Output: Nothing.

Value: "android.intent.action.CREATE_REMINDER"

ACTION_CREATE_SHORTCUT

Added in API level 1
static val ACTION_CREATE_SHORTCUT: String

Activity Action: Creates a shortcut.

Input: Nothing.

Output: An Intent representing the android.content.pm.ShortcutInfo result.

For compatibility with older versions of android the intent may also contain three extras: SHORTCUT_INTENT (value: Intent), SHORTCUT_NAME (value: String), and SHORTCUT_ICON (value: Bitmap) or SHORTCUT_ICON_RESOURCE (value: ShortcutIconResource).

Value: "android.intent.action.CREATE_SHORTCUT"

ACTION_DATE_CHANGED

Added in API level 1
static val ACTION_DATE_CHANGED: String

Broadcast Action: The date has changed.

Value: "android.intent.action.DATE_CHANGED"

ACTION_DEFAULT

Added in API level 1
static val ACTION_DEFAULT: String

A synonym for ACTION_VIEW, the "standard" action that is performed on a piece of data.

Value: "android.intent.action.VIEW"

ACTION_DEFINE

Added in API level 29
static val ACTION_DEFINE: String

Activity Action: Define the meaning of the selected word(s).

Input: getCharSequence(EXTRA_TEXT) is the text to define.

Output: nothing.

Value: "android.intent.action.DEFINE"

ACTION_DELETE

Added in API level 1
static val ACTION_DELETE: String

Activity Action: Delete the given data from its container.

Input: getData is URI of data to be deleted.

Output: nothing.

Value: "android.intent.action.DELETE"

ACTION_DEVICE_STORAGE_LOW

Added in API level 1
Deprecated in API level 26
static val ACTION_DEVICE_STORAGE_LOW: String

Deprecated: if your app targets android.os.Build.VERSION_CODES#O or above, this broadcast will no longer be delivered to any BroadcastReceiver defined in your manifest. Instead, apps are strongly encouraged to use the improved Context#getCacheDir() behavior so the system can automatically free up storage when needed.

Broadcast Action: A sticky broadcast that indicates low storage space condition on the device

This is a protected intent that can only be sent by the system.

Value: "android.intent.action.DEVICE_STORAGE_LOW"

ACTION_DEVICE_STORAGE_OK

Added in API level 1
Deprecated in API level 26
static val ACTION_DEVICE_STORAGE_OK: String

Deprecated: if your app targets android.os.Build.VERSION_CODES#O or above, this broadcast will no longer be delivered to any BroadcastReceiver defined in your manifest. Instead, apps are strongly encouraged to use the improved Context#getCacheDir() behavior so the system can automatically free up storage when needed.

Broadcast Action: Indicates low storage space condition on the device no longer exists

This is a protected intent that can only be sent by the system.

Value: "android.intent.action.DEVICE_STORAGE_OK"

ACTION_DIAL

Added in API level 1
static val ACTION_DIAL: String

Activity Action: Dial a number as specified by the data. This shows a UI with the number being dialed, allowing the user to explicitly initiate the call.

Input: If nothing, an empty dialer is started; else getData is URI of a phone number to be dialed or a tel: URI of an explicit phone number.

Output: nothing.

Value: "android.intent.action.DIAL"

ACTION_DOCK_EVENT

Added in API level 5
static val ACTION_DOCK_EVENT: String

Broadcast Action: A sticky broadcast for changes in the physical docking state of the device.

The intent will have the following extra values:

  • EXTRA_DOCK_STATE - the current dock state, indicating which dock the device is physically in.

This is intended for monitoring the current physical dock state. See android.app.UiModeManager for the normal API dealing with dock mode changes.

Value: "android.intent.action.DOCK_EVENT"

ACTION_DREAMING_STARTED

Added in API level 17
static val ACTION_DREAMING_STARTED: String

Broadcast Action: Sent after the system starts dreaming.

This is a protected intent that can only be sent by the system. It is only sent to registered receivers.

Value: "android.intent.action.DREAMING_STARTED"

ACTION_DREAMING_STOPPED

Added in API level 17
static val ACTION_DREAMING_STOPPED: String

Broadcast Action: Sent after the system stops dreaming.

This is a protected intent that can only be sent by the system. It is only sent to registered receivers.

Value: "android.intent.action.DREAMING_STOPPED"

ACTION_EDIT

Added in API level 1
static val ACTION_EDIT: String

Activity Action: Provide explicit editable access to the given data.

Input: getData is URI of data to be edited.

Output: nothing.

Value: "android.intent.action.EDIT"

ACTION_EXTERNAL_APPLICATIONS_AVAILABLE

Added in API level 8
static val ACTION_EXTERNAL_APPLICATIONS_AVAILABLE: String

Broadcast Action: Resources for a set of packages (which were previously unavailable) are currently available since the media on which they exist is available. The extra data EXTRA_CHANGED_PACKAGE_LIST contains a list of packages whose availability changed. The extra data EXTRA_CHANGED_UID_LIST contains a list of uids of packages whose availability changed. Note that the packages in this list do not receive this broadcast. The specified set of packages are now available on the system.

Includes the following extras:

  • EXTRA_CHANGED_PACKAGE_LIST is the set of packages whose resources(were previously unavailable) are currently available. EXTRA_CHANGED_UID_LIST is the set of uids of the packages whose resources(were previously unavailable) are currently available.

This is a protected intent that can only be sent by the system.

Value: "android.intent.action.EXTERNAL_APPLICATIONS_AVAILABLE"

ACTION_EXTERNAL_APPLICATIONS_UNAVAILABLE

Added in API level 8
static val ACTION_EXTERNAL_APPLICATIONS_UNAVAILABLE: String

Broadcast Action: Resources for a set of packages are currently unavailable since the media on which they exist is unavailable. The extra data EXTRA_CHANGED_PACKAGE_LIST contains a list of packages whose availability changed. The extra data EXTRA_CHANGED_UID_LIST contains a list of uids of packages whose availability changed. The specified set of packages can no longer be launched and are practically unavailable on the system.

Inclues the following extras:

This is a protected intent that can only be sent by the system.

Value: "android.intent.action.EXTERNAL_APPLICATIONS_UNAVAILABLE"

ACTION_FACTORY_TEST

Added in API level 1
static val ACTION_FACTORY_TEST: String

Activity Action: Main entry point for factory tests. Only used when the device is booting in factory test node. The implementing package must be installed in the system image.

Input: nothing

Output: nothing

Value: "android.intent.action.FACTORY_TEST"

ACTION_GET_CONTENT

Added in API level 1
static val ACTION_GET_CONTENT: String

Activity Action: Allow the user to select a particular kind of data and return it. This is different than ACTION_PICK in that here we just say what kind of data is desired, not a URI of existing data from which the user can pick. An ACTION_GET_CONTENT could allow the user to create the data as it runs (for example taking a picture or recording a sound), let them browse over the web and download the desired data, etc.

There are two main ways to use this action: if you want a specific kind of data, such as a person contact, you set the MIME type to the kind of data you want and launch it with Context#startActivity(Intent). The system will then launch the best application to select that kind of data for you.

You may also be interested in any of a set of types of content the user can pick. For example, an e-mail application that wants to allow the user to add an attachment to an e-mail message can use this action to bring up a list of all of the types of content the user can attach.

In this case, you should wrap the GET_CONTENT intent with a chooser (through #createChooser), which will give the proper interface for the user to pick how to send your data and allow you to specify a prompt indicating what they are doing. You will usually specify a broad MIME type (such as image/* or */*), resulting in a broad range of content types the user can select from.

When using such a broad GET_CONTENT action, it is often desirable to only pick from data that can be represented as a stream. This is accomplished by requiring the CATEGORY_OPENABLE in the Intent.

Callers can optionally specify EXTRA_LOCAL_ONLY to request that the launched content chooser only returns results representing data that is locally available on the device. For example, if this extra is set to true then an image picker should not show any pictures that are available from a remote server but not already on the local device (thus requiring they be downloaded when opened).

If the caller can handle multiple returned items (the user performing multiple selection), then it can specify EXTRA_ALLOW_MULTIPLE to indicate this.

Input: getType is the desired MIME type to retrieve. Note that no URI is supplied in the intent, as there are no constraints on where the returned data originally comes from. You may also include the CATEGORY_OPENABLE if you can only accept data that can be opened as a stream. You may use EXTRA_LOCAL_ONLY to limit content selection to local data. You may use EXTRA_ALLOW_MULTIPLE to allow the user to select multiple items.

Output: The URI of the item that was picked. This must be a content: URI so that any receiver can access it.

Value: "android.intent.action.GET_CONTENT"

ACTION_GET_RESTRICTION_ENTRIES

Added in API level 18
static val ACTION_GET_RESTRICTION_ENTRIES: String

Broadcast to a specific application to query any supported restrictions to impose on restricted users. The broadcast intent contains an extra with the currently persisted restrictions as a Bundle of key/value pairs. The value types can be Boolean, String or String[] depending on the restriction type.

The response should contain an extra EXTRA_RESTRICTIONS_LIST, which is of type ArrayList<RestrictionEntry>. It can also contain an extra EXTRA_RESTRICTIONS_INTENT, which is of type Intent. The activity specified by that intent will be launched for a result which must contain one of the extras EXTRA_RESTRICTIONS_LIST or EXTRA_RESTRICTIONS_BUNDLE. The keys and values of the returned restrictions will be persisted.
Value: "android.intent.action.GET_RESTRICTION_ENTRIES"

ACTION_GTALK_SERVICE_CONNECTED

Added in API level 1
static val ACTION_GTALK_SERVICE_CONNECTED: String

Broadcast Action: A GTalk connection has been established.

Value: "android.intent.action.GTALK_CONNECTED"

ACTION_GTALK_SERVICE_DISCONNECTED

Added in API level 1
static val ACTION_GTALK_SERVICE_DISCONNECTED: String

Broadcast Action: A GTalk connection has been disconnected.

Value: "android.intent.action.GTALK_DISCONNECTED"

ACTION_HEADSET_PLUG

Added in API level 1
static val ACTION_HEADSET_PLUG: String

Broadcast Action: Wired Headset plugged in or unplugged. Same as android.media.AudioManager#ACTION_HEADSET_PLUG, to be consulted for value and documentation.

If the minimum SDK version of your application is android.os.Build.VERSION_CODES#LOLLIPOP, it is recommended to refer to the AudioManager constant in your receiver registration code instead.

Value: "android.intent.action.HEADSET_PLUG"

ACTION_INPUT_METHOD_CHANGED

Added in API level 3
static val ACTION_INPUT_METHOD_CHANGED: String

Broadcast Action: An input method has been changed.

Value: "android.intent.action.INPUT_METHOD_CHANGED"

ACTION_INSERT

Added in API level 1
static val ACTION_INSERT: String

Activity Action: Insert an empty item into the given container.

Input: getData is URI of the directory (vnd.android.cursor.dir/*) in which to place the data.

Output: URI of the new data that was created.

Value: "android.intent.action.INSERT"

ACTION_INSERT_OR_EDIT

Added in API level 1
static val ACTION_INSERT_OR_EDIT: String

Activity Action: Pick an existing item, or insert a new item, and then edit it.

Input: getType is the desired MIME type of the item to create or edit. The extras can contain type specific data to pass through to the editing/creating activity.

Output: The URI of the item that was picked. This must be a content: URI so that any receiver can access it.

Value: "android.intent.action.INSERT_OR_EDIT"

ACTION_INSTALL_FAILURE

Added in API level 27
static val ACTION_INSTALL_FAILURE: String

Activity Action: Activity to handle split installation failures.

Splits may be installed dynamically. This happens when an Activity is launched, but the split that contains the application isn't installed. When a split is installed in this manner, the containing package usually doesn't know this is happening. However, if an error occurs during installation, the containing package can define a single activity handling this action to deal with such failures.

The activity handling this action must be in the base package.

Input: EXTRA_INTENT the original intent that started split installation. EXTRA_SPLIT_NAME the name of the split that failed to be installed.

Value: "android.intent.action.INSTALL_FAILURE"

ACTION_INSTALL_PACKAGE

Added in API level 14
Deprecated in API level 29
static val ACTION_INSTALL_PACKAGE: String

Deprecated: use android.content.pm.PackageInstaller instead

Activity Action: Launch application installer.

Input: The data must be a content: URI at which the application can be retrieved. As of android.os.Build.VERSION_CODES#JELLY_BEAN_MR1, you can also use "package:" to install an application for the current user that is already installed for another user. You can optionally supply EXTRA_INSTALLER_PACKAGE_NAME, EXTRA_NOT_UNKNOWN_SOURCE, EXTRA_ALLOW_REPLACE, and EXTRA_RETURN_RESULT.

Output: If EXTRA_RETURN_RESULT, returns whether the install succeeded.

Note:If your app is targeting API level higher than 25 you need to hold android.Manifest.permission#REQUEST_INSTALL_PACKAGES in order to launch the application installer.

Value: "android.intent.action.INSTALL_PACKAGE"

ACTION_LAUNCH_CAPTURE_CONTENT_ACTIVITY_FOR_NOTE

Added in API level 34
static val ACTION_LAUNCH_CAPTURE_CONTENT_ACTIVITY_FOR_NOTE: String

Activity Action: Use with startActivityForResult to start a system activity that captures content on the screen to take a screenshot and present it to the user for editing. The edited screenshot is saved on device and returned to the calling activity as a Uri through getData(). User interaction is required to return the edited screenshot to the calling activity.

This intent action requires the permission android.Manifest.permission#LAUNCH_CAPTURE_CONTENT_ACTIVITY_FOR_NOTE.

Callers should query StatusBarManager#canLaunchCaptureContentActivityForNote(Activity) before showing a UI element that allows users to trigger this flow.
Requires android.Manifest.permission#LAUNCH_CAPTURE_CONTENT_ACTIVITY_FOR_NOTE

Value: "android.intent.action.LAUNCH_CAPTURE_CONTENT_ACTIVITY_FOR_NOTE"

ACTION_LOCALE_CHANGED

Added in API level 7
static val ACTION_LOCALE_CHANGED: String

Broadcast Action: The receiver's effective locale has changed. This happens when the device locale, the receiving app's locale (set via android.app.LocaleManager#setApplicationLocales) or language tags of Regional preferences changed. Can be received by manifest-declared receivers.

If only the app locale changed, includes the following extras:

This is a protected intent that can only be sent by the system.

Value: "android.intent.action.LOCALE_CHANGED"

ACTION_LOCKED_BOOT_COMPLETED

Added in API level 24
static val ACTION_LOCKED_BOOT_COMPLETED: String

Broadcast Action: This is broadcast once, after the user has finished booting, but while still in the "locked" state. It can be used to perform application-specific initialization, such as installing alarms. You must hold the android.Manifest.permission#RECEIVE_BOOT_COMPLETED permission in order to receive this broadcast.

This broadcast is sent immediately at boot by all devices (regardless of direct boot support) running android.os.Build.VERSION_CODES#N or higher. Upon receipt of this broadcast, the user is still locked and only device-protected storage can be accessed safely. If you want to access credential-protected storage, you need to wait for the user to be unlocked (typically by entering their lock pattern or PIN for the first time), after which the ACTION_USER_UNLOCKED and ACTION_BOOT_COMPLETED broadcasts are sent.

To receive this broadcast, your receiver component must be marked as being ComponentInfo#directBootAware.

This is a protected intent that can only be sent by the system.

Value: "android.intent.action.LOCKED_BOOT_COMPLETED"

ACTION_MAIN

Added in API level 1
static val ACTION_MAIN: String

Activity Action: Start as a main entry point, does not expect to receive data.

Input: nothing

Output: nothing

Value: "android.intent.action.MAIN"

ACTION_MANAGED_PROFILE_ADDED

Added in API level 21
static val ACTION_MANAGED_PROFILE_ADDED: String

Broadcast sent to the primary user when an associated managed profile is added (the profile was created and is ready to be used). Carries an extra EXTRA_USER that specifies the UserHandle of the profile that was added. Only applications (for example Launchers) that need to display merged content across both primary and managed profiles need to worry about this broadcast. This is only sent to registered receivers, not manifest receivers.

Value: "android.intent.action.MANAGED_PROFILE_ADDED"

ACTION_MANAGED_PROFILE_AVAILABLE

Added in API level 24
static val ACTION_MANAGED_PROFILE_AVAILABLE: String

Broadcast sent to the primary user when an associated managed profile has become available. Currently this includes when the user disables quiet mode for the profile. Carries an extra EXTRA_USER that specifies the UserHandle of the profile. When quiet mode is changed, this broadcast will carry a boolean extra EXTRA_QUIET_MODE indicating the new state of quiet mode. This is only sent to registered receivers, not manifest receivers.

Value: "android.intent.action.MANAGED_PROFILE_AVAILABLE"

ACTION_MANAGED_PROFILE_REMOVED

Added in API level 21
static val ACTION_MANAGED_PROFILE_REMOVED: String

Broadcast sent to the primary user when an associated managed profile is removed. Carries an extra EXTRA_USER that specifies the UserHandle of the profile that was removed. Only applications (for example Launchers) that need to display merged content across both primary and managed profiles need to worry about this broadcast. This is only sent to registered receivers, not manifest receivers.

Value: "android.intent.action.MANAGED_PROFILE_REMOVED"

ACTION_MANAGED_PROFILE_UNAVAILABLE

Added in API level 24
static val ACTION_MANAGED_PROFILE_UNAVAILABLE: String

Broadcast sent to the primary user when an associated managed profile has become unavailable. Currently this includes when the user enables quiet mode for the profile. Carries an extra EXTRA_USER that specifies the UserHandle of the profile. When quiet mode is changed, this broadcast will carry a boolean extra EXTRA_QUIET_MODE indicating the new state of quiet mode. This is only sent to registered receivers, not manifest receivers.

Value: "android.intent.action.MANAGED_PROFILE_UNAVAILABLE"

ACTION_MANAGED_PROFILE_UNLOCKED

Added in API level 24
static val ACTION_MANAGED_PROFILE_UNLOCKED: String

Broadcast sent to the primary user when the credential-encrypted private storage for an associated managed profile is unlocked. Carries an extra EXTRA_USER that specifies the UserHandle of the profile that was unlocked. Only applications (for example Launchers) that need to display merged content across both primary and managed profiles need to worry about this broadcast. This is only sent to registered receivers, not manifest receivers.

Value: "android.intent.action.MANAGED_PROFILE_UNLOCKED"

ACTION_MANAGE_NETWORK_USAGE

Added in API level 14
static val ACTION_MANAGE_NETWORK_USAGE: String

Activity Action: Show settings for managing network data usage of a specific application. Applications should define an activity that offers options to control data usage.

Value: "android.intent.action.MANAGE_NETWORK_USAGE"

ACTION_MANAGE_PACKAGE_STORAGE

Added in API level 1
static val ACTION_MANAGE_PACKAGE_STORAGE: String

Broadcast Action: Indicates low memory condition notification acknowledged by user and package management should be started. This is triggered by the user from the ACTION_DEVICE_STORAGE_LOW notification.

Value: "android.intent.action.MANAGE_PACKAGE_STORAGE"

ACTION_MANAGE_UNUSED_APPS

Added in API level 31
static val ACTION_MANAGE_UNUSED_APPS: String

Activity action: Launch UI to manage unused apps (hibernated apps).

Input: Nothing.

Output: Nothing.

Value: "android.intent.action.MANAGE_UNUSED_APPS"

ACTION_MEDIA_BAD_REMOVAL

Added in API level 1
static val ACTION_MEDIA_BAD_REMOVAL: String

Broadcast Action: External media was removed from SD card slot, but mount point was not unmounted. The path to the mount point for the removed media is contained in the Intent.mData field.

Value: "android.intent.action.MEDIA_BAD_REMOVAL"

ACTION_MEDIA_BUTTON

Added in API level 1
static val ACTION_MEDIA_BUTTON: String

Broadcast Action: The "Media Button" was pressed. Includes a single extra field, EXTRA_KEY_EVENT, containing the key event that caused the broadcast.

Value: "android.intent.action.MEDIA_BUTTON"

ACTION_MEDIA_CHECKING

Added in API level 3
static val ACTION_MEDIA_CHECKING: String

Broadcast Action: External media is present, and being disk-checked The path to the mount point for the checking media is contained in the Intent.mData field.

Value: "android.intent.action.MEDIA_CHECKING"

ACTION_MEDIA_EJECT

Added in API level 1
static val ACTION_MEDIA_EJECT: String

Broadcast Action: User has expressed the desire to remove the external storage media. Applications should close all files they have open within the mount point when they receive this intent. The path to the mount point for the media to be ejected is contained in the Intent.mData field.

Value: "android.intent.action.MEDIA_EJECT"

ACTION_MEDIA_MOUNTED

Added in API level 1
static val ACTION_MEDIA_MOUNTED: String

Broadcast Action: External media is present and mounted at its mount point. The path to the mount point for the mounted media is contained in the Intent.mData field. The Intent contains an extra with name "read-only" and Boolean value to indicate if the media was mounted read only.

Value: "android.intent.action.MEDIA_MOUNTED"

ACTION_MEDIA_NOFS

Added in API level 3
static val ACTION_MEDIA_NOFS: String

Broadcast Action: External media is present, but is using an incompatible fs (or is blank) The path to the mount point for the checking media is contained in the Intent.mData field.

Value: "android.intent.action.MEDIA_NOFS"

ACTION_MEDIA_REMOVED

Added in API level 1
static val ACTION_MEDIA_REMOVED: String

Broadcast Action: External media has been removed. The path to the mount point for the removed media is contained in the Intent.mData field.

Value: "android.intent.action.MEDIA_REMOVED"

ACTION_MEDIA_SCANNER_FINISHED

Added in API level 1
static val ACTION_MEDIA_SCANNER_FINISHED: String

Broadcast Action: The media scanner has finished scanning a directory. The path to the scanned directory is contained in the Intent.mData field.

Value: "android.intent.action.MEDIA_SCANNER_FINISHED"

ACTION_MEDIA_SCANNER_SCAN_FILE

Added in API level 1
Deprecated in API level 29
static val ACTION_MEDIA_SCANNER_SCAN_FILE: String

Deprecated: Callers should migrate to inserting items directly into MediaStore, where they will be automatically scanned after each mutation.

Broadcast Action: Request the media scanner to scan a file and add it to the media database.

The path to the file is contained in Intent#getData().

Value: "android.intent.action.MEDIA_SCANNER_SCAN_FILE"

ACTION_MEDIA_SCANNER_STARTED

Added in API level 1
static val ACTION_MEDIA_SCANNER_STARTED: String

Broadcast Action: The media scanner has started scanning a directory. The path to the directory being scanned is contained in the Intent.mData field.

Value: "android.intent.action.MEDIA_SCANNER_STARTED"

ACTION_MEDIA_SHARED

Added in API level 1
static val ACTION_MEDIA_SHARED: String

Broadcast Action: External media is unmounted because it is being shared via USB mass storage. The path to the mount point for the shared media is contained in the Intent.mData field.

Value: "android.intent.action.MEDIA_SHARED"

ACTION_MEDIA_UNMOUNTABLE

Added in API level 1
static val ACTION_MEDIA_UNMOUNTABLE: String

Broadcast Action: External media is present but cannot be mounted. The path to the mount point for the unmountable media is contained in the Intent.mData field.

Value: "android.intent.action.MEDIA_UNMOUNTABLE"

ACTION_MEDIA_UNMOUNTED

Added in API level 1
static val ACTION_MEDIA_UNMOUNTED: String

Broadcast Action: External media is present, but not mounted at its mount point. The path to the mount point for the unmounted media is contained in the Intent.mData field.

Value: "android.intent.action.MEDIA_UNMOUNTED"

ACTION_MY_PACKAGE_REPLACED

Added in API level 12
static val ACTION_MY_PACKAGE_REPLACED: String

Broadcast Action: A new version of your application has been installed over an existing one. This is only sent to the application that was replaced. It does not contain any additional data; to receive it, just use an intent filter for this action.

This is a protected intent that can only be sent by the system.

Value: "android.intent.action.MY_PACKAGE_REPLACED"

ACTION_MY_PACKAGE_SUSPENDED

Added in API level 28
static val ACTION_MY_PACKAGE_SUSPENDED: String

Broadcast Action: Sent to a package that has been suspended by the system. This is sent whenever a package is put into a suspended state or any of its app extras change while in the suspended state.

Optionally includes the following extras:

This is a protected intent that can only be sent by the system. This will be delivered to BroadcastReceiver components declared in the manifest.

Value: "android.intent.action.MY_PACKAGE_SUSPENDED"

ACTION_MY_PACKAGE_UNSUSPENDED

Added in API level 28
static val ACTION_MY_PACKAGE_UNSUSPENDED: String

Broadcast Action: Sent to a package that has been unsuspended.

This is a protected intent that can only be sent by the system. This will be delivered to BroadcastReceiver components declared in the manifest.

Value: "android.intent.action.MY_PACKAGE_UNSUSPENDED"

ACTION_NEW_OUTGOING_CALL

Added in API level 1
Deprecated in API level 29
static val ACTION_NEW_OUTGOING_CALL: String

Deprecated: Apps that redirect outgoing calls should use the android.telecom.CallRedirectionService API. Apps that perform call screening should use the android.telecom.CallScreeningService API. Apps which need to be notified of basic call state should use android.telephony.TelephonyCallback.CallStateListener to determine when a new outgoing call is placed.

Broadcast Action: An outgoing call is about to be placed.

The Intent will have the following extra value:

Starting in Android 15, this broadcast is no longer sent as an ordered broadcast. The resultData no longer has any effect and will not determine the actual routing of the call. Further, receivers of this broadcast do not get foreground priority and cannot launch background activities.

Once the broadcast is finished, the resultData is used as the actual number to call. If null, no call will be placed.

It is perfectly acceptable for multiple receivers to process the outgoing call in turn: for example, a parental control application might verify that the user is authorized to place the call at that time, then a number-rewriting application might add an area code if one was not specified.

For consistency, any receiver whose purpose is to prohibit phone calls should have a priority of 0, to ensure it will see the final phone number to be dialed. Any receiver whose purpose is to rewrite phone numbers to be called should have a positive priority. Negative priorities are reserved for the system for this broadcast; using them may cause problems.

Any BroadcastReceiver receiving this Intent must not abort the broadcast.

Emergency calls cannot be intercepted using this mechanism, and other calls cannot be modified to call emergency numbers using this mechanism.

Some apps (such as VoIP apps) may want to redirect the outgoing call to use their own service instead. Those apps should first prevent the call from being placed by setting resultData to null and then start their own app to make the call.

You must hold the android.Manifest.permission#PROCESS_OUTGOING_CALLS permission to receive this Intent.

This is a protected intent that can only be sent by the system.

If the user has chosen a android.telecom.CallRedirectionService to handle redirection of outgoing calls, this intent will NOT be sent as an ordered broadcast. This means that attempts to re-write the outgoing call by other apps using this intent will be ignored.

Value: "android.intent.action.NEW_OUTGOING_CALL"

ACTION_OPEN_DOCUMENT

Added in API level 19
static val ACTION_OPEN_DOCUMENT: String

Activity Action: Allow the user to select and return one or more existing documents. When invoked, the system will display the various DocumentsProvider instances installed on the device, letting the user interactively navigate through them. These documents include local media, such as photos and video, and documents provided by installed cloud storage providers.

Each document is represented as a content:// URI backed by a DocumentsProvider, which can be opened as a stream with ContentResolver#openFileDescriptor(Uri, String), or queried for android.provider.DocumentsContract.Document metadata.

All selected documents are returned to the calling application with persistable read and write permission grants. If you want to maintain access to the documents across device reboots, you need to explicitly take the persistable permissions using ContentResolver#takePersistableUriPermission(Uri, int).

Callers must indicate the acceptable document MIME types through setType(java.lang.String). For example, to select photos, use image/*. If multiple disjoint MIME types are acceptable, define them in EXTRA_MIME_TYPES and setType(java.lang.String) to */*.

If the caller can handle multiple returned items (the user performing multiple selection), then you can specify EXTRA_ALLOW_MULTIPLE to indicate this.

Callers must include CATEGORY_OPENABLE in the Intent to obtain URIs that can be opened with ContentResolver#openFileDescriptor(Uri, String).

Callers can set a document URI through DocumentsContract#EXTRA_INITIAL_URI to indicate the initial location of documents navigator. System will do its best to launch the navigator in the specified document if it's a folder, or the folder that contains the specified document if not.

Output: The URI of the item that was picked, returned in getData(). This must be a content:// URI so that any receiver can access it. If multiple documents were selected, they are returned in getClipData().

Value: "android.intent.action.OPEN_DOCUMENT"

ACTION_OPEN_DOCUMENT_TREE

Added in API level 21
static val ACTION_OPEN_DOCUMENT_TREE: String

Activity Action: Allow the user to pick a directory subtree. When invoked, the system will display the various DocumentsProvider instances installed on the device, letting the user navigate through them. Apps can fully manage documents within the returned directory.

To gain access to descendant (child, grandchild, etc) documents, use DocumentsContract#buildDocumentUriUsingTree(Uri, String) and DocumentsContract#buildChildDocumentsUriUsingTree(Uri, String) with the returned URI.

Callers can set a document URI through DocumentsContract#EXTRA_INITIAL_URI to indicate the initial location of documents navigator. System will do its best to launch the navigator in the specified document if it's a folder, or the folder that contains the specified document if not.

Output: The URI representing the selected directory tree.

Value: "android.intent.action.OPEN_DOCUMENT_TREE"

ACTION_PACKAGES_SUSPENDED

Added in API level 24
static val ACTION_PACKAGES_SUSPENDED: String

Broadcast Action: Packages have been suspended.

Includes the following extras:

This is a protected intent that can only be sent by the system. It is only sent to registered receivers.

Value: "android.intent.action.PACKAGES_SUSPENDED"

ACTION_PACKAGES_UNSUSPENDED

Added in API level 24
static val ACTION_PACKAGES_UNSUSPENDED: String

Broadcast Action: Packages have been unsuspended.

Includes the following extras:

This is a protected intent that can only be sent by the system. It is only sent to registered receivers.

Value: "android.intent.action.PACKAGES_UNSUSPENDED"

ACTION_PACKAGE_ADDED

Added in API level 1
static val ACTION_PACKAGE_ADDED: String

Broadcast Action: A new application package has been installed on the device. The data contains the name of the package. Note that the newly installed package does not receive this broadcast.

May include the following extras:

This is a protected intent that can only be sent by the system.

Value: "android.intent.action.PACKAGE_ADDED"

ACTION_PACKAGE_CHANGED

Added in API level 1
static val ACTION_PACKAGE_CHANGED: String

Broadcast Action: An existing application package has been changed (for example, a component has been enabled or disabled). The data contains the name of the package.

This is a protected intent that can only be sent by the system.

Value: "android.intent.action.PACKAGE_CHANGED"

ACTION_PACKAGE_DATA_CLEARED

Added in API level 3
static val ACTION_PACKAGE_DATA_CLEARED: String

Broadcast Action: The user has cleared the data of a package. This should be preceded by ACTION_PACKAGE_RESTARTED, after which all of its persistent data is erased and this broadcast sent. Note that the cleared package does not receive this broadcast. The data contains the name of the package.

  • EXTRA_UID containing the integer uid assigned to the package. If the package whose data was cleared is an uninstalled instant app, then the UID will be -1. The platform keeps some meta-data associated with instant apps after they are uninstalled.
  • EXTRA_PACKAGE_NAME containing the package name only if the cleared data was for an instant app.

This is a protected intent that can only be sent by the system.

Value: "android.intent.action.PACKAGE_DATA_CLEARED"

ACTION_PACKAGE_FIRST_LAUNCH

Added in API level 12
static val ACTION_PACKAGE_FIRST_LAUNCH: String

Broadcast Action: Sent to the installer package of an application when that application is first launched (that is the first time it is moved out of the stopped state). The data contains the name of the package.

When the application is first launched, the application itself doesn't receive this broadcast.

This is a protected intent that can only be sent by the system.

Value: "android.intent.action.PACKAGE_FIRST_LAUNCH"

ACTION_PACKAGE_FULLY_REMOVED

Added in API level 14
static val ACTION_PACKAGE_FULLY_REMOVED: String

Broadcast Action: An existing application package has been completely removed from the device. The data contains the name of the package. This is like ACTION_PACKAGE_REMOVED, but only set when EXTRA_DATA_REMOVED is true and EXTRA_REPLACING is false of that broadcast.

  • EXTRA_UID containing the integer uid previously assigned to the package.

This is a protected intent that can only be sent by the system.

Value: "android.intent.action.PACKAGE_FULLY_REMOVED"

ACTION_PACKAGE_INSTALL

Added in API level 1
Deprecated in API level 15
static val ACTION_PACKAGE_INSTALL: String

Deprecated: This constant has never been used.

Broadcast Action: Trigger the download and eventual installation of a package.

Input: getData is the URI of the package file to download.

This is a protected intent that can only be sent by the system.

Value: "android.intent.action.PACKAGE_INSTALL"

ACTION_PACKAGE_NEEDS_VERIFICATION

Added in API level 14
static val ACTION_PACKAGE_NEEDS_VERIFICATION: String

Broadcast Action: Sent to the system package verifier when a package needs to be verified. The data contains the package URI.

This is a protected intent that can only be sent by the system.

Value: "android.intent.action.PACKAGE_NEEDS_VERIFICATION"

ACTION_PACKAGE_REMOVED

Added in API level 1
static val ACTION_PACKAGE_REMOVED: String

Broadcast Action: An existing application package has been removed from the device. The data contains the name of the package. The package that is being removed does not receive this Intent.

This is a protected intent that can only be sent by the system.

Value: "android.intent.action.PACKAGE_REMOVED"

ACTION_PACKAGE_REPLACED

Added in API level 3
static val ACTION_PACKAGE_REPLACED: String

Broadcast Action: A new version of an application package has been installed, replacing an existing version that was previously installed. The data contains the name of the package.

May include the following extras:

  • EXTRA_UID containing the integer uid assigned to the new package.

This is a protected intent that can only be sent by the system.

Value: "android.intent.action.PACKAGE_REPLACED"

ACTION_PACKAGE_RESTARTED

Added in API level 1
static val ACTION_PACKAGE_RESTARTED: String

Broadcast Action: The user has restarted a package, and all of its processes have been killed. All runtime state associated with it (processes, alarms, notifications, etc) should be removed. Note that the restarted package does not receive this broadcast. The data contains the name of the package.

  • EXTRA_UID containing the integer uid assigned to the package.

This is a protected intent that can only be sent by the system.

Starting in Android V, an extra timestamp EXTRA_TIME is included with this broadcast to indicate the exact time the package was restarted, in elapsed realtime.

Value: "android.intent.action.PACKAGE_RESTARTED"

ACTION_PACKAGE_UNSTOPPED

Added in API level 35
static val ACTION_PACKAGE_UNSTOPPED: String

Broadcast Action: An application package that was previously in the stopped state has been started and is no longer considered stopped.

When a package is force-stopped, the ACTION_PACKAGE_RESTARTED broadcast is sent and the package in the stopped state cannot self-start for any reason unless there's an explicit request to start a component in the package. The ACTION_PACKAGE_UNSTOPPED broadcast is sent when such an explicit process start occurs and the package is taken out of the stopped state. The data contains the name of the package.

This is a protected intent that can only be sent by the system.

Value: "android.intent.action.PACKAGE_UNSTOPPED"

ACTION_PACKAGE_VERIFIED

Added in API level 17
static val ACTION_PACKAGE_VERIFIED: String

Broadcast Action: Sent to the system package verifier when a package is verified. The data contains the package URI.

This is a protected intent that can only be sent by the system.

Value: "android.intent.action.PACKAGE_VERIFIED"

ACTION_PASTE

Added in API level 11
static val ACTION_PASTE: String

Activity Action: Create a new item in the given container, initializing it from the current contents of the clipboard.

Input: getData is URI of the directory (vnd.android.cursor.dir/*) in which to place the data.

Output: URI of the new data that was created.

Value: "android.intent.action.PASTE"

ACTION_PICK

Added in API level 1
static val ACTION_PICK: String

Activity Action: Pick an item from the data, returning what was selected.

Input: getData is URI containing a directory of data (vnd.android.cursor.dir/*) from which to pick an item.

Output: The URI of the item that was picked.

Value: "android.intent.action.PICK"

ACTION_PICK_ACTIVITY

Added in API level 1
static val ACTION_PICK_ACTIVITY: String

Activity Action: Pick an activity given an intent, returning the class selected.

Input: get*Extra field EXTRA_INTENT is an Intent used with android.content.pm.PackageManager#queryIntentActivities to determine the set of activities from which to pick.

Output: Class name of the activity that was selected.

Value: "android.intent.action.PICK_ACTIVITY"

ACTION_POWER_CONNECTED

Added in API level 4
static val ACTION_POWER_CONNECTED: String

Broadcast Action: External power has been connected to the device. This is intended for applications that wish to register specifically to this notification. Unlike ACTION_BATTERY_CHANGED, applications will be woken for this and so do not have to stay active to receive this notification. This action can be used to implement actions that wait until power is available to trigger.

This is a protected intent that can only be sent by the system.

Value: "android.intent.action.ACTION_POWER_CONNECTED"

ACTION_POWER_DISCONNECTED

Added in API level 4
static val ACTION_POWER_DISCONNECTED: String

Broadcast Action: External power has been removed from the device. This is intended for applications that wish to register specifically to this notification. Unlike ACTION_BATTERY_CHANGED, applications will be woken for this and so do not have to stay active to receive this notification. This action can be used to implement actions that wait until power is available to trigger.

This is a protected intent that can only be sent by the system.

Value: "android.intent.action.ACTION_POWER_DISCONNECTED"

ACTION_POWER_USAGE_SUMMARY

Added in API level 4
static val ACTION_POWER_USAGE_SUMMARY: String

Activity Action: Show power usage information to the user.

Input: Nothing.

Output: Nothing.

Value: "android.intent.action.POWER_USAGE_SUMMARY"

ACTION_PROCESS_TEXT

Added in API level 23
static val ACTION_PROCESS_TEXT: String

Activity Action: Process a piece of text.

Input: EXTRA_PROCESS_TEXT contains the text to be processed. EXTRA_PROCESS_TEXT_READONLY states if the resulting text will be read-only.

Output: EXTRA_PROCESS_TEXT contains the processed text.

Value: "android.intent.action.PROCESS_TEXT"

ACTION_PROFILE_ACCESSIBLE

Added in API level 31
static val ACTION_PROFILE_ACCESSIBLE: String

Broadcast sent to the parent user when an associated profile has been started and unlocked. Carries an extra EXTRA_USER that specifies the UserHandle of the profile. This is only sent to registered receivers, not manifest receivers.

Value: "android.intent.action.PROFILE_ACCESSIBLE"

ACTION_PROFILE_ADDED

Added in API level 34
static val ACTION_PROFILE_ADDED: String

Broadcast sent to the parent user when an associated profile is added (the profile was created and is ready to be used). Carries an extra EXTRA_USER that specifies the UserHandle of the profile that was added.

This broadcast is similar to ACTION_MANAGED_PROFILE_ADDED but functions as a generic broadcast for all profile users. It is sent in addition to the ACTION_MANAGED_PROFILE_ADDED broadcast when a managed user is added.

Only applications (for example Launchers) that need to display merged content across both the parent user and its associated profiles need to worry about this broadcast. This is only sent to registered receivers created with android.content.Context#registerReceiver. It is not sent to manifest receivers.

Value: "android.intent.action.PROFILE_ADDED"

ACTION_PROFILE_AVAILABLE

Added in API level 35
static val ACTION_PROFILE_AVAILABLE: String

Broadcast sent to the primary user when an associated profile has become available. This is sent when a user disables quiet mode for the profile. Carries an extra EXTRA_USER that specifies the UserHandle of the profile. When quiet mode is changed, this broadcast will carry a boolean extra EXTRA_QUIET_MODE indicating the new state of quiet mode. This is only sent to registered receivers, not manifest receivers.

This broadcast is similar to ACTION_MANAGED_PROFILE_AVAILABLE but functions as a generic broadcast for all users of type android.os.UserManager#isProfile()}. In case of a managed profile, both ACTION_MANAGED_PROFILE_AVAILABLE and ACTION_PROFILE_AVAILABLE broadcasts are sent.

Value: "android.intent.action.PROFILE_AVAILABLE"

ACTION_PROFILE_INACCESSIBLE

Added in API level 31
static val ACTION_PROFILE_INACCESSIBLE: String

Broadcast sent to the parent user when an associated profile has stopped. Carries an extra EXTRA_USER that specifies the UserHandle of the profile. This is only sent to registered receivers, not manifest receivers.

Value: "android.intent.action.PROFILE_INACCESSIBLE"

ACTION_PROFILE_REMOVED

Added in API level 34
static val ACTION_PROFILE_REMOVED: String

Broadcast sent to the parent user when an associated profile is removed. Carries an extra EXTRA_USER that specifies the UserHandle of the profile that was removed.

This broadcast is similar to ACTION_MANAGED_PROFILE_REMOVED but functions as a generic broadcast for all profile users. It is sent in addition to the ACTION_MANAGED_PROFILE_REMOVED broadcast when a managed user is removed.

Only applications (for example Launchers) that need to display merged content across both the parent user and its associated profiles need to worry about this broadcast. This is only sent to registered receivers created with android.content.Context#registerReceiver. It is not sent to manifest receivers.

Value: "android.intent.action.PROFILE_REMOVED"

ACTION_PROFILE_UNAVAILABLE

Added in API level 35
static val ACTION_PROFILE_UNAVAILABLE: String

Broadcast sent to the primary user when an associated profile has become unavailable. This is sent when a user enables quiet mode for the profile. Carries an extra EXTRA_USER that specifies the UserHandle of the profile. When quiet mode is changed, this broadcast will carry a boolean extra EXTRA_QUIET_MODE indicating the new state of quiet mode. This is only sent to registered receivers, not manifest receivers.

This broadcast is similar to ACTION_MANAGED_PROFILE_UNAVAILABLE but functions as a generic broadcast for all users of type android.os.UserManager#isProfile()}. In case of a managed profile, both ACTION_MANAGED_PROFILE_UNAVAILABLE and ACTION_PROFILE_UNAVAILABLE broadcasts are sent.

Value: "android.intent.action.PROFILE_UNAVAILABLE"

ACTION_PROVIDER_CHANGED

Added in API level 1
static val ACTION_PROVIDER_CHANGED: String

Broadcast Action: Some content providers have parts of their namespace where they publish new events or items that the user may be especially interested in. For these things, they may broadcast this action when the set of interesting items change. For example, GmailProvider sends this notification when the set of unread mail in the inbox changes.

The data of the intent identifies which part of which provider changed. When queried through the content resolver, the data URI will return the data set in question.

The intent will have the following extra values:

  • count - The number of items in the data set. This is the same as the number of items in the cursor returned by querying the data URI.
This intent will be sent at boot (if the count is non-zero) and when the data set changes. It is possible for the data set to change without the count changing (for example, if a new unread message arrives in the same sync operation in which a message is archived). The phone should still ring/vibrate/etc as normal in this case.
Value: "android.intent.action.PROVIDER_CHANGED"

ACTION_QUICK_CLOCK

Added in API level 17
static val ACTION_QUICK_CLOCK: String

Sent when the user taps on the clock widget in the system's "quick settings" area.

Value: "android.intent.action.QUICK_CLOCK"

ACTION_QUICK_VIEW

Added in API level 24
static val ACTION_QUICK_VIEW: String

Activity Action: Quick view the data. Launches a quick viewer for a URI or a list of URIs.

Activities handling this intent action should handle the vast majority of MIME types rather than only specific ones.

Quick viewers must render the quick view image locally, and must not send file content outside current device.

Input: getData is a mandatory content URI of the item to preview. getClipData contains an optional list of content URIs if there is more than one item to preview. EXTRA_INDEX is an optional index of the URI in the clip data to show first. EXTRA_QUICK_VIEW_FEATURES is an optional extra indicating the features that can be shown in the quick view UI.

Output: nothing.

Value: "android.intent.action.QUICK_VIEW"

ACTION_REBOOT

Added in API level 1
static val ACTION_REBOOT: String

Broadcast Action: Have the device reboot. This is only for use by system code.

This is a protected intent that can only be sent by the system.

Value: "android.intent.action.REBOOT"

ACTION_RUN

Added in API level 1
static val ACTION_RUN: String

Activity Action: Run the data, whatever that means.

Input: ? (Note: this is currently specific to the test harness.)

Output: nothing.

Value: "android.intent.action.RUN"

ACTION_SAFETY_CENTER

Added in API level 33
static val ACTION_SAFETY_CENTER: String

Activity action: Launch UI to open the Safety Center, which highlights the user's security and privacy status.

Value: "android.intent.action.SAFETY_CENTER"

ACTION_SCREEN_OFF

Added in API level 1
static val ACTION_SCREEN_OFF: String

Broadcast Action: Sent when the device goes to sleep and becomes non-interactive.

For historical reasons, the name of this broadcast action refers to the power state of the screen but it is actually sent in response to changes in the overall interactive state of the device.

This broadcast is sent when the device becomes non-interactive which may have nothing to do with the screen turning off. To determine the actual state of the screen, use android.view.Display#getState.

See android.os.PowerManager#isInteractive for details.

You cannot receive this through components declared in manifests, only by explicitly registering for it with Context.registerReceiver().

This is a protected intent that can only be sent by the system.

Value: "android.intent.action.SCREEN_OFF"

ACTION_SCREEN_ON

Added in API level 1
static val ACTION_SCREEN_ON: String

Broadcast Action: Sent when the device wakes up and becomes interactive.

For historical reasons, the name of this broadcast action refers to the power state of the screen but it is actually sent in response to changes in the overall interactive state of the device.

This broadcast is sent when the device becomes interactive which may have nothing to do with the screen turning on. To determine the actual state of the screen, use android.view.Display#getState.

See android.os.PowerManager#isInteractive for details.

You cannot receive this through components declared in manifests, only by explicitly registering for it with Context.registerReceiver().

This is a protected intent that can only be sent by the system.

Value: "android.intent.action.SCREEN_ON"
Added in API level 1
static val ACTION_SEARCH: String

Activity Action: Perform a search.

Input: getStringExtra(SearchManager.QUERY) is the text to search for. If empty, simply enter your search results Activity with the search UI activated.

Output: nothing.

Value: "android.intent.action.SEARCH"

ACTION_SEARCH_LONG_PRESS

Added in API level 3
static val ACTION_SEARCH_LONG_PRESS: String

Activity Action: Start action associated with long pressing on the search key.

Input: Nothing.

Output: Nothing.

Value: "android.intent.action.SEARCH_LONG_PRESS"

ACTION_SEND

Added in API level 1
static val ACTION_SEND: String

Activity Action: Deliver some data to someone else. Who the data is being delivered to is not specified; it is up to the receiver of this action to ask the user where the data should be sent.

When launching a SEND intent, you should usually wrap it in a chooser (through #createChooser), which will give the proper interface for the user to pick how to send your data and allow you to specify a prompt indicating what they are doing.

Input: getType is the MIME type of the data being sent. get*Extra can have either a EXTRA_TEXT or EXTRA_STREAM field, containing the data to be sent. If using EXTRA_TEXT, the MIME type should be "text/plain"; otherwise it should be the MIME type of the data in EXTRA_STREAM. Use */* if the MIME type is unknown (this will only allow senders that can handle generic data streams). If using EXTRA_TEXT, you can also optionally supply EXTRA_HTML_TEXT for clients to retrieve your text with HTML formatting.

As of android.os.Build.VERSION_CODES#JELLY_BEAN, the data being sent can be supplied through setClipData(android.content.ClipData). This allows you to use FLAG_GRANT_READ_URI_PERMISSION when sharing content: URIs and other advanced features of ClipData. If using this approach, you still must supply the same data through the EXTRA_TEXT or EXTRA_STREAM fields described below for compatibility with old applications. If you don't set a ClipData, it will be copied there for you when calling Context#startActivity(Intent).

Starting from android.os.Build.VERSION_CODES#O, if CATEGORY_TYPED_OPENABLE is passed, then the Uris passed in either EXTRA_STREAM or via setClipData(android.content.ClipData) may be openable only as asset typed files using ContentResolver#openTypedAssetFileDescriptor(Uri, String, Bundle).

Optional standard extras, which may be interpreted by some recipients as appropriate, are: EXTRA_EMAIL, EXTRA_CC, EXTRA_BCC, EXTRA_SUBJECT.

Output: nothing.

Value: "android.intent.action.SEND"

ACTION_SENDTO

Added in API level 1
static val ACTION_SENDTO: String

Activity Action: Send a message to someone specified by the data.

Input: getData is URI describing the target.

Output: nothing.

Value: "android.intent.action.SENDTO"

ACTION_SEND_MULTIPLE

Added in API level 4
static val ACTION_SEND_MULTIPLE: String

Activity Action: Deliver multiple data to someone else.

Like ACTION_SEND, except the data is multiple.

Input: getType is the MIME type of the data being sent. get*ArrayListExtra can have either a EXTRA_TEXT or EXTRA_STREAM field, containing the data to be sent. If using EXTRA_TEXT, you can also optionally supply EXTRA_HTML_TEXT for clients to retrieve your text with HTML formatting.

Multiple types are supported, and receivers should handle mixed types whenever possible. The right way for the receiver to check them is to use the content resolver on each URI. The intent sender should try to put the most concrete mime type in the intent type, but it can fall back to <type>/* or */* as needed.

e.g. if you are sending image/jpg and image/jpg, the intent's type can be image/jpg, but if you are sending image/jpg and image/png, then the intent's type should be image/*.

As of android.os.Build.VERSION_CODES#JELLY_BEAN, the data being sent can be supplied through setClipData(android.content.ClipData). This allows you to use FLAG_GRANT_READ_URI_PERMISSION when sharing content: URIs and other advanced features of ClipData. If using this approach, you still must supply the same data through the EXTRA_TEXT or EXTRA_STREAM fields described below for compatibility with old applications. If you don't set a ClipData, it will be copied there for you when calling Context#startActivity(Intent).

Starting from android.os.Build.VERSION_CODES#O, if CATEGORY_TYPED_OPENABLE is passed, then the Uris passed in either EXTRA_STREAM or via setClipData(android.content.ClipData) may be openable only as asset typed files using ContentResolver#openTypedAssetFileDescriptor(Uri, String, Bundle).

Optional standard extras, which may be interpreted by some recipients as appropriate, are: EXTRA_EMAIL, EXTRA_CC, EXTRA_BCC, EXTRA_SUBJECT.

Output: nothing.

Value: "android.intent.action.SEND_MULTIPLE"

ACTION_SET_WALLPAPER

Added in API level 1
static val ACTION_SET_WALLPAPER: String

Activity Action: Show settings for choosing wallpaper.

Input: Nothing.

Output: Nothing.

Value: "android.intent.action.SET_WALLPAPER"

ACTION_SHOW_APP_INFO

Added in API level 24
static val ACTION_SHOW_APP_INFO: String

Activity Action: Launch an activity showing the app information. For applications which install other applications (such as app stores), it is recommended to handle this action for providing the app information to the user.

Input: EXTRA_PACKAGE_NAME specifies the package whose information needs to be displayed.

Output: Nothing.

Value: "android.intent.action.SHOW_APP_INFO"

ACTION_SHOW_WORK_APPS

Added in API level 33
static val ACTION_SHOW_WORK_APPS: String

Activity Action: Action to show the list of all work apps in the launcher. For example, shows the work apps folder or tab.

Input: Nothing.

Output: nothing.

Value: "android.intent.action.SHOW_WORK_APPS"

ACTION_SHUTDOWN

Added in API level 4
static val ACTION_SHUTDOWN: String

Broadcast Action: Device is shutting down. This is broadcast when the device is being shut down (completely turned off, not sleeping). Once the broadcast is complete, the final shutdown will proceed and all unsaved data lost. Apps will not normally need to handle this, since the foreground activity will be paused as well.

As of Build.VERSION_CODES#P this broadcast is only sent to receivers registered through Context.registerReceiver.

This is a protected intent that can only be sent by the system.

May include the following extras:

Value: "android.intent.action.ACTION_SHUTDOWN"

ACTION_SYNC

Added in API level 1
static val ACTION_SYNC: String

Activity Action: Perform a data synchronization.

Input: ?

Output: ?

Value: "android.intent.action.SYNC"

ACTION_SYSTEM_TUTORIAL

Added in API level 3
static val ACTION_SYSTEM_TUTORIAL: String

Activity Action: Start the platform-defined tutorial

Input: getStringExtra(SearchManager.QUERY) is the text to search for. If empty, simply enter your search results Activity with the search UI activated.

Output: nothing.

Value: "android.intent.action.SYSTEM_TUTORIAL"

ACTION_TIMEZONE_CHANGED

Added in API level 1
static val ACTION_TIMEZONE_CHANGED: String

Broadcast Action: The timezone has changed. The intent will have the following extra values:

  • EXTRA_TIMEZONE - The java.util.TimeZone.getID() value identifying the new time zone.

This is a protected intent that can only be sent by the system.

Value: "android.intent.action.TIMEZONE_CHANGED"

ACTION_TIME_CHANGED

Added in API level 1
static val ACTION_TIME_CHANGED: String

Broadcast Action: The time was set.

Value: "android.intent.action.TIME_SET"

ACTION_TIME_TICK

Added in API level 1
static val ACTION_TIME_TICK: String

Broadcast Action: The current time has changed. Sent every minute. You cannot receive this through components declared in manifests, only by explicitly registering for it with Context.registerReceiver().

This is a protected intent that can only be sent by the system.

Value: "android.intent.action.TIME_TICK"

ACTION_TRANSLATE

Added in API level 29
static val ACTION_TRANSLATE: String

Activity Action: Perform text translation.

Input: getCharSequence(EXTRA_TEXT) is the text to translate.

Output: nothing.

Value: "android.intent.action.TRANSLATE"

ACTION_UID_REMOVED

Added in API level 1
static val ACTION_UID_REMOVED: String

Broadcast Action: A uid has been removed from the system. The uid number is stored in the extra data under EXTRA_UID. In certain instances, EXTRA_REPLACING is set to true if the UID is not being fully removed.

This is a protected intent that can only be sent by the system.

Value: "android.intent.action.UID_REMOVED"

ACTION_UMS_CONNECTED

Added in API level 1
Deprecated in API level 15
static val ACTION_UMS_CONNECTED: String

Deprecated: replaced by android.os.storage.StorageEventListener

Broadcast Action: The device has entered USB Mass Storage mode. This is used mainly for the USB Settings panel. Apps should listen for ACTION_MEDIA_MOUNTED and ACTION_MEDIA_UNMOUNTED broadcasts to be notified when the SD card file system is mounted or unmounted

Value: "android.intent.action.UMS_CONNECTED"

ACTION_UMS_DISCONNECTED

Added in API level 1
Deprecated in API level 15
static val ACTION_UMS_DISCONNECTED: String

Deprecated: replaced by android.os.storage.StorageEventListener

Broadcast Action: The device has exited USB Mass Storage mode. This is used mainly for the USB Settings panel. Apps should listen for ACTION_MEDIA_MOUNTED and ACTION_MEDIA_UNMOUNTED broadcasts to be notified when the SD card file system is mounted or unmounted

Value: "android.intent.action.UMS_DISCONNECTED"

ACTION_UNARCHIVE_PACKAGE

Added in API level 35
static val ACTION_UNARCHIVE_PACKAGE: String

Broadcast Action: Sent to the responsible installer of an archived package when unarchival is requested.

Value: "android.intent.action.UNARCHIVE_PACKAGE"

ACTION_UNINSTALL_PACKAGE

Added in API level 14
Deprecated in API level 29
static val ACTION_UNINSTALL_PACKAGE: String

Deprecated: Use android.content.pm.PackageInstaller#uninstall(String, IntentSender) instead

Activity Action: Launch application uninstaller.

Input: The data must be a package: URI whose scheme specific part is the package name of the current installed package to be uninstalled. You can optionally supply EXTRA_RETURN_RESULT.

Output: If EXTRA_RETURN_RESULT, returns whether the uninstall succeeded.

Requires android.Manifest.permission#REQUEST_DELETE_PACKAGES since Build.VERSION_CODES#P.

Value: "android.intent.action.UNINSTALL_PACKAGE"

ACTION_USER_BACKGROUND

Added in API level 17
static val ACTION_USER_BACKGROUND: String

Sent after a user switch is complete, if the switch caused the process's user to be sent to the background. This is only sent to receivers registered through Context.registerReceiver. It is sent to the user that is going to the background. This is sent as a foreground broadcast, since it is part of a visible user interaction; be as quick as possible when handling it.

Value: "android.intent.action.USER_BACKGROUND"

ACTION_USER_FOREGROUND

Added in API level 17
static val ACTION_USER_FOREGROUND: String

Sent after a user switch is complete, if the switch caused the process's user to be brought to the foreground. This is only sent to receivers registered through Context.registerReceiver. It is sent to the user that is going to the foreground. This is sent as a foreground broadcast, since it is part of a visible user interaction; be as quick as possible when handling it.

Value: "android.intent.action.USER_FOREGROUND"

ACTION_USER_INITIALIZE

Added in API level 17
static val ACTION_USER_INITIALIZE: String

Sent the first time a user is starting, to allow system apps to perform one time initialization. (This will not be seen by third party applications because a newly initialized user does not have any third party applications installed for it.) This is sent early in starting the user, around the time the home app is started, before ACTION_BOOT_COMPLETED is sent. This is sent as a foreground broadcast, since it is part of a visible user interaction; be as quick as possible when handling it.

Note: This broadcast is not sent to the system user.

Value: "android.intent.action.USER_INITIALIZE"

ACTION_USER_PRESENT

Added in API level 3
static val ACTION_USER_PRESENT: String

Broadcast Action: Sent when the user is present after device wakes up (e.g when the keyguard is gone).

This is a protected intent that can only be sent by the system.

Value: "android.intent.action.USER_PRESENT"

ACTION_USER_UNLOCKED

Added in API level 24
static val ACTION_USER_UNLOCKED: String

Broadcast Action: Sent when the credential-encrypted private storage has become unlocked for the target user. This is only sent to registered receivers, not manifest receivers.

Note: The user's actual state might have changed by the time the broadcast is received. For example, the user could have been removed, started or stopped already, regardless of which broadcast you receive. Because of that, receivers should always check the current state of the user.

Value: "android.intent.action.USER_UNLOCKED"

ACTION_VIEW

Added in API level 1
static val ACTION_VIEW: String

Activity Action: Display the data to the user. This is the most common action performed on data -- it is the generic action you can use on a piece of data to get the most reasonable thing to occur. For example, when used on a contacts entry it will view the entry; when used on a mailto: URI it will bring up a compose window filled with the information supplied by the URI; when used with a tel: URI it will invoke the dialer.

Input: getData is URI from which to retrieve data.

Output: nothing.

Value: "android.intent.action.VIEW"

ACTION_VIEW_LOCUS

Added in API level 29
static val ACTION_VIEW_LOCUS: String

Activity Action: Display an activity state associated with an unique LocusId.

For example, a chat app could use the context to resume a conversation between 2 users.

Input: EXTRA_LOCUS_ID specifies the unique identifier of the locus in the app domain. Should be stable across reboots and backup / restore.

Output: nothing.

Value: "android.intent.action.VIEW_LOCUS"

ACTION_VIEW_PERMISSION_USAGE

Added in API level 29
static val ACTION_VIEW_PERMISSION_USAGE: String

Activity action: Launch UI to show information about the usage of a given permission group. This action would be handled by apps that want to show details about how and why given permission group is being used.

Important:You must protect the activity that handles this action with the START_VIEW_PERMISSION_USAGE permission to ensure that only the system can launch this activity. The system will not launch activities that are not properly protected.

Input: EXTRA_PERMISSION_GROUP_NAME specifies the permission group for which the launched UI would be targeted.

Output: Nothing.


Requires android.Manifest.permission#START_VIEW_PERMISSION_USAGE
Value: "android.intent.action.VIEW_PERMISSION_USAGE"

ACTION_VIEW_PERMISSION_USAGE_FOR_PERIOD

Added in API level 31
static val ACTION_VIEW_PERMISSION_USAGE_FOR_PERIOD: String

Activity action: Launch UI to show information about the usage of a given permission group in a given period. This action would be handled by apps that want to show details about how and why given permission group is being used.

Important:You must protect the activity that handles this action with the android.Manifest.permission#START_VIEW_PERMISSION_USAGE permission to ensure that only the system can launch this activity. The system will not launch activities that are not properly protected.

Input: EXTRA_PERMISSION_GROUP_NAME specifies the permission group for which the launched UI would be targeted.

Input: EXTRA_ATTRIBUTION_TAGS specifies the attribution tags for the usage entry.

Input: EXTRA_START_TIME specifies the start time of the period (epoch time in millis). Both start time and end time are needed and start time must be <= end time.

Input: EXTRA_END_TIME specifies the end time of the period (epoch time in millis). Both start time and end time are needed and start time must be <= end time.

Output: Nothing.


Requires android.Manifest.permission#START_VIEW_PERMISSION_USAGE
Value: "android.intent.action.VIEW_PERMISSION_USAGE_FOR_PERIOD"

ACTION_VOICE_COMMAND

Added in API level 1
static val ACTION_VOICE_COMMAND: String

Activity Action: Start Voice Command.

Input: Nothing.

Output: Nothing.

In some cases, a matching Activity may not exist, so ensure you safeguard against this.

Value: "android.intent.action.VOICE_COMMAND"

ACTION_WALLPAPER_CHANGED

Added in API level 1
Deprecated in API level 16
static val ACTION_WALLPAPER_CHANGED: String

Deprecated: Modern applications should use WindowManager.LayoutParams.FLAG_SHOW_WALLPAPER to have the wallpaper shown behind their UI, rather than watching for this broadcast and rendering the wallpaper on their own.

Broadcast Action: The current system wallpaper has changed. See android.app.WallpaperManager for retrieving the new wallpaper. This should only be used to determine when the wallpaper has changed to show the new wallpaper to the user. You should certainly never, in response to this, change the wallpaper or other attributes of it such as the suggested size. That would be unexpected, right? You'd cause all kinds of loops, especially if other apps are doing similar things, right? Of course. So please don't do this.

Value: "android.intent.action.WALLPAPER_CHANGED"
Added in API level 1
static val ACTION_WEB_SEARCH: String

Activity Action: Perform a web search.

Input: getStringExtra(SearchManager.QUERY) is the text to search for. If it is a url starts with http or https, the site will be opened. If it is plain text, Google search will be applied.

Output: nothing.

Value: "android.intent.action.WEB_SEARCH"

CAPTURE_CONTENT_FOR_NOTE_BLOCKED_BY_ADMIN

Added in API level 34
static val CAPTURE_CONTENT_FOR_NOTE_BLOCKED_BY_ADMIN: Int

A response code used with EXTRA_CAPTURE_CONTENT_FOR_NOTE_STATUS_CODE to indicate that screenshot is blocked by IT admin.

Value: 4

CAPTURE_CONTENT_FOR_NOTE_FAILED

Added in API level 34
static val CAPTURE_CONTENT_FOR_NOTE_FAILED: Int

A response code used with EXTRA_CAPTURE_CONTENT_FOR_NOTE_STATUS_CODE to indicate that something went wrong.

Value: 1

CAPTURE_CONTENT_FOR_NOTE_SUCCESS

Added in API level 34
static val CAPTURE_CONTENT_FOR_NOTE_SUCCESS: Int

A response code used with EXTRA_CAPTURE_CONTENT_FOR_NOTE_STATUS_CODE to indicate that the request was a success.

This code will only be returned after the user has interacted with the system screenshot activity to consent to sharing the data with the note.

The captured screenshot is returned as a Uri through getData().

Value: 0

CAPTURE_CONTENT_FOR_NOTE_USER_CANCELED

Added in API level 34
static val CAPTURE_CONTENT_FOR_NOTE_USER_CANCELED: Int

A response code used with EXTRA_CAPTURE_CONTENT_FOR_NOTE_STATUS_CODE to indicate that user canceled the content capture flow.

Value: 2

CAPTURE_CONTENT_FOR_NOTE_WINDOW_MODE_UNSUPPORTED

Added in API level 34
static val CAPTURE_CONTENT_FOR_NOTE_WINDOW_MODE_UNSUPPORTED: Int

A response code used with EXTRA_CAPTURE_CONTENT_FOR_NOTE_STATUS_CODE to indicate that the intent action ACTION_LAUNCH_CAPTURE_CONTENT_ACTIVITY_FOR_NOTE was started by an activity that is running in a non-supported window mode.

Value: 3

CATEGORY_ACCESSIBILITY_SHORTCUT_TARGET

Added in API level 30
static val CATEGORY_ACCESSIBILITY_SHORTCUT_TARGET: String

The accessibility shortcut is a global gesture for users with disabilities to trigger an important for them accessibility feature to help developers determine whether they want to make their activity a shortcut target.

An activity of interest to users with accessibility needs may request to be the target of the accessibility shortcut. It handles intent ACTION_MAIN with this category, which will be dispatched by the system when the user activates the shortcut when it is configured to point at this target.

An activity declared itself to be a target of the shortcut in AndroidManifest.xml. It must also do two things:

      Specify that it handles the android.intent.action.MAIN android.content.Intent with category android.intent.category.ACCESSIBILITY_SHORTCUT_TARGET.
      Provide a meta-data entry android.accessibilityshortcut.target in the manifest when declaring the activity.
If either of these items is missing, the system will ignore the accessibility shortcut target. Following is an example declaration:

<activity android:name=".MainActivity"
  . . .
    <intent-filter>
        <action android:name="android.intent.action.MAIN" />
        <category android:name="android.intent.category.ACCESSIBILITY_SHORTCUT_TARGET" />
    </intent-filter>
    <meta-data android:name="android.accessibilityshortcut.target"
                    android:resource="@xml/accessibilityshortcut" />
  </activity>
  

This is a sample XML file configuring a accessibility shortcut target:

<accessibility-shortcut-target
      android:description="@string/shortcut_target_description"
      android:summary="@string/shortcut_target_summary"
      android:animatedImageDrawable="@drawable/shortcut_target_animated_image"
      android:htmlDescription="@string/shortcut_target_html_description"
      android:settingsActivity="com.example.android.shortcut.target.SettingsActivity" />
  

Both description and summary are necessary. The system will ignore the accessibility shortcut target if they are missing. The animated image and html description are supported to help users understand how to use the shortcut target. The settings activity is a component name that allows the user to modify the settings for this accessibility shortcut target.

Value: "android.intent.category.ACCESSIBILITY_SHORTCUT_TARGET"

CATEGORY_ALTERNATIVE

Added in API level 1
static val CATEGORY_ALTERNATIVE: String

Set if the activity should be considered as an alternative action to the data the user is currently viewing. See also CATEGORY_SELECTED_ALTERNATIVE for an alternative action that applies to the selection in a list of items.

Supporting this category means that you would like your activity to be displayed in the set of alternative things the user can do, usually as part of the current activity's options menu. You will usually want to include a specific label in the <intent-filter> of this action describing to the user what it does.

The action of IntentFilter with this category is important in that it describes the specific action the target will perform. This generally should not be a generic action (such as ACTION_VIEW, but rather a specific name such as "com.android.camera.action.CROP. Only one alternative of any particular action will be shown to the user, so using a specific action like this makes sure that your alternative will be displayed while also allowing other applications to provide their own overrides of that particular action.

Value: "android.intent.category.ALTERNATIVE"

CATEGORY_APP_BROWSER

Added in API level 15
static val CATEGORY_APP_BROWSER: String

Used with ACTION_MAIN to launch the browser application. The activity should be able to browse the Internet.

NOTE: This should not be used as the primary key of an Intent, since it will not result in the app launching with the correct action and category. Instead, use this with makeMainSelectorActivity(java.lang.String,java.lang.String) to generate a main Intent with this category in the selector.

Value: "android.intent.category.APP_BROWSER"

CATEGORY_APP_CALCULATOR

Added in API level 15
static val CATEGORY_APP_CALCULATOR: String

Used with ACTION_MAIN to launch the calculator application. The activity should be able to perform standard arithmetic operations.

NOTE: This should not be used as the primary key of an Intent, since it will not result in the app launching with the correct action and category. Instead, use this with makeMainSelectorActivity(java.lang.String,java.lang.String) to generate a main Intent with this category in the selector.

Value: "android.intent.category.APP_CALCULATOR"

CATEGORY_APP_CALENDAR

Added in API level 15
static val CATEGORY_APP_CALENDAR: String

Used with ACTION_MAIN to launch the calendar application. The activity should be able to view and manipulate calendar entries.

NOTE: This should not be used as the primary key of an Intent, since it will not result in the app launching with the correct action and category. Instead, use this with makeMainSelectorActivity(java.lang.String,java.lang.String) to generate a main Intent with this category in the selector.

Value: "android.intent.category.APP_CALENDAR"

CATEGORY_APP_CONTACTS

Added in API level 15
static val CATEGORY_APP_CONTACTS: String

Used with ACTION_MAIN to launch the contacts application. The activity should be able to view and manipulate address book entries.

NOTE: This should not be used as the primary key of an Intent, since it will not result in the app launching with the correct action and category. Instead, use this with makeMainSelectorActivity(java.lang.String,java.lang.String) to generate a main Intent with this category in the selector.

Value: "android.intent.category.APP_CONTACTS"

CATEGORY_APP_EMAIL

Added in API level 15
static val CATEGORY_APP_EMAIL: String

Used with ACTION_MAIN to launch the email application. The activity should be able to send and receive email.

NOTE: This should not be used as the primary key of an Intent, since it will not result in the app launching with the correct action and category. Instead, use this with makeMainSelectorActivity(java.lang.String,java.lang.String) to generate a main Intent with this category in the selector.

Value: "android.intent.category.APP_EMAIL"

CATEGORY_APP_FILES

Added in API level 29
static val CATEGORY_APP_FILES: String

Used with ACTION_MAIN to launch the files application. The activity should be able to browse and manage files stored on the device.

NOTE: This should not be used as the primary key of an Intent, since it will not result in the app launching with the correct action and category. Instead, use this with makeMainSelectorActivity(java.lang.String,java.lang.String) to generate a main Intent with this category in the selector.

Value: "android.intent.category.APP_FILES"

CATEGORY_APP_FITNESS

Added in API level 33
static val CATEGORY_APP_FITNESS: String

Used with ACTION_MAIN to launch the fitness application. The activity should be able to give the user fitness information and manage workouts

NOTE: This should not be used as the primary key of an Intent, since it will not result in the app launching with the correct action and category. Instead, use this with makeMainSelectorActivity(java.lang.String,java.lang.String) to generate a main Intent with this category in the selector.

Value: "android.intent.category.APP_FITNESS"
Added in API level 15
static val CATEGORY_APP_GALLERY: String

Used with ACTION_MAIN to launch the gallery application. The activity should be able to view and manipulate image and video files stored on the device.

NOTE: This should not be used as the primary key of an Intent, since it will not result in the app launching with the correct action and category. Instead, use this with makeMainSelectorActivity(java.lang.String,java.lang.String) to generate a main Intent with this category in the selector.

Value: "android.intent.category.APP_GALLERY"

CATEGORY_APP_MAPS

Added in API level 15
static val CATEGORY_APP_MAPS: String

Used with ACTION_MAIN to launch the maps application. The activity should be able to show the user's current location and surroundings.

NOTE: This should not be used as the primary key of an Intent, since it will not result in the app launching with the correct action and category. Instead, use this with makeMainSelectorActivity(java.lang.String,java.lang.String) to generate a main Intent with this category in the selector.

Value: "android.intent.category.APP_MAPS"

CATEGORY_APP_MARKET

Added in API level 11
static val CATEGORY_APP_MARKET: String

This activity allows the user to browse and download new applications.

Value: "android.intent.category.APP_MARKET"

CATEGORY_APP_MESSAGING

Added in API level 15
static val CATEGORY_APP_MESSAGING: String

Used with ACTION_MAIN to launch the messaging application. The activity should be able to send and receive text messages.

NOTE: This should not be used as the primary key of an Intent, since it will not result in the app launching with the correct action and category. Instead, use this with makeMainSelectorActivity(java.lang.String,java.lang.String) to generate a main Intent with this category in the selector.

Value: "android.intent.category.APP_MESSAGING"

CATEGORY_APP_MUSIC

Added in API level 15
static val CATEGORY_APP_MUSIC: String

Used with ACTION_MAIN to launch the music application. The activity should be able to play, browse, or manipulate music files stored on the device.

NOTE: This should not be used as the primary key of an Intent, since it will not result in the app launching with the correct action and category. Instead, use this with makeMainSelectorActivity(java.lang.String,java.lang.String) to generate a main Intent with this category in the selector.

Value: "android.intent.category.APP_MUSIC"

CATEGORY_APP_WEATHER

Added in API level 33
static val CATEGORY_APP_WEATHER: String

Used with ACTION_MAIN to launch the weather application. The activity should be able to give the user information about the weather

NOTE: This should not be used as the primary key of an Intent, since it will not result in the app launching with the correct action and category. Instead, use this with makeMainSelectorActivity(java.lang.String,java.lang.String) to generate a main Intent with this category in the selector.

Value: "android.intent.category.APP_WEATHER"

CATEGORY_BROWSABLE

Added in API level 1
static val CATEGORY_BROWSABLE: String

Activities that can be safely invoked from a browser must support this category. For example, if the user is viewing a web page or an e-mail and clicks on a link in the text, the Intent generated execute that link will require the BROWSABLE category, so that only activities supporting this category will be considered as possible actions. By supporting this category, you are promising that there is nothing damaging (without user intervention) that can happen by invoking any matching Intent.

Value: "android.intent.category.BROWSABLE"

CATEGORY_CAR_DOCK

Added in API level 5
static val CATEGORY_CAR_DOCK: String

An activity to run when device is inserted into a car dock. Used with ACTION_MAIN to launch an activity. For more information, see android.app.UiModeManager.

Value: "android.intent.category.CAR_DOCK"

CATEGORY_CAR_MODE

Added in API level 8
static val CATEGORY_CAR_MODE: String

Used to indicate that the activity can be used in a car environment.

Value: "android.intent.category.CAR_MODE"

CATEGORY_DEFAULT

Added in API level 1
static val CATEGORY_DEFAULT: String

Set if the activity should be an option for the default action (center press) to perform on a piece of data. Setting this will hide from the user any activities without it set when performing an action on some data. Note that this is normally -not- set in the Intent when initiating an action -- it is for use in intent filters specified in packages.

Value: "android.intent.category.DEFAULT"

CATEGORY_DESK_DOCK

Added in API level 5
static val CATEGORY_DESK_DOCK: String

An activity to run when device is inserted into a desk dock. Used with ACTION_MAIN to launch an activity. For more information, see android.app.UiModeManager.

Value: "android.intent.category.DESK_DOCK"

CATEGORY_DEVELOPMENT_PREFERENCE

Added in API level 1
static val CATEGORY_DEVELOPMENT_PREFERENCE: String

This activity is a development preference panel.

Value: "android.intent.category.DEVELOPMENT_PREFERENCE"

CATEGORY_EMBED

Added in API level 1
static val CATEGORY_EMBED: String

Capable of running inside a parent activity container.

Value: "android.intent.category.EMBED"

CATEGORY_FRAMEWORK_INSTRUMENTATION_TEST

Added in API level 1
static val CATEGORY_FRAMEWORK_INSTRUMENTATION_TEST: String

To be used as code under test for framework instrumentation tests.

Value: "android.intent.category.FRAMEWORK_INSTRUMENTATION_TEST"

CATEGORY_HE_DESK_DOCK

Added in API level 11
static val CATEGORY_HE_DESK_DOCK: String

An activity to run when device is inserted into a digital (high end) dock. Used with ACTION_MAIN to launch an activity. For more information, see android.app.UiModeManager.

Value: "android.intent.category.HE_DESK_DOCK"

CATEGORY_HOME

Added in API level 1
static val CATEGORY_HOME: String

This is the home activity, that is the first activity that is displayed when the device boots.

Value: "android.intent.category.HOME"

CATEGORY_INFO

Added in API level 3
static val CATEGORY_INFO: String

Provides information about the package it is in; typically used if a package does not contain a CATEGORY_LAUNCHER to provide a front-door to the user without having to be shown in the all apps list.

Value: "android.intent.category.INFO"

CATEGORY_LAUNCHER

Added in API level 1
static val CATEGORY_LAUNCHER: String

Should be displayed in the top-level launcher.

Value: "android.intent.category.LAUNCHER"

CATEGORY_LEANBACK_LAUNCHER

Added in API level 21
static val CATEGORY_LEANBACK_LAUNCHER: String

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

Value: "android.intent.category.LEANBACK_LAUNCHER"

CATEGORY_LE_DESK_DOCK

Added in API level 11
static val CATEGORY_LE_DESK_DOCK: String

An activity to run when device is inserted into a analog (low end) dock. Used with ACTION_MAIN to launch an activity. For more information, see android.app.UiModeManager.

Value: "android.intent.category.LE_DESK_DOCK"

CATEGORY_MONKEY

Added in API level 1
static val CATEGORY_MONKEY: String

This activity may be exercised by the monkey or other automated test tools.

Value: "android.intent.category.MONKEY"

CATEGORY_OPENABLE

Added in API level 1
static val CATEGORY_OPENABLE: String

Used to indicate that an intent only wants URIs that can be opened with ContentResolver#openFileDescriptor(Uri, String). Openable URIs must support at least the columns defined in OpenableColumns when queried.

Value: "android.intent.category.OPENABLE"

CATEGORY_PREFERENCE

Added in API level 1
static val CATEGORY_PREFERENCE: String

This activity is a preference panel.

Value: "android.intent.category.PREFERENCE"

CATEGORY_SAMPLE_CODE

Added in API level 1
static val CATEGORY_SAMPLE_CODE: String

To be used as a sample code example (not part of the normal user experience).

Value: "android.intent.category.SAMPLE_CODE"

CATEGORY_SECONDARY_HOME

Added in API level 29
static val CATEGORY_SECONDARY_HOME: String

The home activity shown on secondary displays that support showing home activities.

Value: "android.intent.category.SECONDARY_HOME"

CATEGORY_SELECTED_ALTERNATIVE

Added in API level 1
static val CATEGORY_SELECTED_ALTERNATIVE: String

Set if the activity should be considered as an alternative selection action to the data the user has currently selected. This is like CATEGORY_ALTERNATIVE, but is used in activities showing a list of items from which the user can select, giving them alternatives to the default action that will be performed on it.

Value: "android.intent.category.SELECTED_ALTERNATIVE"

CATEGORY_TAB

Added in API level 1
static val CATEGORY_TAB: String

Intended to be used as a tab inside of a containing TabActivity.

Value: "android.intent.category.TAB"

CATEGORY_TEST

Added in API level 1
static val CATEGORY_TEST: String

To be used as a test (not part of the normal user experience).

Value: "android.intent.category.TEST"

CATEGORY_TYPED_OPENABLE

Added in API level 26
static val CATEGORY_TYPED_OPENABLE: String

Used to indicate that an intent filter can accept files which are not necessarily openable by ContentResolver#openFileDescriptor(Uri, String), but at least streamable via ContentResolver#openTypedAssetFileDescriptor(Uri, String, Bundle) using one of the stream types exposed via ContentResolver#getStreamTypes(Uri, String).

Value: "android.intent.category.TYPED_OPENABLE"

CATEGORY_UNIT_TEST

Added in API level 1
static val CATEGORY_UNIT_TEST: String

To be used as a unit test (run through the Test Harness).

Value: "android.intent.category.UNIT_TEST"

CATEGORY_VOICE

Added in API level 23
static val CATEGORY_VOICE: String

Categories for activities that can participate in voice interaction. An activity that supports this category must be prepared to run with no UI shown at all (though in some case it may have a UI shown), and rely on android.app.VoiceInteractor to interact with the user.

Value: "android.intent.category.VOICE"

CATEGORY_VR_HOME

Added in API level 26
static val CATEGORY_VR_HOME: String

An activity to use for the launcher when the device is placed in a VR Headset viewer. Used with ACTION_MAIN to launch an activity. For more information, see android.app.UiModeManager.

Value: "android.intent.category.VR_HOME"

CHOOSER_CONTENT_TYPE_ALBUM

Added in API level 35
static val CHOOSER_CONTENT_TYPE_ALBUM: Int

Indicates that the content being shared with ACTION_SEND represents an album (e.g. containing photos).

Value: 1

EXTRA_ALARM_COUNT

Added in API level 1
static val EXTRA_ALARM_COUNT: String

Used as an int extra field in android.app.AlarmManager pending intents to tell the application being invoked how many pending alarms are being delivered with the intent. For one-shot alarms this will always be 1. For recurring alarms, this might be greater than 1 if the device was asleep or powered off at the time an earlier alarm would have been delivered.

Note: You must supply a mutable android.app.PendingIntent to AlarmManager while setting your alarms to be able to read this value on receiving them. Mutability of pending intents must be explicitly specified by apps targeting Build.VERSION_CODES#S or higher.

Value: "android.intent.extra.ALARM_COUNT"

EXTRA_ALLOW_MULTIPLE

Added in API level 18
static val EXTRA_ALLOW_MULTIPLE: String

Extra used to indicate that an intent can allow the user to select and return multiple items. This is a boolean extra; the default is false. If true, an implementation is allowed to present the user with a UI where they can pick multiple items that are all returned to the caller. When this happens, they should be returned as the getClipData() part of the result Intent.

Value: "android.intent.extra.ALLOW_MULTIPLE"

EXTRA_ALLOW_REPLACE

Added in API level 14
Deprecated in API level 16
static val EXTRA_ALLOW_REPLACE: String

Deprecated: As of android.os.Build.VERSION_CODES#JELLY_BEAN, Android will no longer show an interstitial message about updating existing applications so this is no longer needed.

Used as a boolean extra field with ACTION_INSTALL_PACKAGE to install a package. Tells the installer UI to skip the confirmation with the user if the .apk is replacing an existing one.

Value: "android.intent.extra.ALLOW_REPLACE"

EXTRA_ALTERNATE_INTENTS

Added in API level 23
static val EXTRA_ALTERNATE_INTENTS: String

An Intent[] describing additional, alternate choices you would like shown with ACTION_CHOOSER.

An app may be capable of providing several different payload types to complete a user's intended action. For example, an app invoking ACTION_SEND to share photos with another app may use EXTRA_ALTERNATE_INTENTS to have the chooser transparently offer several different supported sending mechanisms for sharing, such as the actual "image/*" photo data or a hosted link where the photos can be viewed.

The intent present in EXTRA_INTENT will be treated as the first/primary/preferred intent in the set. Additional intents specified in this extra are ordered; by default intents that appear earlier in the array will be preferred over intents that appear later in the array as matches for the same target component. To alter this preference, a calling app may also supply EXTRA_CHOOSER_REFINEMENT_INTENT_SENDER.

Value: "android.intent.extra.ALTERNATE_INTENTS"

EXTRA_ARCHIVAL

Added in API level 35
static val EXTRA_ARCHIVAL: String

Used as a boolean extra field in android.content.Intent#ACTION_PACKAGE_ADDED and android.content.Intent#ACTION_PACKAGE_REMOVED intents to indicate that the package is being archived. Either by removing the existing APK, or by installing a package without an APK.

Value: "android.intent.extra.ARCHIVAL"

EXTRA_ASSIST_CONTEXT

Added in API level 18
static val EXTRA_ASSIST_CONTEXT: String

An optional field on ACTION_ASSIST and containing additional contextual information supplied by the current foreground app at the time of the assist request. This is a Bundle of additional data.

Value: "android.intent.extra.ASSIST_CONTEXT"

EXTRA_ASSIST_INPUT_DEVICE_ID

Added in API level 23
static val EXTRA_ASSIST_INPUT_DEVICE_ID: String

An optional field on ACTION_ASSIST containing the InputDevice id that was used to invoke the assist.

Value: "android.intent.extra.ASSIST_INPUT_DEVICE_ID"

EXTRA_ASSIST_INPUT_HINT_KEYBOARD

Added in API level 21
static val EXTRA_ASSIST_INPUT_HINT_KEYBOARD: String

An optional field on ACTION_ASSIST suggesting that the user will likely use a keyboard as the primary input device for assistance.

Value: "android.intent.extra.ASSIST_INPUT_HINT_KEYBOARD"

EXTRA_ASSIST_PACKAGE

Added in API level 18
static val EXTRA_ASSIST_PACKAGE: String

An optional field on ACTION_ASSIST containing the name of the current foreground application package at the time the assist was invoked.

Value: "android.intent.extra.ASSIST_PACKAGE"

EXTRA_ASSIST_UID

Added in API level 23
static val EXTRA_ASSIST_UID: String

An optional field on ACTION_ASSIST containing the uid of the current foreground application package at the time the assist was invoked.

Value: "android.intent.extra.ASSIST_UID"

EXTRA_ATTRIBUTION_TAGS

Added in API level 31
static val EXTRA_ATTRIBUTION_TAGS: String

A String[] holding attribution tags when used with ACTION_VIEW_PERMISSION_USAGE_FOR_PERIOD and ACTION_MANAGE_PERMISSION_USAGE E.g. an attribution tag could be location_provider, com.google.android.gms.*, etc.

Value: "android.intent.extra.ATTRIBUTION_TAGS"

EXTRA_AUTO_LAUNCH_SINGLE_CHOICE

Added in API level 29
static val EXTRA_AUTO_LAUNCH_SINGLE_CHOICE: String

Used as a boolean extra field in ACTION_CHOOSER intents to specify whether to show the chooser or not when there is only one application available to choose from.

Value: "android.intent.extra.AUTO_LAUNCH_SINGLE_CHOICE"

EXTRA_BCC

Added in API level 1
static val EXTRA_BCC: String

A String[] holding e-mail addresses that should be blind carbon copied.

Value: "android.intent.extra.BCC"

EXTRA_BUG_REPORT

Added in API level 14
static val EXTRA_BUG_REPORT: String

Used as a parcelable extra field in ACTION_APP_ERROR, containing the bug report.

Value: "android.intent.extra.BUG_REPORT"

EXTRA_CAPTURE_CONTENT_FOR_NOTE_STATUS_CODE

Added in API level 34
static val EXTRA_CAPTURE_CONTENT_FOR_NOTE_STATUS_CODE: String

An int extra used by activity started with ACTION_LAUNCH_CAPTURE_CONTENT_ACTIVITY_FOR_NOTE to indicate status of the response. This extra is used along with result code set to android.app.Activity#RESULT_OK.

The value for this extra can be one of the following:

Value: "android.intent.extra.CAPTURE_CONTENT_FOR_NOTE_STATUS_CODE"

EXTRA_CC

Added in API level 1
static val EXTRA_CC: String

A String[] holding e-mail addresses that should be carbon copied.

Value: "android.intent.extra.CC"

EXTRA_CHANGED_COMPONENT_NAME

Added in API level 5
Deprecated in API level 15
static val EXTRA_CHANGED_COMPONENT_NAME: String

Deprecated: See EXTRA_CHANGED_COMPONENT_NAME_LIST; this field will contain only the first name in the list.

Value: "android.intent.extra.changed_component_name"

EXTRA_CHANGED_COMPONENT_NAME_LIST

Added in API level 7
static val EXTRA_CHANGED_COMPONENT_NAME_LIST: String

This field is part of android.content.Intent#ACTION_PACKAGE_CHANGED, and contains a string array of all of the components that have changed. If the state of the overall package has changed, then it will contain an entry with the package name itself.

Value: "android.intent.extra.changed_component_name_list"

EXTRA_CHANGED_PACKAGE_LIST

Added in API level 8
static val EXTRA_CHANGED_PACKAGE_LIST: String

This field is part of android.content.Intent#ACTION_EXTERNAL_APPLICATIONS_AVAILABLE, android.content.Intent#ACTION_EXTERNAL_APPLICATIONS_UNAVAILABLE, android.content.Intent#ACTION_PACKAGES_SUSPENDED, android.content.Intent#ACTION_PACKAGES_UNSUSPENDED and contains a string array of all of the components that have changed.

Value: "android.intent.extra.changed_package_list"

EXTRA_CHANGED_UID_LIST

Added in API level 8
static val EXTRA_CHANGED_UID_LIST: String

This field is part of android.content.Intent#ACTION_EXTERNAL_APPLICATIONS_AVAILABLE, android.content.Intent#ACTION_EXTERNAL_APPLICATIONS_UNAVAILABLE and contains an integer array of uids of all of the components that have changed.

Value: "android.intent.extra.changed_uid_list"

EXTRA_CHOOSER_ADDITIONAL_CONTENT_URI

Added in API level 35
static val EXTRA_CHOOSER_ADDITIONAL_CONTENT_URI: String

Optional argument used to provide a ContentProviderUri to an ACTION_CHOOSER Intent which allows additional toggleable items to be included in the sharing UI.

For example, this could be used to show photos being shared in the context of the user's entire photo roll, with the option to change the set of photos being shared.

When this is provided in an ACTION_CHOOSER Intent with an ACTION_SEND or ACTION_SEND_MULTIPLE target Intent, the sharesheet will query (see ContentProvider#query(Uri, String[], Bundle, CancellationSignal)) this URI to retrieve a set of additional items available for selection. The set of items returned by the content provider is expected to contain all the items from the EXTRA_STREAM argument, in their relative order, which will be marked as selected. The URI's authority must be different from any shared items URI provided in EXTRA_STREAM or returned by the provider.

The Bundle argument of the ContentProvider#query(Uri, String[], Bundle, CancellationSignal) method will contains the original intent Chooser has been launched with under the EXTRA_INTENT key as a context for the current sharing session. The returned android.database.Cursor should contain:

When the user makes a selection change, ContentProvider#call(String, String, Bundle) method will be invoked with the "method" argument set to android.service.chooser.AdditionalContentContract.MethodNames#ON_SELECTION_CHANGED, the "arg" argument set to this argument's value, and the "extras" Bundle argument containing EXTRA_INTENT key containing the original intent Chooser has been launched with but with the modified target intent --Chooser will modify the target intent according to the selection changes made by the user. Applications may implement this method to change any of the following Chooser arguments by returning new values in the result bundle: EXTRA_CHOOSER_TARGETS, EXTRA_ALTERNATE_INTENTS, EXTRA_CHOOSER_CUSTOM_ACTIONS, EXTRA_CHOOSER_MODIFY_SHARE_ACTION, EXTRA_METADATA_TEXT, EXTRA_CHOOSER_REFINEMENT_INTENT_SENDER, EXTRA_CHOOSER_RESULT_INTENT_SENDER.

Value: "android.intent.extra.CHOOSER_ADDITIONAL_CONTENT_URI"

EXTRA_CHOOSER_CONTENT_TYPE_HINT

Added in API level 35
static val EXTRA_CHOOSER_CONTENT_TYPE_HINT: String

Optional integer extra to be used with ACTION_CHOOSER to describe conteng being shared.

If provided, sharesheets may customize their UI presentation to include a more precise description of the content being shared.

Value: "android.intent.extra.CHOOSER_CONTENT_TYPE_HINT"

EXTRA_CHOOSER_CUSTOM_ACTIONS

Added in API level 34
static val EXTRA_CHOOSER_CUSTOM_ACTIONS: String

A Parcelable[] of ChooserAction objects to provide the Android Sharesheet with app-specific actions to be presented to the user when invoking ACTION_CHOOSER. You can provide as many as five custom actions.

Value: "android.intent.extra.CHOOSER_CUSTOM_ACTIONS"

EXTRA_CHOOSER_FOCUSED_ITEM_POSITION

Added in API level 35
static val EXTRA_CHOOSER_FOCUSED_ITEM_POSITION: String

Optional argument to be used with EXTRA_CHOOSER_ADDITIONAL_CONTENT_URI, used in combination with EXTRA_CHOOSER_ADDITIONAL_CONTENT_URI. An integer, zero-based index into EXTRA_STREAM argument indicating the item that should be focused by the Chooser in preview.

Value: "android.intent.extra.CHOOSER_FOCUSED_ITEM_POSITION"

EXTRA_CHOOSER_MODIFY_SHARE_ACTION

Added in API level 34
static val EXTRA_CHOOSER_MODIFY_SHARE_ACTION: String

Optional argument to be used with ACTION_CHOOSER. A ChooserAction to allow the user to modify what is being shared in some way. This may be integrated into the content preview on sharesheets that have a preview UI.

Value: "android.intent.extra.CHOOSER_MODIFY_SHARE_ACTION"

EXTRA_CHOOSER_REFINEMENT_INTENT_SENDER

Added in API level 23
static val EXTRA_CHOOSER_REFINEMENT_INTENT_SENDER: String

An IntentSender for an Activity that will be invoked when the user makes a selection from the chooser activity presented by ACTION_CHOOSER.

An app preparing an action for another app to complete may wish to allow the user to disambiguate between several options for completing the action based on the chosen target or otherwise refine the action before it is invoked.

When sent, this IntentSender may be filled in with the following extras:

Value: "android.intent.extra.CHOOSER_REFINEMENT_INTENT_SENDER"

EXTRA_CHOOSER_RESULT

Added in API level 35
static val EXTRA_CHOOSER_RESULT: String

A ChooserResult which describes how the sharing session completed.

An instance is supplied to the optional IntentSender provided to createChooser(android.content.Intent,java.lang.CharSequence,android.content.IntentSender) when the session completes.

Value: "android.intent.extra.CHOOSER_RESULT"

EXTRA_CHOOSER_RESULT_INTENT_SENDER

Added in API level 35
static val EXTRA_CHOOSER_RESULT_INTENT_SENDER: String

An IntentSender that will be notified when a user successfully chooses a target component or initiates an action such as copy or edit within an ACTION_CHOOSER activity. The IntentSender will have the extra EXTRA_CHOOSER_RESULT describing the result.

Value: "android.intent.extra.CHOOSER_RESULT_INTENT_SENDER"

EXTRA_CHOOSER_TARGETS

Added in API level 24
static val EXTRA_CHOOSER_TARGETS: String

A ChooserTarget[] for ACTION_CHOOSER describing additional high-priority deep-link targets for the chooser to present to the user.

Targets provided in this way will be presented inline with all other targets provided by services from other apps. They will be prioritized before other service targets, but after those targets provided by sources that the user has manually pinned to the front. You can provide up to two targets on this extra (the limit of two targets starts in Android 10).

Value: "android.intent.extra.CHOOSER_TARGETS"

See Also

EXTRA_CHOSEN_COMPONENT

Added in API level 22
static val EXTRA_CHOSEN_COMPONENT: String

The ComponentName chosen by the user to complete an action.

Value: "android.intent.extra.CHOSEN_COMPONENT"

EXTRA_CHOSEN_COMPONENT_INTENT_SENDER

Added in API level 22
static val EXTRA_CHOSEN_COMPONENT_INTENT_SENDER: String

An IntentSender that will be notified if a user successfully chooses a target component to handle an action in an ACTION_CHOOSER activity. The IntentSender will have the extra EXTRA_CHOSEN_COMPONENT appended to it containing the ComponentName of the chosen component.

In some situations this callback may never come, for example if the user abandons the chooser, switches to another task or any number of other reasons. Apps should not be written assuming that this callback will always occur.

Value: "android.intent.extra.CHOSEN_COMPONENT_INTENT_SENDER"

EXTRA_COMPONENT_NAME

Added in API level 26
static val EXTRA_COMPONENT_NAME: String

Intent extra: A ComponentName value.

Type: String

Value: "android.intent.extra.COMPONENT_NAME"

EXTRA_CONTENT_ANNOTATIONS

Added in API level 26
static val EXTRA_CONTENT_ANNOTATIONS: String

An ArrayList of String annotations describing content for ACTION_CHOOSER.

If EXTRA_CONTENT_ANNOTATIONS is present in an intent used to start a ACTION_CHOOSER activity, the first three annotations will be used to rank apps.

Annotations should describe the major components or topics of the content. It is up to apps initiating ACTION_CHOOSER to learn and add annotations. Annotations should be learned in advance, e.g., when creating or saving content, to avoid increasing latency to start ACTION_CHOOSER. Names of customized annotations should not contain the colon character. Performance on customized annotations can suffer, if they are rarely used for ACTION_CHOOSER in the past 14 days. Therefore, it is recommended to use the following annotations when applicable.

  • "product" represents that the topic of the content is mainly about products, e.g., health & beauty, and office supplies.
  • "emotion" represents that the topic of the content is mainly about emotions, e.g., happy, and sad.
  • "person" represents that the topic of the content is mainly about persons, e.g., face, finger, standing, and walking.
  • "child" represents that the topic of the content is mainly about children, e.g., child, and baby.
  • "selfie" represents that the topic of the content is mainly about selfies.
  • "crowd" represents that the topic of the content is mainly about crowds.
  • "party" represents that the topic of the content is mainly about parties.
  • "animal" represent that the topic of the content is mainly about animals.
  • "plant" represents that the topic of the content is mainly about plants, e.g., flowers.
  • "vacation" represents that the topic of the content is mainly about vacations.
  • "fashion" represents that the topic of the content is mainly about fashion, e.g. sunglasses, jewelry, handbags and clothing.
  • "material" represents that the topic of the content is mainly about materials, e.g., paper, and silk.
  • "vehicle" represents that the topic of the content is mainly about vehicles, like cars, and boats.
  • "document" represents that the topic of the content is mainly about documents, e.g. posters.
  • "design" represents that the topic of the content is mainly about design, e.g. arts and designs of houses.
  • "holiday" represents that the topic of the content is mainly about holidays, e.g., Christmas and Thanksgiving.
Value: "android.intent.extra.CONTENT_ANNOTATIONS"

EXTRA_CONTENT_QUERY

Added in API level 29
static val EXTRA_CONTENT_QUERY: String

Optional CharSequence extra to provide a search query. The format of this query is dependent on the receiving application.

Applicable to Intent with actions:

Value: "android.intent.extra.CONTENT_QUERY"

EXTRA_DATA_REMOVED

Added in API level 3
static val EXTRA_DATA_REMOVED: String

Used as a boolean extra field in android.content.Intent#ACTION_PACKAGE_REMOVED intents to indicate whether this represents a full uninstall (removing both the code and its data) or a partial uninstall (leaving its data, implying that this is an update).

Value: "android.intent.extra.DATA_REMOVED"

EXTRA_DOCK_STATE

Added in API level 5
static val EXTRA_DOCK_STATE: String

Used as an int extra field in android.content.Intent#ACTION_DOCK_EVENT intents to request the dock state. Possible values are android.content.Intent#EXTRA_DOCK_STATE_UNDOCKED, android.content.Intent#EXTRA_DOCK_STATE_DESK, or android.content.Intent#EXTRA_DOCK_STATE_CAR, or android.content.Intent#EXTRA_DOCK_STATE_LE_DESK, or android.content.Intent#EXTRA_DOCK_STATE_HE_DESK.

Value: "android.intent.extra.DOCK_STATE"

EXTRA_DOCK_STATE_CAR

Added in API level 5
static val EXTRA_DOCK_STATE_CAR: Int

Used as an int value for android.content.Intent#EXTRA_DOCK_STATE to represent that the phone is in a car dock.

Value: 2

EXTRA_DOCK_STATE_DESK

Added in API level 5
static val EXTRA_DOCK_STATE_DESK: Int

Used as an int value for android.content.Intent#EXTRA_DOCK_STATE to represent that the phone is in a desk dock.

Value: 1

EXTRA_DOCK_STATE_HE_DESK

Added in API level 11
static val EXTRA_DOCK_STATE_HE_DESK: Int

Used as an int value for android.content.Intent#EXTRA_DOCK_STATE to represent that the phone is in a digital (high end) dock.

Value: 4

EXTRA_DOCK_STATE_LE_DESK

Added in API level 11
static val EXTRA_DOCK_STATE_LE_DESK: Int

Used as an int value for android.content.Intent#EXTRA_DOCK_STATE to represent that the phone is in a analog (low end) dock.

Value: 3

EXTRA_DOCK_STATE_UNDOCKED

Added in API level 5
static val EXTRA_DOCK_STATE_UNDOCKED: Int

Used as an int value for android.content.Intent#EXTRA_DOCK_STATE to represent that the phone is not in any dock.

Value: 0

EXTRA_DONT_KILL_APP

Added in API level 1
static val EXTRA_DONT_KILL_APP: String

Used as a boolean extra field in android.content.Intent#ACTION_PACKAGE_REMOVED or android.content.Intent#ACTION_PACKAGE_CHANGED intents to override the default action of restarting the application.

Value: "android.intent.extra.DONT_KILL_APP"

EXTRA_DURATION_MILLIS

Added in API level 29
static val EXTRA_DURATION_MILLIS: String

Intent extra: The number of milliseconds.

Type: long

Value: "android.intent.extra.DURATION_MILLIS"

EXTRA_EMAIL

Added in API level 1
static val EXTRA_EMAIL: String

A String[] holding e-mail addresses that should be delivered to.

Value: "android.intent.extra.EMAIL"

EXTRA_END_TIME

Added in API level 31
static val EXTRA_END_TIME: String

A long representing the end timestamp (epoch time in millis) of the permission usage when used with ACTION_VIEW_PERMISSION_USAGE_FOR_PERIOD and ACTION_MANAGE_PERMISSION_USAGE

Value: "android.intent.extra.END_TIME"

EXTRA_EXCLUDE_COMPONENTS

Added in API level 24
static val EXTRA_EXCLUDE_COMPONENTS: String

A ComponentName[] describing components that should be filtered out and omitted from a list of components presented to the user.

When used with ACTION_CHOOSER, the chooser will omit any of the components in this array if it otherwise would have shown them. Useful for omitting specific targets from your own package or other apps from your organization if the idea of sending to those targets would be redundant with other app functionality. Filtered components will not be able to present targets from an associated ChooserTargetService.

Value: "android.intent.extra.EXCLUDE_COMPONENTS"

EXTRA_FROM_STORAGE

Added in API level 26
static val EXTRA_FROM_STORAGE: String

Extra that can be included on activity intents coming from the storage UI when it launches sub-activities to manage various types of storage. For example, it may use ACTION_VIEW with a "image/*" MIME type to have an app show the images on the device, and in that case also include this extra to tell the app it is coming from the storage UI so should help the user manage storage of this type.

Value: "android.intent.extra.FROM_STORAGE"

EXTRA_HTML_TEXT

Added in API level 16
static val EXTRA_HTML_TEXT: String

A constant String that is associated with the Intent, used with ACTION_SEND to supply an alternative to EXTRA_TEXT as HTML formatted text. Note that you must also supply EXTRA_TEXT.

Value: "android.intent.extra.HTML_TEXT"

EXTRA_INDEX

Added in API level 24
static val EXTRA_INDEX: String

Optional index with semantics depending on the intent action.

The value must be an integer greater or equal to 0.

Value: "android.intent.extra.INDEX"

EXTRA_INITIAL_INTENTS

Added in API level 5
static val EXTRA_INITIAL_INTENTS: String

A Parcelable[] of Intent or android.content.pm.LabeledIntent objects as set with putExtra(java.lang.String,android.os.Parcelable[]) to place at the front of the list of choices, when shown to the user with an ACTION_CHOOSER. You can choose up to two additional activities to show before the app suggestions (the limit of two additional activities starts in Android 10).

Value: "android.intent.extra.INITIAL_INTENTS"

EXTRA_INSTALLER_PACKAGE_NAME

Added in API level 14
static val EXTRA_INSTALLER_PACKAGE_NAME: String

Used as a string extra field with ACTION_INSTALL_PACKAGE to install a package. Specifies the installer package name; this package will receive the ACTION_APP_ERROR intent.

Value: "android.intent.extra.INSTALLER_PACKAGE_NAME"

EXTRA_INTENT

Added in API level 1
static val EXTRA_INTENT: String

An Intent describing the choices you would like shown with ACTION_PICK_ACTIVITY or ACTION_CHOOSER.

Value: "android.intent.extra.INTENT"

EXTRA_KEY_EVENT

Added in API level 1
static val EXTRA_KEY_EVENT: String

A android.view.KeyEvent object containing the event that triggered the creation of the Intent it is in.

Value: "android.intent.extra.KEY_EVENT"

EXTRA_LOCALE_LIST

Added in API level 33
static val EXTRA_LOCALE_LIST: String

Intent extra: A android.os.LocaleList

Type: LocaleList

Value: "android.intent.extra.LOCALE_LIST"

EXTRA_LOCAL_ONLY

Added in API level 11
static val EXTRA_LOCAL_ONLY: String

Extra used to indicate that an intent should only return data that is on the local device. This is a boolean extra; the default is false. If true, an implementation should only allow the user to select data that is already on the device, not requiring it be downloaded from a remote service when opened.

Value: "android.intent.extra.LOCAL_ONLY"

EXTRA_LOCUS_ID

Added in API level 29
static val EXTRA_LOCUS_ID: String

Intent extra: ID of the context used on ACTION_VIEW_LOCUS.

Type: LocusId

Value: "android.intent.extra.LOCUS_ID"

EXTRA_METADATA_TEXT

Added in API level 35
static val EXTRA_METADATA_TEXT: String

A CharSequence of additional text describing the content being shared. This text will be displayed to the user as a part of the sharesheet when included in an ACTION_CHOOSER Intent.

e.g. When sharing a photo, metadata could inform the user that location data is included in the photo they are sharing.

Value: "android.intent.extra.METADATA_TEXT"

EXTRA_MIME_TYPES

Added in API level 19
static val EXTRA_MIME_TYPES: String

Extra used to communicate a set of acceptable MIME types. The type of the extra is String[]. Values may be a combination of concrete MIME types (such as "image/png") and/or partial MIME types (such as "audio/*").

Value: "android.intent.extra.MIME_TYPES"

EXTRA_NOT_UNKNOWN_SOURCE

Added in API level 14
static val EXTRA_NOT_UNKNOWN_SOURCE: String

Used as a boolean extra field with ACTION_INSTALL_PACKAGE to install a package. Specifies that the application being installed should not be treated as coming from an unknown source, but as coming from the app invoking the Intent. For this to work you must start the installer with startActivityForResult().

Value: "android.intent.extra.NOT_UNKNOWN_SOURCE"

EXTRA_ORIGINATING_URI

Added in API level 17
static val EXTRA_ORIGINATING_URI: String

Used as a URI extra field with ACTION_INSTALL_PACKAGE and ACTION_VIEW to indicate the URI from which the local APK in the Intent data field originated from.

Value: "android.intent.extra.ORIGINATING_URI"

EXTRA_PACKAGES

Added in API level 34
static val EXTRA_PACKAGES: String

String array of package names.

Value: "android.intent.extra.PACKAGES"

EXTRA_PACKAGE_NAME

Added in API level 24
static val EXTRA_PACKAGE_NAME: String

Intent extra: An app package name.

Type: String

Value: "android.intent.extra.PACKAGE_NAME"

EXTRA_PERMISSION_GROUP_NAME

Added in API level 31
static val EXTRA_PERMISSION_GROUP_NAME: String

Intent extra: The name of a permission group.

Type: String

Value: "android.intent.extra.PERMISSION_GROUP_NAME"

EXTRA_PHONE_NUMBER

Added in API level 1
static val EXTRA_PHONE_NUMBER: String

A String holding the phone number originally entered in android.content.Intent#ACTION_NEW_OUTGOING_CALL, or the actual number to call in a android.content.Intent#ACTION_CALL.

Value: "android.intent.extra.PHONE_NUMBER"

EXTRA_PROCESS_TEXT

Added in API level 23
static val EXTRA_PROCESS_TEXT: String

The name of the extra used to define the text to be processed, as a CharSequence. Note that this may be a styled CharSequence, so you must use Bundle.getCharSequence() to retrieve it.

Value: "android.intent.extra.PROCESS_TEXT"

EXTRA_PROCESS_TEXT_READONLY

Added in API level 23
static val EXTRA_PROCESS_TEXT_READONLY: String

The name of the boolean extra used to define if the processed text will be used as read-only.

Value: "android.intent.extra.PROCESS_TEXT_READONLY"

EXTRA_QUICK_VIEW_FEATURES

Added in API level 26
static val EXTRA_QUICK_VIEW_FEATURES: String

An optional extra of String[] indicating which quick view features should be made available to the user in the quick view UI while handing a Intent#ACTION_QUICK_VIEW intent.

  • Enumeration of features here is not meant to restrict capabilities of the quick viewer. Quick viewer can implement features not listed below.
  • Features included at this time are: QuickViewConstants#FEATURE_VIEW, QuickViewConstants#FEATURE_EDIT, QuickViewConstants#FEATURE_DELETE, QuickViewConstants#FEATURE_DOWNLOAD, QuickViewConstants#FEATURE_SEND, QuickViewConstants#FEATURE_PRINT.

    Requirements:

  • Quick viewer shouldn't show a feature if the feature is absent in EXTRA_QUICK_VIEW_FEATURES.
  • When EXTRA_QUICK_VIEW_FEATURES is not present, quick viewer should follow internal policies.
  • Presence of an feature in EXTRA_QUICK_VIEW_FEATURES, does not constitute a requirement that the feature be shown. Quick viewer may, according to its own policies, disable or hide features.
  • Value: "android.intent.extra.QUICK_VIEW_FEATURES"

    EXTRA_QUIET_MODE

    Added in API level 24
    static val EXTRA_QUIET_MODE: String

    Optional boolean extra indicating whether quiet mode has been switched on or off. When a profile goes into quiet mode, all apps in the profile are killed and the profile user is stopped. Widgets originating from the profile are masked, and app launcher icons are grayed out.

    Value: "android.intent.extra.QUIET_MODE"

    EXTRA_REFERRER

    Added in API level 17
    static val EXTRA_REFERRER: String

    This extra can be used with any Intent used to launch an activity, supplying information about who is launching that activity. This field contains a android.net.Uri object, typically an http: or https: URI of the web site that the referral came from; it can also use the android-app: scheme to identify a native application that it came from.

    To retrieve this value in a client, use android.app.Activity#getReferrer instead of directly retrieving the extra. It is also valid for applications to instead supply EXTRA_REFERRER_NAME for cases where they can only create a string, not a Uri; the field here, if supplied, will always take precedence, however.

    Value: "android.intent.extra.REFERRER"

    EXTRA_REFERRER_NAME

    Added in API level 22
    static val EXTRA_REFERRER_NAME: String

    Alternate version of EXTRA_REFERRER that supplies the URI as a String rather than a android.net.Uri object. Only for use in cases where Uri objects can not be created, in particular when Intent extras are supplied through the intent: or android-app: schemes.

    Value: "android.intent.extra.REFERRER_NAME"

    See Also

    EXTRA_REMOTE_INTENT_TOKEN

    Added in API level 5
    static val EXTRA_REMOTE_INTENT_TOKEN: String

    Used in the extra field in the remote intent. It's a string token passed with the remote intent.

    Value: "android.intent.extra.remote_intent_token"

    EXTRA_REPLACEMENT_EXTRAS

    Added in API level 21
    static val EXTRA_REPLACEMENT_EXTRAS: String

    A Bundle forming a mapping of potential target package names to different extras Bundles to add to the default intent extras in EXTRA_INTENT when used with ACTION_CHOOSER. Each key should be a package name. The package need not be currently installed on the device.

    An application may choose to provide alternate extras for the case where a user selects an activity from a predetermined set of target packages. If the activity the user selects from the chooser belongs to a package with its package name as a key in this bundle, the corresponding extras for that package will be merged with the extras already present in the intent at EXTRA_INTENT. If a replacement extra has the same key as an extra already present in the intent it will overwrite the extra from the intent.

    Examples:

    • An application may offer different EXTRA_TEXT to an application when sharing with it via ACTION_SEND, augmenting a link with additional query parameters for that target.
    • An application may offer additional metadata for known targets of a given intent to pass along information only relevant to that target such as account or content identifiers already known to that application.

    Value: "android.intent.extra.REPLACEMENT_EXTRAS"

    EXTRA_REPLACING

    Added in API level 3
    static val EXTRA_REPLACING: String

    Used as a boolean extra field in android.content.Intent#ACTION_PACKAGE_REMOVED intents to indicate that this is a replacement of the package, so this broadcast will immediately be followed by an add broadcast for a different version of the same package.

    Value: "android.intent.extra.REPLACING"

    EXTRA_RESTRICTIONS_BUNDLE

    Added in API level 18
    static val EXTRA_RESTRICTIONS_BUNDLE: String

    Extra sent in the intent to the BroadcastReceiver that handles ACTION_GET_RESTRICTION_ENTRIES. The type of the extra is a Bundle containing the restrictions as key/value pairs.

    Value: "android.intent.extra.restrictions_bundle"

    EXTRA_RESTRICTIONS_INTENT

    Added in API level 18
    static val EXTRA_RESTRICTIONS_INTENT: String

    Extra used in the response from a BroadcastReceiver that handles ACTION_GET_RESTRICTION_ENTRIES.

    Value: "android.intent.extra.restrictions_intent"

    EXTRA_RESTRICTIONS_LIST

    Added in API level 18
    static val EXTRA_RESTRICTIONS_LIST: String

    Extra used in the response from a BroadcastReceiver that handles ACTION_GET_RESTRICTION_ENTRIES. The type of the extra is ArrayList<RestrictionEntry>.

    Value: "android.intent.extra.restrictions_list"

    EXTRA_RESULT_RECEIVER

    Added in API level 23
    static val EXTRA_RESULT_RECEIVER: String

    A ResultReceiver used to return data back to the sender.

    Used to complete an app-specific refinement for ACTION_CHOOSER.

    If EXTRA_CHOOSER_REFINEMENT_INTENT_SENDER is present in the intent used to start a ACTION_CHOOSER activity this extra will be filled in to that IntentSender and sent when the user selects a target component from the chooser. It is up to the recipient to send a result to this ResultReceiver to signal that disambiguation is complete and that the chooser should invoke the user's choice.

    The disambiguator should provide a Bundle to the ResultReceiver with an intent assigned to the key EXTRA_INTENT. This supplied intent will be used by the chooser to match and fill in the final Intent or ChooserTarget before starting it. The supplied intent must match one of the intents from EXTRA_INTENT or EXTRA_ALTERNATE_INTENTS passed to EXTRA_CHOOSER_REFINEMENT_INTENT_SENDER to be accepted.

    The result code passed to the ResultReceiver should be android.app.Activity#RESULT_OK if the refinement succeeded and the supplied intent's target in the chooser should be started, or android.app.Activity#RESULT_CANCELED if the chooser should finish without starting a target.

    Value: "android.intent.extra.RESULT_RECEIVER"

    EXTRA_RETURN_RESULT

    Added in API level 14
    static val EXTRA_RETURN_RESULT: String

    Used as a boolean extra field with ACTION_INSTALL_PACKAGE or ACTION_UNINSTALL_PACKAGE. Specifies that the installer UI should return to the application the result code of the install/uninstall. The returned result code will be android.app.Activity#RESULT_OK on success or android.app.Activity#RESULT_FIRST_USER on failure.

    Value: "android.intent.extra.RETURN_RESULT"

    EXTRA_SHORTCUT_ICON

    Added in API level 1
    Deprecated in API level 26
    static val EXTRA_SHORTCUT_ICON: String

    Deprecated: Replaced with android.content.pm.ShortcutManager#createShortcutResultIntent

    The name of the extra used to define the icon, as a Bitmap, of a shortcut.

    Value: "android.intent.extra.shortcut.ICON"

    EXTRA_SHORTCUT_ICON_RESOURCE

    Added in API level 1
    Deprecated in API level 26
    static val EXTRA_SHORTCUT_ICON_RESOURCE: String

    Deprecated: Replaced with android.content.pm.ShortcutManager#createShortcutResultIntent

    The name of the extra used to define the icon, as a ShortcutIconResource, of a shortcut.

    Value: "android.intent.extra.shortcut.ICON_RESOURCE"

    EXTRA_SHORTCUT_ID

    Added in API level 29
    static val EXTRA_SHORTCUT_ID: String

    Intent extra: ID of the shortcut used to send the share intent. Will be sent with ACTION_SEND.

    Value: "android.intent.extra.shortcut.ID"

    EXTRA_SHORTCUT_INTENT

    Added in API level 1
    Deprecated in API level 26
    static val EXTRA_SHORTCUT_INTENT: String

    Deprecated: Replaced with android.content.pm.ShortcutManager#createShortcutResultIntent

    The name of the extra used to define the Intent of a shortcut.

    Value: "android.intent.extra.shortcut.INTENT"

    EXTRA_SHORTCUT_NAME

    Added in API level 1
    Deprecated in API level 26
    static val EXTRA_SHORTCUT_NAME: String

    Deprecated: Replaced with android.content.pm.ShortcutManager#createShortcutResultIntent

    The name of the extra used to define the name of a shortcut.

    Value: "android.intent.extra.shortcut.NAME"

    EXTRA_SHUTDOWN_USERSPACE_ONLY

    Added in API level 19
    static val EXTRA_SHUTDOWN_USERSPACE_ONLY: String

    Optional extra for ACTION_SHUTDOWN that allows the sender to qualify that this shutdown is only for the user space of the system, not a complete shutdown. When this is true, hardware devices can use this information to determine that they shouldn't do a complete shutdown of their device since this is not a complete shutdown down to the kernel, but only user space restarting. The default if not supplied is false.

    Value: "android.intent.extra.SHUTDOWN_USERSPACE_ONLY"

    EXTRA_SPLIT_NAME

    Added in API level 27
    static val EXTRA_SPLIT_NAME: String

    Intent extra: An app split name.

    Type: String

    Value: "android.intent.extra.SPLIT_NAME"

    EXTRA_START_TIME

    Added in API level 31
    static val EXTRA_START_TIME: String

    A long representing the start timestamp (epoch time in millis) of the permission usage when used with ACTION_VIEW_PERMISSION_USAGE_FOR_PERIOD and ACTION_MANAGE_PERMISSION_USAGE

    Value: "android.intent.extra.START_TIME"

    EXTRA_STREAM

    Added in API level 1
    static val EXTRA_STREAM: String

    A content: URI holding a stream of data associated with the Intent, used with ACTION_SEND to supply the data being sent.

    Value: "android.intent.extra.STREAM"

    EXTRA_SUBJECT

    Added in API level 1
    static val EXTRA_SUBJECT: String

    A constant string holding the desired subject line of a message.

    Value: "android.intent.extra.SUBJECT"

    EXTRA_SUSPENDED_PACKAGE_EXTRAS

    Added in API level 28
    static val EXTRA_SUSPENDED_PACKAGE_EXTRAS: String

    Intent extra: A Bundle of extras for a package being suspended. Will be sent as an extra with ACTION_MY_PACKAGE_SUSPENDED.

    The contents of this Bundle are a contract between the suspended app and the suspending app, i.e. any app with the permission android.permission.SUSPEND_APPS. This is meant to enable the suspended app to better handle the state of being suspended.

    Value: "android.intent.extra.SUSPENDED_PACKAGE_EXTRAS"

    EXTRA_TEMPLATE

    Added in API level 1
    static val EXTRA_TEMPLATE: String

    The initial data to place in a newly created record. Use with ACTION_INSERT. The data here is a Map containing the same fields as would be given to the underlying ContentProvider.insert() call.

    Value: "android.intent.extra.TEMPLATE"

    EXTRA_TEXT

    Added in API level 1
    static val EXTRA_TEXT: String

    A constant CharSequence that is associated with the Intent, used with ACTION_SEND to supply the literal data to be sent. Note that this may be a styled CharSequence, so you must use Bundle.getCharSequence() to retrieve it.

    Value: "android.intent.extra.TEXT"

    EXTRA_TIME

    Added in API level 30
    static val EXTRA_TIME: String

    Optional extra specifying a time in milliseconds. The timebase depends on the Intent including this extra. The value must be non-negative.

    Type: long

    Value: "android.intent.extra.TIME"

    EXTRA_TIMEZONE

    Added in API level 30
    static val EXTRA_TIMEZONE: String

    Extra sent with ACTION_TIMEZONE_CHANGED specifying the new time zone of the device.

    Type: String, the same as returned by TimeZone#getID() to identify time zones.

    Value: "time-zone"

    EXTRA_TITLE

    Added in API level 1
    static val EXTRA_TITLE: String

    A CharSequence dialog title to provide to the user when used with a ACTION_CHOOSER.

    Value: "android.intent.extra.TITLE"

    EXTRA_UID

    Added in API level 1
    static val EXTRA_UID: String

    Used as an int extra field in android.content.Intent#ACTION_UID_REMOVED intents to supply the uid the package had been assigned. Also an optional extra in android.content.Intent#ACTION_PACKAGE_REMOVED or android.content.Intent#ACTION_PACKAGE_CHANGED for the same purpose.

    Value: "android.intent.extra.UID"

    EXTRA_USER

    Added in API level 21
    static val EXTRA_USER: String

    The UserHandle carried with intents.

    Value: "android.intent.extra.USER"

    EXTRA_USER_INITIATED

    Added in API level 31
    static val EXTRA_USER_INITIATED: String

    Used as a boolean extra field in android.content.Intent#ACTION_PACKAGE_REMOVED intents to signal that the application was removed with the user-initiated action.

    Value: "android.intent.extra.USER_INITIATED"

    EXTRA_USE_STYLUS_MODE

    Added in API level 34
    static val EXTRA_USE_STYLUS_MODE: String

    A boolean extra used with ACTION_CREATE_NOTE indicating whether the launched note-taking activity should show a UI that is suitable to use with stylus input.

    Value: "android.intent.extra.USE_STYLUS_MODE"

    FILL_IN_ACTION

    Added in API level 1
    static val FILL_IN_ACTION: Int

    Use with fillIn to allow the current action value to be overwritten, even if it is already set.

    Value: 1

    FILL_IN_CATEGORIES

    Added in API level 1
    static val FILL_IN_CATEGORIES: Int

    Use with fillIn to allow the current categories to be overwritten, even if they are already set.

    Value: 4

    FILL_IN_CLIP_DATA

    Added in API level 16
    static val FILL_IN_CLIP_DATA: Int

    Use with fillIn to allow the current ClipData to be overwritten, even if it is already set.

    Value: 128

    FILL_IN_COMPONENT

    Added in API level 1
    static val FILL_IN_COMPONENT: Int

    Use with fillIn to allow the current component value to be overwritten, even if it is already set.

    Value: 8

    FILL_IN_DATA

    Added in API level 1
    static val FILL_IN_DATA: Int

    Use with fillIn to allow the current data or type value overwritten, even if it is already set.

    Value: 2

    FILL_IN_IDENTIFIER

    Added in API level 29
    static val FILL_IN_IDENTIFIER: Int

    Use with fillIn to allow the current identifier value to be overwritten, even if it is already set.

    Value: 256

    FILL_IN_PACKAGE

    Added in API level 4
    static val FILL_IN_PACKAGE: Int

    Use with fillIn to allow the current package value to be overwritten, even if it is already set.

    Value: 16

    FILL_IN_SELECTOR

    Added in API level 15
    static val FILL_IN_SELECTOR: Int

    Use with fillIn to allow the current selector to be overwritten, even if it is already set.

    Value: 64

    FILL_IN_SOURCE_BOUNDS

    Added in API level 7
    static val FILL_IN_SOURCE_BOUNDS: Int

    Use with fillIn to allow the current bounds rectangle to be overwritten, even if it is already set.

    Value: 32

    FLAG_ACTIVITY_BROUGHT_TO_FRONT

    Added in API level 1
    static val FLAG_ACTIVITY_BROUGHT_TO_FRONT: Int

    This flag is not normally set by application code, but set for you by the system as described in the launchMode documentation for the singleTask mode.

    Value: 4194304

    FLAG_ACTIVITY_CLEAR_TASK

    Added in API level 11
    static val FLAG_ACTIVITY_CLEAR_TASK: Int

    If set in an Intent passed to android.content.Context#startActivity, this flag will cause any existing task that would be associated with the activity to be cleared before the activity is started. That is, the activity becomes the new root of an otherwise empty task, and any old activities are finished. This can only be used in conjunction with FLAG_ACTIVITY_NEW_TASK.

    Value: 32768

    FLAG_ACTIVITY_CLEAR_TOP

    Added in API level 1
    static val FLAG_ACTIVITY_CLEAR_TOP: Int

    If set, and the activity being launched is already running in the current task, then instead of launching a new instance of that activity, all of the other activities on top of it will be closed and this Intent will be delivered to the (now on top) old activity as a new Intent.

    For example, consider a task consisting of the activities: A, B, C, D. If D calls startActivity() with an Intent that resolves to the component of activity B, then C and D will be finished and B receive the given Intent, resulting in the stack now being: A, B.

    The currently running instance of activity B in the above example will either receive the new intent you are starting here in its onNewIntent() method, or be itself finished and restarted with the new intent. If it has declared its launch mode to be "multiple" (the default) and you have not set FLAG_ACTIVITY_SINGLE_TOP in the same intent, then it will be finished and re-created; for all other launch modes or if FLAG_ACTIVITY_SINGLE_TOP is set then this Intent will be delivered to the current instance's onNewIntent().

    This launch mode can also be used to good effect in conjunction with FLAG_ACTIVITY_NEW_TASK: if used to start the root activity of a task, it will bring any currently running instance of that task to the foreground, and then clear it to its root state. This is especially useful, for example, when launching an activity from the notification manager.

    See Tasks and Back Stack for more information about tasks.

    Value: 67108864

    FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET

    Added in API level 3
    Deprecated in API level 21
    static val FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET: Int

    Deprecated: As of API 21 this performs identically to FLAG_ACTIVITY_NEW_DOCUMENT which should be used instead of this.

    Value: 524288

    FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS

    Added in API level 1
    static val FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS: Int

    If set, the new activity is not kept in the list of recently launched activities.

    Value: 8388608

    FLAG_ACTIVITY_FORWARD_RESULT

    Added in API level 1
    static val FLAG_ACTIVITY_FORWARD_RESULT: Int

    If set and this intent is being used to launch a new activity from an existing one, then the reply target of the existing activity will be transferred to the new activity. This way, the new activity can call android.app.Activity#setResult and have that result sent back to the reply target of the original activity.

    Value: 33554432

    FLAG_ACTIVITY_LAUNCHED_FROM_HISTORY

    Added in API level 1
    static val FLAG_ACTIVITY_LAUNCHED_FROM_HISTORY: Int

    This flag is not normally set by application code, but set for you by the system if this activity is being launched from history.

    Value: 1048576

    FLAG_ACTIVITY_LAUNCH_ADJACENT

    Added in API level 24
    static val FLAG_ACTIVITY_LAUNCH_ADJACENT: Int

    This flag is only used for split-screen multi-window mode. The new activity will be displayed adjacent to the one launching it. This can only be used in conjunction with FLAG_ACTIVITY_NEW_TASK. Also, setting FLAG_ACTIVITY_MULTIPLE_TASK is required if you want a new instance of an existing activity to be created.

    Value: 4096

    FLAG_ACTIVITY_MATCH_EXTERNAL

    Added in API level 28
    static val FLAG_ACTIVITY_MATCH_EXTERNAL: Int

    If set in an Intent passed to android.content.Context#startActivity, this flag will attempt to launch an instant app if no full app on the device can already handle the intent.

    When attempting to resolve instant apps externally, the following Intent properties are supported:

    In the case that no instant app can be found, the installer will be launched to notify the user that the intent could not be resolved. On devices that do not support instant apps, the flag will be ignored.

    Value: 2048

    FLAG_ACTIVITY_MULTIPLE_TASK

    Added in API level 1
    static val FLAG_ACTIVITY_MULTIPLE_TASK: Int

    This flag is used to create a new task and launch an activity into it. This flag is always paired with either FLAG_ACTIVITY_NEW_DOCUMENT or FLAG_ACTIVITY_NEW_TASK. In both cases these flags alone would search through existing tasks for ones matching this Intent. Only if no such task is found would a new task be created. When paired with FLAG_ACTIVITY_MULTIPLE_TASK both of these behaviors are modified to skip the search for a matching task and unconditionally start a new task. When used with FLAG_ACTIVITY_NEW_TASK do not use this flag unless you are implementing your own top-level application launcher. Used in conjunction with FLAG_ACTIVITY_NEW_TASK to disable the behavior of bringing an existing task to the foreground. When set, a new task is always started to host the Activity for the Intent, regardless of whether there is already an existing task running the same thing.

    Because the default system does not include graphical task management, you should not use this flag unless you provide some way for a user to return back to the tasks you have launched. See FLAG_ACTIVITY_NEW_DOCUMENT for details of this flag's use for creating new document tasks.

    This flag is ignored if one of FLAG_ACTIVITY_NEW_TASK or FLAG_ACTIVITY_NEW_DOCUMENT is not also set.

    See Tasks and Back Stack for more information about tasks.

    Value: 134217728

    FLAG_ACTIVITY_NEW_DOCUMENT

    Added in API level 21
    static val FLAG_ACTIVITY_NEW_DOCUMENT: Int

    This flag is used to open a document into a new task rooted at the activity launched by this Intent. Through the use of this flag, or its equivalent attribute, android.R.attr#documentLaunchMode multiple instances of the same activity containing different documents will appear in the recent tasks list.

    The use of the activity attribute form of this, android.R.attr#documentLaunchMode, is preferred over the Intent flag described here. The attribute form allows the Activity to specify multiple document behavior for all launchers of the Activity whereas using this flag requires each Intent that launches the Activity to specify it.

    Note that the default semantics of this flag w.r.t. whether the recents entry for it is kept after the activity is finished is different than the use of FLAG_ACTIVITY_NEW_TASK and android.R.attr#documentLaunchMode -- if this flag is being used to create a new recents entry, then by default that entry will be removed once the activity is finished. You can modify this behavior with FLAG_ACTIVITY_RETAIN_IN_RECENTS.

    FLAG_ACTIVITY_NEW_DOCUMENT may be used in conjunction with FLAG_ACTIVITY_MULTIPLE_TASK. When used alone it is the equivalent of the Activity manifest specifying android.R.attr#documentLaunchMode="intoExisting". When used with FLAG_ACTIVITY_MULTIPLE_TASK it is the equivalent of the Activity manifest specifying android.R.attr#documentLaunchMode="always". The flag is ignored even in conjunction with FLAG_ACTIVITY_MULTIPLE_TASK when the Activity manifest specifies android.R.attr#documentLaunchMode="never". Refer to android.R.attr#documentLaunchMode for more information.

    Value: 524288

    FLAG_ACTIVITY_NEW_TASK

    Added in API level 1
    static val FLAG_ACTIVITY_NEW_TASK: Int

    If set, this activity will become the start of a new task on this history stack. A task (from the activity that started it to the next task activity) defines an atomic group of activities that the user can move to. Tasks can be moved to the foreground and background; all of the activities inside of a particular task always remain in the same order. See Tasks and Back Stack for more information about tasks.

    This flag is generally used by activities that want to present a "launcher" style behavior: they give the user a list of separate things that can be done, which otherwise run completely independently of the activity launching them.

    When using this flag, if a task is already running for the activity you are now starting, then a new activity will not be started; instead, the current task will simply be brought to the front of the screen with the state it was last in. See FLAG_ACTIVITY_MULTIPLE_TASK for a flag to disable this behavior.

    This flag can not be used when the caller is requesting a result from the activity being launched.

    Value: 268435456

    FLAG_ACTIVITY_NO_ANIMATION

    Added in API level 5
    static val FLAG_ACTIVITY_NO_ANIMATION: Int

    If set in an Intent passed to android.content.Context#startActivity, this flag will prevent the system from applying an activity transition animation to go to the next activity state. This doesn't mean an animation will never run -- if another activity change happens that doesn't specify this flag before the activity started here is displayed, then that transition will be used. This flag can be put to good use when you are going to do a series of activity operations but the animation seen by the user shouldn't be driven by the first activity change but rather a later one.

    Value: 65536

    FLAG_ACTIVITY_NO_HISTORY

    Added in API level 1
    static val FLAG_ACTIVITY_NO_HISTORY: Int

    If set, the new activity is not kept in the history stack. As soon as the user navigates away from it, the activity is finished. This may also be set with the noHistory attribute.

    If set, android.app.Activity#onActivityResult is never invoked when the current activity starts a new activity which sets a result and finishes.

    Value: 1073741824

    FLAG_ACTIVITY_NO_USER_ACTION

    Added in API level 3
    static val FLAG_ACTIVITY_NO_USER_ACTION: Int

    If set, this flag will prevent the normal android.app.Activity#onUserLeaveHint callback from occurring on the current frontmost activity before it is paused as the newly-started activity is brought to the front.

    Typically, an activity can rely on that callback to indicate that an explicit user action has caused their activity to be moved out of the foreground. The callback marks an appropriate point in the activity's lifecycle for it to dismiss any notifications that it intends to display "until the user has seen them," such as a blinking LED.

    If an activity is ever started via any non-user-driven events such as phone-call receipt or an alarm handler, this flag should be passed to android.content.Context#startActivity, ensuring that the pausing activity does not think the user has acknowledged its notification.

    Value: 262144

    FLAG_ACTIVITY_PREVIOUS_IS_TOP

    Added in API level 1
    static val FLAG_ACTIVITY_PREVIOUS_IS_TOP: Int

    If set and this intent is being used to launch a new activity from an existing one, the current activity will not be counted as the top activity for deciding whether the new intent should be delivered to the top instead of starting a new one. The previous activity will be used as the top, with the assumption being that the current activity will finish itself immediately.

    Value: 16777216

    FLAG_ACTIVITY_REORDER_TO_FRONT

    Added in API level 3
    static val FLAG_ACTIVITY_REORDER_TO_FRONT: Int

    If set in an Intent passed to android.content.Context#startActivity, this flag will cause the launched activity to be brought to the front of its task's history stack if it is already running.

    For example, consider a task consisting of four activities: A, B, C, D. If D calls startActivity() with an Intent that resolves to the component of activity B, then B will be brought to the front of the history stack, with this resulting order: A, C, D, B. This flag will be ignored if FLAG_ACTIVITY_CLEAR_TOP is also specified.

    Value: 131072

    FLAG_ACTIVITY_REQUIRE_DEFAULT

    Added in API level 30
    static val FLAG_ACTIVITY_REQUIRE_DEFAULT: Int

    If set in an intent passed to android.content.Context#startActivity, this flag will only launch the intent if it resolves to a single result. If no such result exists or if the system chooser would otherwise be displayed, an ActivityNotFoundException will be thrown.

    Value: 512

    FLAG_ACTIVITY_REQUIRE_NON_BROWSER

    Added in API level 30
    static val FLAG_ACTIVITY_REQUIRE_NON_BROWSER: Int

    If set in an intent passed to android.content.Context#startActivity, this flag will only launch the intent if it resolves to a result that is not a browser. If no such result exists, an ActivityNotFoundException will be thrown.

    Value: 1024

    FLAG_ACTIVITY_RESET_TASK_IF_NEEDED

    Added in API level 1
    static val FLAG_ACTIVITY_RESET_TASK_IF_NEEDED: Int

    If set, and this activity is either being started in a new task or bringing to the top an existing task, then it will be launched as the front door of the task. This will result in the application of any affinities needed to have that task in the proper state (either moving activities to or from it), or simply resetting that task to its initial state if needed.

    Value: 2097152

    FLAG_ACTIVITY_RETAIN_IN_RECENTS

    Added in API level 21
    static val FLAG_ACTIVITY_RETAIN_IN_RECENTS: Int

    By default a document created by FLAG_ACTIVITY_NEW_DOCUMENT will have its entry in recent tasks removed when the user closes it (with back or however else it may finish()). If you would like to instead allow the document to be kept in recents so that it can be re-launched, you can use this flag. When set and the task's activity is finished, the recents entry will remain in the interface for the user to re-launch it, like a recents entry for a top-level application.

    The receiving activity can override this request with android.R.attr#autoRemoveFromRecents or by explcitly calling Activity.finishAndRemoveTask().

    Value: 8192

    FLAG_ACTIVITY_SINGLE_TOP

    Added in API level 1
    static val FLAG_ACTIVITY_SINGLE_TOP: Int

    If set, the activity will not be launched if it is already running at the top of the history stack. See Tasks and Back Stack for more information.

    Value: 536870912

    FLAG_ACTIVITY_TASK_ON_HOME

    Added in API level 11
    static val FLAG_ACTIVITY_TASK_ON_HOME: Int

    If set in an Intent passed to android.content.Context#startActivity, this flag will cause a newly launching task to be placed on top of the current home activity task (if there is one). That is, pressing back from the task will always return the user to home even if that was not the last activity they saw. This can only be used in conjunction with FLAG_ACTIVITY_NEW_TASK.

    Value: 16384

    FLAG_DEBUG_LOG_RESOLUTION

    Added in API level 1
    static val FLAG_DEBUG_LOG_RESOLUTION: Int

    A flag you can enable for debugging: when set, log messages will be printed during the resolution of this intent to show you what has been found to create the final resolved list.

    Value: 8

    FLAG_DIRECT_BOOT_AUTO

    Added in API level 29
    static val FLAG_DIRECT_BOOT_AUTO: Int

    Flag used to automatically match intents based on their Direct Boot awareness and the current user state.

    Since the default behavior is to automatically apply the current user state, this is effectively a sentinel value that doesn't change the output of any queries based on its presence or absence.

    Instead, this value can be useful in conjunction with android.os.StrictMode.VmPolicy.Builder#detectImplicitDirectBoot() to detect when a caller is relying on implicit automatic matching, instead of confirming the explicit behavior they want.

    Value: 256

    FLAG_EXCLUDE_STOPPED_PACKAGES

    Added in API level 12
    static val FLAG_EXCLUDE_STOPPED_PACKAGES: Int

    If set, this intent will not match any components in packages that are currently stopped. If this is not set, then the default behavior is to include such applications in the result.

    Value: 16

    FLAG_FROM_BACKGROUND

    Added in API level 1
    static val FLAG_FROM_BACKGROUND: Int

    Can be set by the caller to indicate that this Intent is coming from a background operation, not from direct user interaction.

    Value: 4

    FLAG_GRANT_PERSISTABLE_URI_PERMISSION

    Added in API level 19
    static val FLAG_GRANT_PERSISTABLE_URI_PERMISSION: Int

    When combined with FLAG_GRANT_READ_URI_PERMISSION and/or FLAG_GRANT_WRITE_URI_PERMISSION, the URI permission grant can be persisted across device reboots until explicitly revoked with Context#revokeUriPermission(Uri, int). This flag only offers the grant for possible persisting; the receiving application must call ContentResolver#takePersistableUriPermission(Uri, int) to actually persist.

    Value: 64

    FLAG_GRANT_PREFIX_URI_PERMISSION

    Added in API level 21
    static val FLAG_GRANT_PREFIX_URI_PERMISSION: Int

    When combined with FLAG_GRANT_READ_URI_PERMISSION and/or FLAG_GRANT_WRITE_URI_PERMISSION, the URI permission grant applies to any URI that is a prefix match against the original granted URI. (Without this flag, the URI must match exactly for access to be granted.) Another URI is considered a prefix match only when scheme, authority, and all path segments defined by the prefix are an exact match.

    Value: 128

    FLAG_GRANT_READ_URI_PERMISSION

    Added in API level 1
    static val FLAG_GRANT_READ_URI_PERMISSION: Int

    If set, the recipient of this Intent will be granted permission to perform read operations on the URI in the Intent's data and any URIs specified in its ClipData. When applying to an Intent's ClipData, all URIs as well as recursive traversals through data or other ClipData in Intent items will be granted; only the grant flags of the top-level Intent are used.

    Value: 1

    FLAG_GRANT_WRITE_URI_PERMISSION

    Added in API level 1
    static val FLAG_GRANT_WRITE_URI_PERMISSION: Int

    If set, the recipient of this Intent will be granted permission to perform write operations on the URI in the Intent's data and any URIs specified in its ClipData. When applying to an Intent's ClipData, all URIs as well as recursive traversals through data or other ClipData in Intent items will be granted; only the grant flags of the top-level Intent are used.

    Value: 2

    FLAG_INCLUDE_STOPPED_PACKAGES

    Added in API level 12
    static val FLAG_INCLUDE_STOPPED_PACKAGES: Int

    If set, this intent will always match any components in packages that are currently stopped. This is the default behavior when FLAG_EXCLUDE_STOPPED_PACKAGES is not set. If both of these flags are set, this one wins (it allows overriding of exclude for places where the framework may automatically set the exclude flag, such as broadcasts).

    Value: 32

    FLAG_RECEIVER_FOREGROUND

    Added in API level 16
    static val FLAG_RECEIVER_FOREGROUND: Int

    If set, when sending a broadcast the recipient is allowed to run at foreground priority, with a shorter timeout interval. During normal broadcasts the receivers are not automatically hoisted out of the background priority class.

    Value: 268435456

    FLAG_RECEIVER_NO_ABORT

    Added in API level 19
    static val FLAG_RECEIVER_NO_ABORT: Int

    If this is an ordered broadcast, don't allow receivers to abort the broadcast. They can still propagate results through to later receivers, but they can not prevent later receivers from seeing the broadcast.

    Value: 134217728

    FLAG_RECEIVER_REGISTERED_ONLY

    Added in API level 1
    static val FLAG_RECEIVER_REGISTERED_ONLY: Int

    If set, when sending a broadcast only registered receivers will be called -- no BroadcastReceiver components will be launched.

    Value: 1073741824

    FLAG_RECEIVER_REPLACE_PENDING

    Added in API level 8
    static val FLAG_RECEIVER_REPLACE_PENDING: Int

    If set, when sending a broadcast the new broadcast will replace any existing pending broadcast that matches it. Matching is defined by Intent.filterEquals returning true for the intents of the two broadcasts. When a match is found, the new broadcast (and receivers associated with it) will replace the existing one in the pending broadcast list, remaining at the same position in the list.

    This flag is most typically used with sticky broadcasts, which only care about delivering the most recent values of the broadcast to their receivers.

    Value: 536870912

    FLAG_RECEIVER_VISIBLE_TO_INSTANT_APPS

    Added in API level 26
    static val FLAG_RECEIVER_VISIBLE_TO_INSTANT_APPS: Int

    If set, the broadcast will be visible to receivers in Instant Apps. By default Instant Apps will not receive broadcasts. This flag has no effect when used by an Instant App.

    Value: 2097152

    METADATA_DOCK_HOME

    Added in API level 5
    static val METADATA_DOCK_HOME: String

    Boolean that can be supplied as meta-data with a dock activity, to indicate that the dock should take over the home key when it is active.

    Value: "android.dock_home"

    URI_ALLOW_UNSAFE

    Added in API level 22
    static val URI_ALLOW_UNSAFE: Int

    Flag for use with toUri and parseUri: allow parsing of unsafe information. In particular, the flags FLAG_GRANT_READ_URI_PERMISSION, FLAG_GRANT_WRITE_URI_PERMISSION, FLAG_GRANT_PERSISTABLE_URI_PERMISSION, and FLAG_GRANT_PREFIX_URI_PERMISSION flags can not be set, so that the generated Intent can not cause unexpected data access to happen.

    If you do not trust the source of the URI being parsed, you should still do further processing to protect yourself from it. In particular, when using it to start an activity you should usually add in CATEGORY_BROWSABLE to limit the activities that can handle it.

    Value: 4

    URI_ANDROID_APP_SCHEME

    Added in API level 22
    static val URI_ANDROID_APP_SCHEME: Int

    Flag for use with toUri and parseUri: the URI string always has the "android-app:" scheme. This is a variation of URI_INTENT_SCHEME whose format is simpler for the case of an http/https URI being delivered to a specific package name. The format is:

    android-app://{package_id}[/{scheme}[/{host}[/{path}]]][#Intent;{...}]

    In this scheme, only the package_id is required. If you include a host, you must also include a scheme; including a path also requires both a host and a scheme. The final #Intent; fragment can be used without a scheme, host, or path. Note that this can not be used with intents that have a setSelector, since the base intent will always have an explicit package name.

    Some examples of how this scheme maps to Intent objects:

    URI Intent
    android-app://com.example.app
    Action: ACTION_MAIN
    Package: com.example.app
    android-app://com.example.app/http/example.com
    Action: ACTION_VIEW
    Data: http://example.com/
    Package: com.example.app
    android-app://com.example.app/http/example.com/foo?1234
    Action: ACTION_VIEW
    Data: http://example.com/foo?1234
    Package: com.example.app
    android-app://com.example.app/
    Intent;action=com.example.MY_ACTION;end
    Action: com.example.MY_ACTION
    Package: com.example.app
    android-app://com.example.app/http/example.com/foo?1234
    Intent;action=com.example.MY_ACTION;end
    Action: com.example.MY_ACTION
    Data: http://example.com/foo?1234
    Package: com.example.app
    android-app://com.example.app/
    Intent;action=com.example.MY_ACTION;
    i.some_int=100;S.some_str=hello;end
    Action: com.example.MY_ACTION
    Package: com.example.app
    Extras: some_int=(int)100
    some_str=(String)hello
    Value: 2

    URI_INTENT_SCHEME

    Added in API level 4
    static val URI_INTENT_SCHEME: Int

    Flag for use with toUri and parseUri: the URI string always has the "intent:" scheme. This syntax can be used when you want to later disambiguate between URIs that are intended to describe an Intent vs. all others that should be treated as raw URIs. When used with parseUri, any other scheme will result in a generic VIEW action for that raw URI.

    Value: 1

    Public constructors

    Intent

    Added in API level 1
    Intent()

    Create an empty intent.

    Intent

    Added in API level 1
    Intent(o: Intent!)

    Copy constructor.

    Intent

    Added in API level 1
    Intent(action: String!)

    Create an intent with a given action. All other fields (data, type, class) are null. Note that the action must be in a namespace because Intents are used globally in the system -- for example the system VIEW action is android.intent.action.VIEW; an application's custom action would be something like com.google.app.myapp.CUSTOM_ACTION.

    Parameters
    action String!: The Intent action, such as ACTION_VIEW.

    Intent

    Added in API level 1
    Intent(
        action: String!,
        uri: Uri!)

    Create an intent with a given action and for a given data url. Note that the action must be in a namespace because Intents are used globally in the system -- for example the system VIEW action is android.intent.action.VIEW; an application's custom action would be something like com.google.app.myapp.CUSTOM_ACTION.

    Note: scheme and host name matching in the Android framework is case-sensitive, unlike the formal RFC. As a result, you should always ensure that you write your Uri with these elements using lower case letters, and normalize any Uris you receive from outside of Android to ensure the scheme and host is lower case.

    Parameters
    action String!: The Intent action, such as ACTION_VIEW.
    uri Uri!: The Intent data URI.

    Intent

    Added in API level 1
    Intent(
        packageContext: Context!,
        cls: Class<*>!)

    Create an intent for a specific component. All other fields (action, data, type, class) are null, though they can be modified later with explicit calls. This provides a convenient way to create an intent that is intended to execute a hard-coded class name, rather than relying on the system to find an appropriate class for you; see setComponent for more information on the repercussions of this.

    Parameters
    packageContext Context!: A Context of the application package implementing this class.
    cls Class<*>!: The component class that is to be used for the intent.

    Intent

    Added in API level 1
    Intent(
        action: String!,
        uri: Uri!,
        packageContext: Context!,
        cls: Class<*>!)

    Create an intent for a specific component with a specified action and data. This is equivalent to using Intent(java.lang.String,android.net.Uri) to construct the Intent and then calling setClass to set its class.

    Note: scheme and host name matching in the Android framework is case-sensitive, unlike the formal RFC. As a result, you should always ensure that you write your Uri with these elements using lower case letters, and normalize any Uris you receive from outside of Android to ensure the scheme and host is lower case.

    Parameters
    action String!: The Intent action, such as ACTION_VIEW.
    uri Uri!: The Intent data URI.
    packageContext Context!: A Context of the application package implementing this class.
    cls Class<*>!: The component class that is to be used for the intent.

    Public methods

    addCategory

    Added in API level 1
    open fun addCategory(category: String!): Intent

    Add a new category to the intent. Categories provide additional detail about the action the intent performs. When resolving an intent, only activities that provide all of the requested categories will be used.

    Parameters
    category String!: The desired category. This can be either one of the predefined Intent categories, or a custom category in your own namespace.
    Return
    Intent Returns the same Intent object, for chaining multiple calls into a single statement. This value cannot be null.

    addFlags

    Added in API level 1
    open fun addFlags(flags: Int): Intent

    Add additional flags to the intent (or with existing flags value).

    Parameters
    flags Int: The new flags to set. Value is either 0 or a combination of android.content.Intent#FLAG_GRANT_READ_URI_PERMISSION, android.content.Intent#FLAG_GRANT_WRITE_URI_PERMISSION, android.content.Intent#FLAG_FROM_BACKGROUND, android.content.Intent#FLAG_DEBUG_LOG_RESOLUTION, android.content.Intent#FLAG_EXCLUDE_STOPPED_PACKAGES, android.content.Intent#FLAG_INCLUDE_STOPPED_PACKAGES, android.content.Intent#FLAG_GRANT_PERSISTABLE_URI_PERMISSION, android.content.Intent#FLAG_GRANT_PREFIX_URI_PERMISSION, android.content.Intent.FLAG_DEBUG_TRIAGED_MISSING, android.content.Intent.FLAG_IGNORE_EPHEMERAL, android.content.Intent#FLAG_ACTIVITY_MATCH_EXTERNAL, android.content.Intent#FLAG_ACTIVITY_NO_HISTORY, android.content.Intent#FLAG_ACTIVITY_SINGLE_TOP, android.content.Intent#FLAG_ACTIVITY_NEW_TASK, android.content.Intent#FLAG_ACTIVITY_MULTIPLE_TASK, android.content.Intent#FLAG_ACTIVITY_CLEAR_TOP, android.content.Intent#FLAG_ACTIVITY_FORWARD_RESULT, android.content.Intent#FLAG_ACTIVITY_PREVIOUS_IS_TOP, android.content.Intent#FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS, android.content.Intent#FLAG_ACTIVITY_BROUGHT_TO_FRONT, android.content.Intent#FLAG_ACTIVITY_RESET_TASK_IF_NEEDED, android.content.Intent#FLAG_ACTIVITY_LAUNCHED_FROM_HISTORY, android.content.Intent#FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET, android.content.Intent#FLAG_ACTIVITY_NEW_DOCUMENT, android.content.Intent#FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET, android.content.Intent#FLAG_ACTIVITY_NO_USER_ACTION, android.content.Intent#FLAG_ACTIVITY_REORDER_TO_FRONT, android.content.Intent#FLAG_ACTIVITY_NO_ANIMATION, android.content.Intent#FLAG_ACTIVITY_CLEAR_TASK, android.content.Intent#FLAG_ACTIVITY_TASK_ON_HOME, android.content.Intent#FLAG_ACTIVITY_RETAIN_IN_RECENTS, android.content.Intent#FLAG_ACTIVITY_LAUNCH_ADJACENT, android.content.Intent#FLAG_ACTIVITY_REQUIRE_NON_BROWSER, android.content.Intent#FLAG_ACTIVITY_REQUIRE_DEFAULT, android.content.Intent#FLAG_RECEIVER_REGISTERED_ONLY, android.content.Intent#FLAG_RECEIVER_REPLACE_PENDING, android.content.Intent#FLAG_RECEIVER_FOREGROUND, android.content.Intent#FLAG_RECEIVER_NO_ABORT, android.content.Intent.FLAG_RECEIVER_REGISTERED_ONLY_BEFORE_BOOT, android.content.Intent.FLAG_RECEIVER_BOOT_UPGRADE, android.content.Intent.FLAG_RECEIVER_INCLUDE_BACKGROUND, android.content.Intent.FLAG_RECEIVER_EXCLUDE_BACKGROUND, android.content.Intent.FLAG_RECEIVER_FROM_SHELL, android.content.Intent#FLAG_RECEIVER_VISIBLE_TO_INSTANT_APPS, android.content.Intent.FLAG_RECEIVER_OFFLOAD, and android.content.Intent.FLAG_RECEIVER_OFFLOAD_FOREGROUND
    Return
    Intent Returns the same Intent object, for chaining multiple calls into a single statement. This value cannot be null.

    clone

    Added in API level 1
    open fun clone(): Any
    Return
    Any a clone of this instance.
    Exceptions
    java.lang.CloneNotSupportedException if the object's class does not support the Cloneable interface. Subclasses that override the clone method can also throw this exception to indicate that an instance cannot be cloned.

    cloneFilter

    Added in API level 1
    open fun cloneFilter(): Intent

    Make a clone of only the parts of the Intent that are relevant for filter matching: the action, data, type, component, and categories.

    Return
    Intent This value cannot be null.

    createChooser

    Added in API level 1
    open static fun createChooser(
        target: Intent!,
        title: CharSequence!
    ): Intent!

    Convenience function for creating a ACTION_CHOOSER Intent.

    Builds a new ACTION_CHOOSER Intent that wraps the given target intent, also optionally supplying a title. If the target intent has specified FLAG_GRANT_READ_URI_PERMISSION or FLAG_GRANT_WRITE_URI_PERMISSION, then these flags will also be set in the returned chooser intent, with its ClipData set appropriately: either a direct reflection of getClipData() if that is non-null, or a new ClipData built from getData().

    Parameters
    target Intent!: The Intent that the user will be selecting an activity to perform.
    title CharSequence!: Optional title that will be displayed in the chooser, only when the target action is not ACTION_SEND or ACTION_SEND_MULTIPLE.
    Return
    Intent! Return a new Intent object that you can hand to Context.startActivity() and related methods.

    createChooser

    Added in API level 22
    open static fun createChooser(
        target: Intent!,
        title: CharSequence!,
        sender: IntentSender!
    ): Intent!

    Convenience function for creating a ACTION_CHOOSER Intent.

    Builds a new ACTION_CHOOSER Intent that wraps the given target intent, also optionally supplying a title. If the target intent has specified FLAG_GRANT_READ_URI_PERMISSION or FLAG_GRANT_WRITE_URI_PERMISSION, then these flags will also be set in the returned chooser intent, with its ClipData set appropriately: either a direct reflection of getClipData() if that is non-null, or a new ClipData built from getData().

    The caller may optionally supply an IntentSender to receive a callback when the user makes a choice. This can be useful if the calling application wants to remember the last chosen target and surface it as a more prominent or one-touch affordance elsewhere in the UI for next time.

    Parameters
    target Intent!: The Intent that the user will be selecting an activity to perform.
    title CharSequence!: Optional title that will be displayed in the chooser, only when the target action is not ACTION_SEND or ACTION_SEND_MULTIPLE.
    sender IntentSender!: Optional IntentSender to be called when a choice is made.
    Return
    Intent! Return a new Intent object that you can hand to Context.startActivity() and related methods.

    describeContents

    Added in API level 1
    open fun describeContents(): Int
    Return
    Int a bitmask indicating the set of special object types marshaled by this Parcelable object instance. Value is either 0 or android.os.Parcelable#CONTENTS_FILE_DESCRIPTOR

    fillIn

    Added in API level 1
    open fun fillIn(
        other: Intent,
        flags: Int
    ): Int

    Copy the contents of other in to this object, but only where fields are not defined by this object. For purposes of a field being defined, the following pieces of data in the Intent are considered to be separate fields:

    In addition, you can use the FILL_IN_ACTION, FILL_IN_DATA, FILL_IN_IDENTIFIER, FILL_IN_CATEGORIES, FILL_IN_PACKAGE, FILL_IN_COMPONENT, FILL_IN_SOURCE_BOUNDS, FILL_IN_SELECTOR, and FILL_IN_CLIP_DATA to override the restriction where the corresponding field will not be replaced if it is already set.

    Note: The component field will only be copied if FILL_IN_COMPONENT is explicitly specified. The selector will only be copied if FILL_IN_SELECTOR is explicitly specified.

    For example, consider Intent A with {data="foo", categories="bar"} and Intent B with {action="gotit", data-type="some/thing", categories="one","two"}.

    Calling A.fillIn(B, Intent.FILL_IN_DATA) will result in A now containing: {action="gotit", data-type="some/thing", categories="bar"}.

    Parameters
    other Intent: Another Intent whose values are to be used to fill in the current one. This value cannot be null.
    flags Int: Options to control which fields can be filled in. Value is either 0 or a combination of android.content.Intent#FILL_IN_ACTION, android.content.Intent#FILL_IN_DATA, android.content.Intent#FILL_IN_CATEGORIES, android.content.Intent#FILL_IN_COMPONENT, android.content.Intent#FILL_IN_PACKAGE, android.content.Intent#FILL_IN_SOURCE_BOUNDS, android.content.Intent#FILL_IN_SELECTOR, and android.content.Intent#FILL_IN_CLIP_DATA
    Return
    Int Returns a bit mask of FILL_IN_ACTION, FILL_IN_DATA, FILL_IN_CATEGORIES, FILL_IN_PACKAGE, FILL_IN_COMPONENT, FILL_IN_SOURCE_BOUNDS, FILL_IN_SELECTOR and FILL_IN_CLIP_DATA indicating which fields were changed. Value is either 0 or a combination of android.content.Intent#FILL_IN_ACTION, android.content.Intent#FILL_IN_DATA, android.content.Intent#FILL_IN_CATEGORIES, android.content.Intent#FILL_IN_COMPONENT, android.content.Intent#FILL_IN_PACKAGE, android.content.Intent#FILL_IN_SOURCE_BOUNDS, android.content.Intent#FILL_IN_SELECTOR, and android.content.Intent#FILL_IN_CLIP_DATA

    filterEquals

    Added in API level 1
    open fun filterEquals(other: Intent!): Boolean

    Determine if two intents are the same for the purposes of intent resolution (filtering). That is, if their action, data, type, identity, class, and categories are the same. This does not compare any extra data included in the intents. Note that technically when actually matching against an IntentFilter the identifier is ignored, while here it is directly compared for equality like the other fields.

    Parameters
    other Intent!: The other Intent to compare against.
    Return
    Boolean Returns true if action, data, type, class, and categories are the same.

    filterHashCode

    Added in API level 1
    open fun filterHashCode(): Int

    Generate hash code that matches semantics of filterEquals().

    Return
    Int Returns the hash value of the action, data, type, class, and categories.

    See Also

    getAction

    Added in API level 1
    open fun getAction(): String?

    Retrieve the general action to be performed, such as ACTION_VIEW. The action describes the general way the rest of the information in the intent should be interpreted -- most importantly, what to do with the data returned by getData.

    Return
    String? The action of this intent or null if none is specified.

    See Also

    getBooleanArrayExtra

    Added in API level 1
    open fun getBooleanArrayExtra(name: String!): BooleanArray?

    Retrieve extended data from the intent.

    Parameters
    name String!: The name of the desired item.
    Return
    BooleanArray? the value of an item previously added with putExtra(), or null if no boolean array value was found.

    getBooleanExtra

    Added in API level 1
    open fun getBooleanExtra(
        name: String!,
        defaultValue: Boolean
    ): Boolean

    Retrieve extended data from the intent.

    Parameters
    name String!: The name of the desired item.
    defaultValue Boolean: the value to be returned if no value of the desired type is stored with the given name.
    Return
    Boolean the value of an item previously added with putExtra(), or the default value if none was found.

    getBundleExtra

    Added in API level 1
    open fun getBundleExtra(name: String!): Bundle?

    Retrieve extended data from the intent.

    Parameters
    name String!: The name of the desired item.
    Return
    Bundle? the value of an item previously added with putExtra(), or null if no Bundle value was found.

    getByteArrayExtra

    Added in API level 1
    open fun getByteArrayExtra(name: String!): ByteArray?

    Retrieve extended data from the intent.

    Parameters
    name String!: The name of the desired item.
    Return
    ByteArray? the value of an item previously added with putExtra(), or null if no byte array value was found.

    getByteExtra

    Added in API level 1
    open fun getByteExtra(
        name: String!,
        defaultValue: Byte
    ): Byte

    Retrieve extended data from the intent.

    Parameters
    name String!: The name of the desired item.
    defaultValue Byte: the value to be returned if no value of the desired type is stored with the given name.
    Return
    Byte the value of an item previously added with putExtra(), or the default value if none was found.

    getCategories

    Added in API level 1
    open fun getCategories(): MutableSet<String!>!

    Return the set of all categories in the intent. If there are no categories, returns NULL.

    Return
    MutableSet<String!>! The set of categories you can examine. Do not modify!

    getCharArrayExtra

    Added in API level 1
    open fun getCharArrayExtra(name: String!): CharArray?

    Retrieve extended data from the intent.

    Parameters
    name String!: The name of the desired item.
    Return
    CharArray? the value of an item previously added with putExtra(), or null if no char array value was found.

    getCharExtra

    Added in API level 1
    open fun getCharExtra(
        name: String!,
        defaultValue: Char
    ): Char

    Retrieve extended data from the intent.

    Parameters
    name String!: The name of the desired item.
    defaultValue Char: the value to be returned if no value of the desired type is stored with the given name.
    Return
    Char the value of an item previously added with putExtra(), or the default value if none was found.

    getCharSequenceArrayExtra

    Added in API level 8
    open fun getCharSequenceArrayExtra(name: String!): Array<CharSequence!>?

    Retrieve extended data from the intent.

    Parameters
    name String!: The name of the desired item.
    Return
    Array<CharSequence!>? the value of an item previously added with putExtra(), or null if no CharSequence array value was found.

    getCharSequenceArrayListExtra

    Added in API level 8
    open fun getCharSequenceArrayListExtra(name: String!): ArrayList<CharSequence!>?

    Retrieve extended data from the intent.

    Parameters
    name String!: The name of the desired item.
    Return
    ArrayList<CharSequence!>? the value of an item previously added with putCharSequenceArrayListExtra, or null if no ArrayList value was found.

    getCharSequenceExtra

    Added in API level 1
    open fun getCharSequenceExtra(name: String!): CharSequence?

    Retrieve extended data from the intent.

    Parameters
    name String!: The name of the desired item.
    Return
    CharSequence? the value of an item previously added with putExtra(), or null if no CharSequence value was found.

    getClipData

    Added in API level 16
    open fun getClipData(): ClipData?

    Return the ClipData associated with this Intent. If there is none, returns null. See setClipData for more information.

    See Also

    getComponent

    Added in API level 1
    open fun getComponent(): ComponentName?

    Retrieve the concrete component associated with the intent. When receiving an intent, this is the component that was found to best handle it (that is, yourself) and will always be non-null; in all other cases it will be null unless explicitly set.

    Return
    ComponentName? The name of the application component to handle the intent.

    getData

    Added in API level 1
    open fun getData(): Uri?

    Retrieve data this intent is operating on. This URI specifies the name of the data; often it uses the content: scheme, specifying data in a content provider. Other schemes may be handled by specific activities, such as http: by the web browser.

    Return
    Uri? The URI of the data this intent is targeting or null.

    See Also

    getDataString

    Added in API level 1
    open fun getDataString(): String?

    The same as getData(), but returns the URI as an encoded String.

    Return
    String? This value may be null.

    getDoubleArrayExtra

    Added in API level 1
    open fun getDoubleArrayExtra(name: String!): DoubleArray?

    Retrieve extended data from the intent.

    Parameters
    name String!: The name of the desired item.
    Return
    DoubleArray? the value of an item previously added with putExtra(), or null if no double array value was found.

    getDoubleExtra

    Added in API level 1
    open fun getDoubleExtra(
        name: String!,
        defaultValue: Double
    ): Double

    Retrieve extended data from the intent.

    Parameters
    name String!: The name of the desired item.
    defaultValue Double: the value to be returned if no value of the desired type is stored with the given name.
    Return
    Double the value of an item previously added with putExtra(), or the default value if none was found.

    getExtras

    Added in API level 1
    open fun getExtras(): Bundle?

    Retrieves a map of extended data from the intent.

    Return
    Bundle? the map of all extras previously added with putExtra(), or null if none have been added.

    getFlags

    Added in API level 1
    open fun getFlags(): Int

    Retrieve any special flags associated with this intent. You will normally just set them with setFlags and let the system take the appropriate action with them.

    Return
    Int The currently set flags. Value is either 0 or a combination of android.content.Intent#FLAG_GRANT_READ_URI_PERMISSION, android.content.Intent#FLAG_GRANT_WRITE_URI_PERMISSION, android.content.Intent#FLAG_FROM_BACKGROUND, android.content.Intent#FLAG_DEBUG_LOG_RESOLUTION, android.content.Intent#FLAG_EXCLUDE_STOPPED_PACKAGES, android.content.Intent#FLAG_INCLUDE_STOPPED_PACKAGES, android.content.Intent#FLAG_GRANT_PERSISTABLE_URI_PERMISSION, android.content.Intent#FLAG_GRANT_PREFIX_URI_PERMISSION, android.content.Intent.FLAG_DEBUG_TRIAGED_MISSING, android.content.Intent.FLAG_IGNORE_EPHEMERAL, android.content.Intent#FLAG_ACTIVITY_MATCH_EXTERNAL, android.content.Intent#FLAG_ACTIVITY_NO_HISTORY, android.content.Intent#FLAG_ACTIVITY_SINGLE_TOP, android.content.Intent#FLAG_ACTIVITY_NEW_TASK, android.content.Intent#FLAG_ACTIVITY_MULTIPLE_TASK, android.content.Intent#FLAG_ACTIVITY_CLEAR_TOP, android.content.Intent#FLAG_ACTIVITY_FORWARD_RESULT, android.content.Intent#FLAG_ACTIVITY_PREVIOUS_IS_TOP, android.content.Intent#FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS, android.content.Intent#FLAG_ACTIVITY_BROUGHT_TO_FRONT, android.content.Intent#FLAG_ACTIVITY_RESET_TASK_IF_NEEDED, android.content.Intent#FLAG_ACTIVITY_LAUNCHED_FROM_HISTORY, android.content.Intent#FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET, android.content.Intent#FLAG_ACTIVITY_NEW_DOCUMENT, android.content.Intent#FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET, android.content.Intent#FLAG_ACTIVITY_NO_USER_ACTION, android.content.Intent#FLAG_ACTIVITY_REORDER_TO_FRONT, android.content.Intent#FLAG_ACTIVITY_NO_ANIMATION, android.content.Intent#FLAG_ACTIVITY_CLEAR_TASK, android.content.Intent#FLAG_ACTIVITY_TASK_ON_HOME, android.content.Intent#FLAG_ACTIVITY_RETAIN_IN_RECENTS, android.content.Intent#FLAG_ACTIVITY_LAUNCH_ADJACENT, android.content.Intent#FLAG_ACTIVITY_REQUIRE_NON_BROWSER, android.content.Intent#FLAG_ACTIVITY_REQUIRE_DEFAULT, android.content.Intent#FLAG_RECEIVER_REGISTERED_ONLY, android.content.Intent#FLAG_RECEIVER_REPLACE_PENDING, android.content.Intent#FLAG_RECEIVER_FOREGROUND, android.content.Intent#FLAG_RECEIVER_NO_ABORT, android.content.Intent.FLAG_RECEIVER_REGISTERED_ONLY_BEFORE_BOOT, android.content.Intent.FLAG_RECEIVER_BOOT_UPGRADE, android.content.Intent.FLAG_RECEIVER_INCLUDE_BACKGROUND, android.content.Intent.FLAG_RECEIVER_EXCLUDE_BACKGROUND, android.content.Intent.FLAG_RECEIVER_FROM_SHELL, android.content.Intent#FLAG_RECEIVER_VISIBLE_TO_INSTANT_APPS, android.content.Intent.FLAG_RECEIVER_OFFLOAD, and android.content.Intent.FLAG_RECEIVER_OFFLOAD_FOREGROUND

    getFloatArrayExtra

    Added in API level 1
    open fun getFloatArrayExtra(name: String!): FloatArray?

    Retrieve extended data from the intent.

    Parameters
    name String!: The name of the desired item.
    Return
    FloatArray? the value of an item previously added with putExtra(), or null if no float array value was found.

    getFloatExtra

    Added in API level 1
    open fun getFloatExtra(
        name: String!,
        defaultValue: Float
    ): Float

    Retrieve extended data from the intent.

    Parameters
    name String!: The name of the desired item.
    defaultValue Float: the value to be returned if no value of the desired type is stored with the given name.
    Return
    Float the value of an item previously added with putExtra(), or the default value if no such item is present

    getIdentifier

    Added in API level 29
    open fun getIdentifier(): String?

    Retrieve the identifier for this Intent. If non-null, this is an arbitrary identity of the Intent to distinguish it from other Intents.

    Return
    String? The identifier of this intent or null if none is specified.

    See Also

    getIntArrayExtra

    Added in API level 1
    open fun getIntArrayExtra(name: String!): IntArray?

    Retrieve extended data from the intent.

    Parameters
    name String!: The name of the desired item.
    Return
    IntArray? the value of an item previously added with putExtra(), or null if no int array value was found.

    getIntExtra

    Added in API level 1
    open fun getIntExtra(
        name: String!,
        defaultValue: Int
    ): Int

    Retrieve extended data from the intent.

    Parameters
    name String!: The name of the desired item.
    defaultValue Int: the value to be returned if no value of the desired type is stored with the given name.
    Return
    Int the value of an item previously added with putExtra(), or the default value if none was found.

    getIntegerArrayListExtra

    Added in API level 1
    open fun getIntegerArrayListExtra(name: String!): ArrayList<Int!>?

    Retrieve extended data from the intent.

    Parameters
    name String!: The name of the desired item.
    Return
    ArrayList<Int!>? the value of an item previously added with putIntegerArrayListExtra(), or null if no ArrayList value was found.

    getIntent

    Added in API level 1
    Deprecated in API level 15
    open static fun getIntent(uri: String!): Intent!

    Deprecated: Use parseUri instead.

    Call parseUri with 0 flags.

    getIntentOld

    Added in API level 1
    open static fun getIntentOld(uri: String!): Intent!

    getLongArrayExtra

    Added in API level 1
    open fun getLongArrayExtra(name: String!): LongArray?

    Retrieve extended data from the intent.

    Parameters
    name String!: The name of the desired item.
    Return
    LongArray? the value of an item previously added with putExtra(), or null if no long array value was found.

    getLongExtra

    Added in API level 1
    open fun getLongExtra(
        name: String!,
        defaultValue: Long
    ): Long

    Retrieve extended data from the intent.

    Parameters
    name String!: The name of the desired item.
    defaultValue Long: the value to be returned if no value of the desired type is stored with the given name.
    Return
    Long the value of an item previously added with putExtra(), or the default value if none was found.

    getPackage

    Added in API level 4
    open fun getPackage(): String?

    Retrieve the application package name this Intent is limited to. When resolving an Intent, if non-null this limits the resolution to only components in the given application package.

    Return
    String? The name of the application package for the Intent.

    getParcelableArrayExtra

    Added in API level 1
    Deprecated in API level 33
    open fun getParcelableArrayExtra(name: String!): Array<Parcelable!>?

    Deprecated: Use the type-safer getParcelableArrayExtra(java.lang.String,java.lang.Class) starting from Android Build.VERSION_CODES#TIRAMISU.

    Retrieve extended data from the intent.

    Parameters
    name String!: The name of the desired item.
    Return
    Array<Parcelable!>? the value of an item previously added with putExtra(), or null if no Parcelable[] value was found.

    getParcelableArrayExtra

    Added in API level 33
    open fun <T : Any!> getParcelableArrayExtra(
        name: String?,
        clazz: Class<T>
    ): Array<T>?

    Retrieve extended data from the intent.

    Parameters
    name String?: The name of the desired item. This value may be null.
    clazz Class<T>: The type of the items inside the array. This is only verified when unparceling. This value cannot be null.
    Return
    Array<T>? the value of an item previously added with putExtra(), or null if no Parcelable[] value was found.

    getParcelableArrayListExtra

    Added in API level 1
    Deprecated in API level 33
    open fun <T : Parcelable!> getParcelableArrayListExtra(name: String!): ArrayList<T>?

    Deprecated: Use the type-safer getParcelableArrayListExtra(java.lang.String,java.lang.Class) starting from Android Build.VERSION_CODES#TIRAMISU.

    Retrieve extended data from the intent.

    Parameters
    name String!: The name of the desired item.
    Return
    ArrayList<T>? the value of an item previously added with putParcelableArrayListExtra(), or null if no ArrayList value was found.

    getParcelableArrayListExtra

    Added in API level 33
    open fun <T : Any!> getParcelableArrayListExtra(
        name: String?,
        clazz: Class<out T>
    ): ArrayList<T>?

    Retrieve extended data from the intent.

    Parameters
    name String?: The name of the desired item. This value may be null.
    clazz Class<out T>: The type of the items inside the array list. This is only verified when unparceling. This value cannot be null.
    Return
    ArrayList<T>? the value of an item previously added with putParcelableArrayListExtra(), or null if no ArrayList value was found.

    getParcelableExtra

    Added in API level 1
    Deprecated in API level 33
    open fun <T : Parcelable!> getParcelableExtra(name: String!): T?

    Deprecated: Use the type-safer getParcelableExtra(java.lang.String,java.lang.Class) starting from Android Build.VERSION_CODES#TIRAMISU.

    Retrieve extended data from the intent.

    Parameters
    name String!: The name of the desired item.
    Return
    T? the value of an item previously added with putExtra(), or null if no Parcelable value was found.

    getParcelableExtra

    Added in API level 33
    open fun <T : Any!> getParcelableExtra(
        name: String?,
        clazz: Class<T>
    ): T?

    Retrieve extended data from the intent.

    Parameters
    name String?: The name of the desired item. This value may be null.
    clazz Class<T>: The type of the object expected. This value cannot be null.
    Return
    T? the value of an item previously added with putExtra(), or null if no Parcelable value was found.

    getScheme

    Added in API level 1
    open fun getScheme(): String?

    Return the scheme portion of the intent's data. If the data is null or does not include a scheme, null is returned. Otherwise, the scheme prefix without the final ':' is returned, i.e. "http".

    This is the same as calling getData().getScheme() (and checking for null data).

    Return
    String? The scheme of this intent.

    See Also

    getSelector

    Added in API level 15
    open fun getSelector(): Intent?

    Return the specific selector associated with this Intent. If there is none, returns null. See setSelector for more information.

    See Also

    getSerializableExtra

    Added in API level 1
    Deprecated in API level 33
    open fun getSerializableExtra(name: String!): Serializable?

    Deprecated: Use the type-safer getSerializableExtra(java.lang.String,java.lang.Class) starting from Android Build.VERSION_CODES#TIRAMISU.

    Retrieve extended data from the intent.

    Parameters
    name String!: The name of the desired item.
    Return
    Serializable? the value of an item previously added with putExtra(), or null if no Serializable value was found.

    getSerializableExtra

    Added in API level 33
    open fun <T : Serializable!> getSerializableExtra(
        name: String?,
        clazz: Class<T>
    ): T?

    Retrieve extended data from the intent.

    Parameters
    name String?: The name of the desired item. This value may be null.
    clazz Class<T>: The type of the object expected. This value cannot be null.
    Return
    T? the value of an item previously added with putExtra(), or null if no Serializable value was found.

    getShortArrayExtra

    Added in API level 1
    open fun getShortArrayExtra(name: String!): ShortArray?

    Retrieve extended data from the intent.

    Parameters
    name String!: The name of the desired item.
    Return
    ShortArray? the value of an item previously added with putExtra(), or null if no short array value was found.

    getShortExtra

    Added in API level 1
    open fun getShortExtra(
        name: String!,
        defaultValue: Short
    ): Short

    Retrieve extended data from the intent.

    Parameters
    name String!: The name of the desired item.
    defaultValue Short: the value to be returned if no value of the desired type is stored with the given name.
    Return
    Short the value of an item previously added with putExtra(), or the default value if none was found.

    getSourceBounds

    Added in API level 7
    open fun getSourceBounds(): Rect?

    Get the bounds of the sender of this intent, in screen coordinates. This can be used as a hint to the receiver for animations and the like. Null means that there is no source bounds.

    Return
    Rect? This value may be null.

    getStringArrayExtra

    Added in API level 1
    open fun getStringArrayExtra(name: String!): Array<String!>?

    Retrieve extended data from the intent.

    Parameters
    name String!: The name of the desired item.
    Return
    Array<String!>? the value of an item previously added with putExtra(), or null if no String array value was found.

    getStringArrayListExtra

    Added in API level 1
    open fun getStringArrayListExtra(name: String!): ArrayList<String!>?

    Retrieve extended data from the intent.

    Parameters
    name String!: The name of the desired item.
    Return
    ArrayList<String!>? the value of an item previously added with putStringArrayListExtra(), or null if no ArrayList value was found.

    getStringExtra

    Added in API level 1
    open fun getStringExtra(name: String!): String?

    Retrieve extended data from the intent.

    Parameters
    name String!: The name of the desired item.
    Return
    String? the value of an item previously added with putExtra(), or null if no String value was found.

    getType

    Added in API level 1
    open fun getType(): String?

    Retrieve any explicit MIME type included in the intent. This is usually null, as the type is determined by the intent data.

    Return
    String? If a type was manually set, it is returned; else null is returned.

    hasCategory

    Added in API level 1
    open fun hasCategory(category: String!): Boolean

    Check if a category exists in the intent.

    Parameters
    category String!: The category to check.
    Return
    Boolean boolean True if the intent contains the category, else false.

    hasExtra

    Added in API level 1
    open fun hasExtra(name: String!): Boolean

    Returns true if an extra value is associated with the given name.

    Parameters
    name String!: the extra's name
    Return
    Boolean true if the given extra is present.

    hasFileDescriptors

    Added in API level 1
    open fun hasFileDescriptors(): Boolean

    Returns true if the Intent's extras contain a parcelled file descriptor.

    Return
    Boolean true if the Intent contains a parcelled file descriptor.

    isMismatchingFilter

    Added in API level 35
    open fun isMismatchingFilter(): Boolean

    Whether the intent mismatches all intent filters declared in the receiving component.

    When a component receives an intent, normally obtainable through the following methods:

    The developer can call this method to check if this intent does not match any of its declared intent filters. A non-matching intent can be delivered when the intent sender explicitly set the component through setComponent or #setClassName.

    This method always returns false if the intent originated from within the same application or the system, because these cases are always exempted from security checks.

    Return
    Boolean Returns true if the intent does not match any intent filters declared in the receiving component.

    makeMainActivity

    Added in API level 11
    open static fun makeMainActivity(mainActivity: ComponentName!): Intent!

    Create an intent to launch the main (root) activity of a task. This is the Intent that is started when the application's 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 the given Activity component as its explicit component, ACTION_MAIN as its action, and includes the category CATEGORY_LAUNCHER. This does not have FLAG_ACTIVITY_NEW_TASK set, though typically you will want to do that through addFlags(int) on the returned Intent.

    Parameters
    mainActivity ComponentName!: The main activity component that this Intent will launch.
    Return
    Intent! Returns a newly created Intent that can be used to launch the activity as a main application entry.

    makeMainSelectorActivity

    Added in API level 15
    open static fun makeMainSelectorActivity(
        selectorAction: String!,
        selectorCategory: String!
    ): Intent!

    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 as its action, and includes the category CATEGORY_LAUNCHER. This does not have FLAG_ACTIVITY_NEW_TASK set, though typically you will want to do that through addFlags(int) on the returned Intent.

    Parameters
    selectorAction String!: The action name of the Intent's selector.
    selectorCategory String!: The name of a category to add to the Intent's selector.
    Return
    Intent! Returns a newly created Intent that can be used to launch the activity as a main application entry.

    makeRestartActivityTask

    Added in API level 11
    open static fun makeRestartActivityTask(mainActivity: ComponentName!): Intent!

    Make an Intent that can be used to re-launch an application's task in its base state. This is like makeMainActivity(android.content.ComponentName), but also sets the flags FLAG_ACTIVITY_NEW_TASK and FLAG_ACTIVITY_CLEAR_TASK.

    Parameters
    mainActivity ComponentName!: The activity component that is the root of the task; this is the activity that has been published in the application's manifest as the main launcher icon.
    Return
    Intent! Returns a newly created Intent that can be used to relaunch the activity's task in its root state.

    normalizeMimeType

    Added in API level 16
    open static fun normalizeMimeType(type: String?): String?

    Normalize a MIME data type.

    A normalized MIME type has white-space trimmed, content-type parameters removed, and is lower-case. This aligns the type with Android best practices for intent filtering.

    For example, "text/plain; charset=utf-8" becomes "text/plain". "text/x-vCard" becomes "text/x-vcard".

    All MIME types received from outside Android (such as user input, or external sources like Bluetooth, NFC, or the Internet) should be normalized before they are used to create an Intent.

    Parameters
    type String?: MIME data type to normalize This value may be null.
    Return
    String? normalized MIME data type, or null if the input was null

    parseIntent

    Added in API level 1
    open static fun parseIntent(
        resources: Resources,
        parser: XmlPullParser,
        attrs: AttributeSet!
    ): Intent

    Parses the "intent" element (and its children) from XML and instantiates an Intent object. The given XML parser should be located at the tag where parsing should start (often named "intent"), from which the basic action, data, type, and package and class name will be retrieved. The function will then parse in to any child elements, looking for tags to add categories and to attach extra data to the intent.

    Parameters
    resources Resources: The Resources to use when inflating resources. This value cannot be null.
    parser XmlPullParser: The XML parser pointing at an "intent" tag. This value cannot be null.
    attrs AttributeSet!: The AttributeSet interface for retrieving extended attribute data at the current parser location.
    Return
    Intent An Intent object matching the XML data. This value cannot be null.
    Exceptions
    org.xmlpull.v1.XmlPullParserException If there was an XML parsing error.
    java.io.IOException If there was an I/O error.

    parseUri

    Added in API level 4
    open static fun parseUri(
        uri: String!,
        flags: Int
    ): Intent!

    Create an intent from a URI. This URI may encode the action, category, and other intent fields, if it was returned by toUri. If the Intent was not generate by toUri(), its data will be the entire URI and its action will be ACTION_VIEW.

    The URI given here must not be relative -- that is, it must include the scheme and full path.

    Parameters
    uri String!: The URI to turn into an Intent.
    flags Int: Additional processing flags. Value is either 0 or a combination of android.content.Intent#URI_ALLOW_UNSAFE, android.content.Intent#URI_ANDROID_APP_SCHEME, and android.content.Intent#URI_INTENT_SCHEME
    Return
    Intent! Intent The newly created Intent object.
    Exceptions
    java.net.URISyntaxException Throws URISyntaxError if the basic URI syntax it bad (as parsed by the Uri class) or the Intent data within the URI is invalid.

    See Also

    putCharSequenceArrayListExtra

    Added in API level 8
    open fun putCharSequenceArrayListExtra(
        name: String!,
        value: ArrayList<CharSequence!>?
    ): Intent

    Add extended data to the intent. The name must include a package prefix, for example the app com.android.contacts would use names like "com.android.contacts.ShowAll".

    Parameters
    name String!: The name of the extra data, with package prefix.
    value ArrayList<CharSequence!>?: The ArrayList data value. This value may be null.
    Return
    Intent Returns the same Intent object, for chaining multiple calls into a single statement. This value cannot be null.

    putExtra

    Added in API level 1
    open fun putExtra(
        name: String!,
        value: Boolean
    ): Intent

    Add extended data to the intent. The name must include a package prefix, for example the app com.android.contacts would use names like "com.android.contacts.ShowAll".

    Parameters
    name String!: The name of the extra data, with package prefix.
    value Boolean: The boolean data value.
    Return
    Intent Returns the same Intent object, for chaining multiple calls into a single statement. This value cannot be null.

    putExtra

    Added in API level 1
    open fun putExtra(
        name: String!,
        value: Byte
    ): Intent

    Add extended data to the intent. The name must include a package prefix, for example the app com.android.contacts would use names like "com.android.contacts.ShowAll".

    Parameters
    name String!: The name of the extra data, with package prefix.
    value Byte: The byte data value.
    Return
    Intent Returns the same Intent object, for chaining multiple calls into a single statement. This value cannot be null.

    putExtra

    Added in API level 1
    open fun putExtra(
        name: String!,
        value: Char
    ): Intent

    Add extended data to the intent. The name must include a package prefix, for example the app com.android.contacts would use names like "com.android.contacts.ShowAll".

    Parameters
    name String!: The name of the extra data, with package prefix.
    value Char: The char data value.
    Return
    Intent Returns the same Intent object, for chaining multiple calls into a single statement. This value cannot be null.

    putExtra

    Added in API level 1
    open fun putExtra(
        name: String!,
        value: Short
    ): Intent

    Add extended data to the intent. The name must include a package prefix, for example the app com.android.contacts would use names like "com.android.contacts.ShowAll".

    Parameters
    name String!: The name of the extra data, with package prefix.
    value Short: The short data value.
    Return
    Intent Returns the same Intent object, for chaining multiple calls into a single statement. This value cannot be null.

    putExtra

    Added in API level 1
    open fun putExtra(
        name: String!,
        value: Int
    ): Intent

    Add extended data to the intent. The name must include a package prefix, for example the app com.android.contacts would use names like "com.android.contacts.ShowAll".

    Parameters
    name String!: The name of the extra data, with package prefix.
    value Int: The integer data value.
    Return
    Intent Returns the same Intent object, for chaining multiple calls into a single statement. This value cannot be null.

    putExtra

    Added in API level 1
    open fun putExtra(
        name: String!,
        value: Long
    ): Intent

    Add extended data to the intent. The name must include a package prefix, for example the app com.android.contacts would use names like "com.android.contacts.ShowAll".

    Parameters
    name String!: The name of the extra data, with package prefix.
    value Long: The long data value.
    Return
    Intent Returns the same Intent object, for chaining multiple calls into a single statement. This value cannot be null.

    putExtra

    Added in API level 1
    open fun putExtra(
        name: String!,
        value: Float
    ): Intent

    Add extended data to the intent. The name must include a package prefix, for example the app com.android.contacts would use names like "com.android.contacts.ShowAll".

    Parameters
    name String!: The name of the extra data, with package prefix.
    value Float: The float data value.
    Return
    Intent Returns the same Intent object, for chaining multiple calls into a single statement. This value cannot be null.

    putExtra

    Added in API level 1
    open fun putExtra(
        name: String!,
        value: Double
    ): Intent

    Add extended data to the intent. The name must include a package prefix, for example the app com.android.contacts would use names like "com.android.contacts.ShowAll".

    Parameters
    name String!: The name of the extra data, with package prefix.
    value Double: The double data value.
    Return
    Intent Returns the same Intent object, for chaining multiple calls into a single statement. This value cannot be null.

    putExtra

    Added in API level 1
    open fun putExtra(
        name: String!,
        value: String?
    ): Intent

    Add extended data to the intent. The name must include a package prefix, for example the app com.android.contacts would use names like "com.android.contacts.ShowAll".

    Parameters
    name String!: The name of the extra data, with package prefix.
    value String?: The String data value. This value may be null.
    Return
    Intent Returns the same Intent object, for chaining multiple calls into a single statement. This value cannot be null.

    putExtra

    Added in API level 1
    open fun putExtra(
        name: String!,
        value: CharSequence?
    ): Intent

    Add extended data to the intent. The name must include a package prefix, for example the app com.android.contacts would use names like "com.android.contacts.ShowAll".

    Parameters
    name String!: The name of the extra data, with package prefix.
    value CharSequence?: The CharSequence data value. This value may be null.
    Return
    Intent Returns the same Intent object, for chaining multiple calls into a single statement. This value cannot be null.

    putExtra

    Added in API level 1
    open fun putExtra(
        name: String!,
        value: Parcelable?
    ): Intent

    Add extended data to the intent. The name must include a package prefix, for example the app com.android.contacts would use names like "com.android.contacts.ShowAll".

    Parameters
    name String!: The name of the extra data, with package prefix.
    value Parcelable?: The Parcelable data value. This value may be null.
    Return
    Intent Returns the same Intent object, for chaining multiple calls into a single statement. This value cannot be null.

    putExtra

    Added in API level 1
    open fun putExtra(
        name: String!,
        value: Array<Parcelable!>?
    ): Intent

    Add extended data to the intent. The name must include a package prefix, for example the app com.android.contacts would use names like "com.android.contacts.ShowAll".

    Parameters
    name String!: The name of the extra data, with package prefix.
    value Array<Parcelable!>?: The Parcelable[] data value. This value may be null.
    Return
    Intent Returns the same Intent object, for chaining multiple calls into a single statement. This value cannot be null.

    putExtra

    Added in API level 1
    open fun putExtra(
        name: String!,
        value: Serializable?
    ): Intent

    Add extended data to the intent. The name must include a package prefix, for example the app com.android.contacts would use names like "com.android.contacts.ShowAll".

    Parameters
    name String!: The name of the extra data, with package prefix.
    value Serializable?: The Serializable data value. This value may be null.
    Return
    Intent Returns the same Intent object, for chaining multiple calls into a single statement. This value cannot be null.

    putExtra

    Added in API level 1
    open fun putExtra(
        name: String!,
        value: BooleanArray?
    ): Intent

    Add extended data to the intent. The name must include a package prefix, for example the app com.android.contacts would use names like "com.android.contacts.ShowAll".

    Parameters
    name String!: The name of the extra data, with package prefix.
    value BooleanArray?: The boolean array data value. This value may be null.
    Return
    Intent Returns the same Intent object, for chaining multiple calls into a single statement. This value cannot be null.

    putExtra

    Added in API level 1
    open fun putExtra(
        name: String!,
        value: ByteArray?
    ): Intent

    Add extended data to the intent. The name must include a package prefix, for example the app com.android.contacts would use names like "com.android.contacts.ShowAll".

    Parameters
    name String!: The name of the extra data, with package prefix.
    value ByteArray?: The byte array data value. This value may be null.
    Return
    Intent Returns the same Intent object, for chaining multiple calls into a single statement. This value cannot be null.

    putExtra

    Added in API level 1
    open fun putExtra(
        name: String!,
        value: ShortArray?
    ): Intent

    Add extended data to the intent. The name must include a package prefix, for example the app com.android.contacts would use names like "com.android.contacts.ShowAll".

    Parameters
    name String!: The name of the extra data, with package prefix.
    value ShortArray?: The short array data value. This value may be null.
    Return
    Intent Returns the same Intent object, for chaining multiple calls into a single statement. This value cannot be null.

    putExtra

    Added in API level 1
    open fun putExtra(
        name: String!,
        value: CharArray?
    ): Intent

    Add extended data to the intent. The name must include a package prefix, for example the app com.android.contacts would use names like "com.android.contacts.ShowAll".

    Parameters
    name String!: The name of the extra data, with package prefix.
    value CharArray?: The char array data value. This value may be null.
    Return
    Intent Returns the same Intent object, for chaining multiple calls into a single statement. This value cannot be null.

    putExtra

    Added in API level 1
    open fun putExtra(
        name: String!,
        value: IntArray?
    ): Intent

    Add extended data to the intent. The name must include a package prefix, for example the app com.android.contacts would use names like "com.android.contacts.ShowAll".

    Parameters
    name String!: The name of the extra data, with package prefix.
    value IntArray?: The int array data value. This value may be null.
    Return
    Intent Returns the same Intent object, for chaining multiple calls into a single statement. This value cannot be null.

    putExtra

    Added in API level 1
    open fun putExtra(
        name: String!,
        value: LongArray?
    ): Intent

    Add extended data to the intent. The name must include a package prefix, for example the app com.android.contacts would use names like "com.android.contacts.ShowAll".

    Parameters
    name String!: The name of the extra data, with package prefix.
    value LongArray?: The byte array data value. This value may be null.
    Return
    Intent Returns the same Intent object, for chaining multiple calls into a single statement. This value cannot be null.

    putExtra

    Added in API level 1
    open fun putExtra(
        name: String!,
        value: FloatArray?
    ): Intent

    Add extended data to the intent. The name must include a package prefix, for example the app com.android.contacts would use names like "com.android.contacts.ShowAll".

    Parameters
    name String!: The name of the extra data, with package prefix.
    value FloatArray?: The float array data value. This value may be null.
    Return
    Intent Returns the same Intent object, for chaining multiple calls into a single statement. This value cannot be null.

    putExtra

    Added in API level 1
    open fun putExtra(
        name: String!,
        value: DoubleArray?
    ): Intent

    Add extended data to the intent. The name must include a package prefix, for example the app com.android.contacts would use names like "com.android.contacts.ShowAll".

    Parameters
    name String!: The name of the extra data, with package prefix.
    value DoubleArray?: The double array data value. This value may be null.
    Return
    Intent Returns the same Intent object, for chaining multiple calls into a single statement. This value cannot be null.

    putExtra

    Added in API level 1
    open fun putExtra(
        name: String!,
        value: Array<String!>?
    ): Intent

    Add extended data to the intent. The name must include a package prefix, for example the app com.android.contacts would use names like "com.android.contacts.ShowAll".

    Parameters
    name String!: The name of the extra data, with package prefix.
    value Array<String!>?: The String array data value. This value may be null.
    Return
    Intent Returns the same Intent object, for chaining multiple calls into a single statement. This value cannot be null.

    putExtra

    Added in API level 8
    open fun putExtra(
        name: String!,
        value: Array<CharSequence!>?
    ): Intent

    Add extended data to the intent. The name must include a package prefix, for example the app com.android.contacts would use names like "com.android.contacts.ShowAll".

    Parameters
    name String!: The name of the extra data, with package prefix.
    value Array<CharSequence!>?: The CharSequence array data value. This value may be null.
    Return
    Intent Returns the same Intent object, for chaining multiple calls into a single statement. This value cannot be null.

    putExtra

    Added in API level 1
    open fun putExtra(
        name: String!,
        value: Bundle?
    ): Intent

    Add extended data to the intent. The name must include a package prefix, for example the app com.android.contacts would use names like "com.android.contacts.ShowAll".

    Parameters
    name String!: The name of the extra data, with package prefix.
    value Bundle?: The Bundle data value. This value may be null.
    Return
    Intent Returns the same Intent object, for chaining multiple calls into a single statement. This value cannot be null.

    putExtras

    Added in API level 1
    open fun putExtras(src: Intent): Intent

    Copy all extras in 'src' in to this intent.

    Parameters
    src Intent: Contains the extras to copy. This value cannot be null.
    Return
    Intent This value cannot be null.

    See Also

      putExtras

      Added in API level 1
      open fun putExtras(extras: Bundle): Intent

      Add a set of extended data to the intent. The keys must include a package prefix, for example the app com.android.contacts would use names like "com.android.contacts.ShowAll".

      Parameters
      extras Bundle: The Bundle of extras to add to this intent. This value cannot be null.
      Return
      Intent This value cannot be null.

      See Also

      putIntegerArrayListExtra

      Added in API level 1
      open fun putIntegerArrayListExtra(
          name: String!,
          value: ArrayList<Int!>?
      ): Intent

      Add extended data to the intent. The name must include a package prefix, for example the app com.android.contacts would use names like "com.android.contacts.ShowAll".

      Parameters
      name String!: The name of the extra data, with package prefix.
      value ArrayList<Int!>?: The ArrayList data value. This value may be null.
      Return
      Intent Returns the same Intent object, for chaining multiple calls into a single statement. This value cannot be null.

      putParcelableArrayListExtra

      Added in API level 1
      open fun putParcelableArrayListExtra(
          name: String!,
          value: ArrayList<out Parcelable!>?
      ): Intent

      Add extended data to the intent. The name must include a package prefix, for example the app com.android.contacts would use names like "com.android.contacts.ShowAll".

      Parameters
      name String!: The name of the extra data, with package prefix.
      value ArrayList<out Parcelable!>?: The ArrayList data value. This value may be null.
      Return
      Intent Returns the same Intent object, for chaining multiple calls into a single statement. This value cannot be null.

      putStringArrayListExtra

      Added in API level 1
      open fun putStringArrayListExtra(
          name: String!,
          value: ArrayList<String!>?
      ): Intent

      Add extended data to the intent. The name must include a package prefix, for example the app com.android.contacts would use names like "com.android.contacts.ShowAll".

      Parameters
      name String!: The name of the extra data, with package prefix.
      value ArrayList<String!>?: The ArrayList data value. This value may be null.
      Return
      Intent Returns the same Intent object, for chaining multiple calls into a single statement. This value cannot be null.

      readFromParcel

      Added in API level 1
      open fun readFromParcel(in: Parcel!): Unit

      removeCategory

      Added in API level 1
      open fun removeCategory(category: String!): Unit

      Remove a category from an intent.

      Parameters
      category String!: The category to remove.

      See Also

      removeExtra

      Added in API level 1
      open fun removeExtra(name: String!): Unit

      Remove extended data from the intent.

      See Also

        removeFlags

        Added in API level 26
        open fun removeFlags(flags: Int): Unit

        Remove these flags from the intent.

        Parameters
        flags Int: The flags to remove. Value is either 0 or a combination of android.content.Intent#FLAG_GRANT_READ_URI_PERMISSION, android.content.Intent#FLAG_GRANT_WRITE_URI_PERMISSION, android.content.Intent#FLAG_FROM_BACKGROUND, android.content.Intent#FLAG_DEBUG_LOG_RESOLUTION, android.content.Intent#FLAG_EXCLUDE_STOPPED_PACKAGES, android.content.Intent#FLAG_INCLUDE_STOPPED_PACKAGES, android.content.Intent#FLAG_GRANT_PERSISTABLE_URI_PERMISSION, android.content.Intent#FLAG_GRANT_PREFIX_URI_PERMISSION, android.content.Intent.FLAG_DEBUG_TRIAGED_MISSING, android.content.Intent.FLAG_IGNORE_EPHEMERAL, android.content.Intent#FLAG_ACTIVITY_MATCH_EXTERNAL, android.content.Intent#FLAG_ACTIVITY_NO_HISTORY, android.content.Intent#FLAG_ACTIVITY_SINGLE_TOP, android.content.Intent#FLAG_ACTIVITY_NEW_TASK, android.content.Intent#FLAG_ACTIVITY_MULTIPLE_TASK, android.content.Intent#FLAG_ACTIVITY_CLEAR_TOP, android.content.Intent#FLAG_ACTIVITY_FORWARD_RESULT, android.content.Intent#FLAG_ACTIVITY_PREVIOUS_IS_TOP, android.content.Intent#FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS, android.content.Intent#FLAG_ACTIVITY_BROUGHT_TO_FRONT, android.content.Intent#FLAG_ACTIVITY_RESET_TASK_IF_NEEDED, android.content.Intent#FLAG_ACTIVITY_LAUNCHED_FROM_HISTORY, android.content.Intent#FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET, android.content.Intent#FLAG_ACTIVITY_NEW_DOCUMENT, android.content.Intent#FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET, android.content.Intent#FLAG_ACTIVITY_NO_USER_ACTION, android.content.Intent#FLAG_ACTIVITY_REORDER_TO_FRONT, android.content.Intent#FLAG_ACTIVITY_NO_ANIMATION, android.content.Intent#FLAG_ACTIVITY_CLEAR_TASK, android.content.Intent#FLAG_ACTIVITY_TASK_ON_HOME, android.content.Intent#FLAG_ACTIVITY_RETAIN_IN_RECENTS, android.content.Intent#FLAG_ACTIVITY_LAUNCH_ADJACENT, android.content.Intent#FLAG_ACTIVITY_REQUIRE_NON_BROWSER, android.content.Intent#FLAG_ACTIVITY_REQUIRE_DEFAULT, android.content.Intent#FLAG_RECEIVER_REGISTERED_ONLY, android.content.Intent#FLAG_RECEIVER_REPLACE_PENDING, android.content.Intent#FLAG_RECEIVER_FOREGROUND, android.content.Intent#FLAG_RECEIVER_NO_ABORT, android.content.Intent.FLAG_RECEIVER_REGISTERED_ONLY_BEFORE_BOOT, android.content.Intent.FLAG_RECEIVER_BOOT_UPGRADE, android.content.Intent.FLAG_RECEIVER_INCLUDE_BACKGROUND, android.content.Intent.FLAG_RECEIVER_EXCLUDE_BACKGROUND, android.content.Intent.FLAG_RECEIVER_FROM_SHELL, android.content.Intent#FLAG_RECEIVER_VISIBLE_TO_INSTANT_APPS, android.content.Intent.FLAG_RECEIVER_OFFLOAD, and android.content.Intent.FLAG_RECEIVER_OFFLOAD_FOREGROUND

        replaceExtras

        Added in API level 3
        open fun replaceExtras(src: Intent): Intent

        Completely replace the extras in the Intent with the extras in the given Intent.

        Parameters
        src Intent: The exact extras contained in this Intent are copied into the target intent, replacing any that were previously there. This value cannot be null.
        Return
        Intent This value cannot be null.

        replaceExtras

        Added in API level 3
        open fun replaceExtras(extras: Bundle?): Intent

        Completely replace the extras in the Intent with the given Bundle of extras.

        Parameters
        extras Bundle?: The new set of extras in the Intent, or null to erase all extras.
        Return
        Intent This value cannot be null.

        resolveActivity

        Added in API level 1
        open fun resolveActivity(pm: PackageManager): ComponentName!

        Return the Activity component that should be used to handle this intent. The appropriate component is determined based on the information in the intent, evaluated as follows:

        If getComponent returns an explicit class, that is returned without any further consideration.

        The activity must handle the Intent#CATEGORY_DEFAULT Intent category to be considered.

        If getAction is non-NULL, the activity must handle this action.

        If #resolveType returns non-NULL, the activity must handle this type.

        If addCategory has added any categories, the activity must handle ALL of the categories specified.

        If getPackage is non-NULL, only activity components in that application package will be considered.

        If there are no activities that satisfy all of these conditions, a null string is returned.

        If multiple activities are found to satisfy the intent, the one with the highest priority will be used. If there are multiple activities with the same priority, the system will either pick the best activity based on user preference, or resolve to a system class that will allow the user to pick an activity and forward from there.

        This method is implemented simply by calling android.content.pm.PackageManager#resolveActivity with the "defaultOnly" parameter true.

        This API is called for you as part of starting an activity from an intent. You do not normally need to call it yourself.

        Parameters
        pm PackageManager: The package manager with which to resolve the Intent. This value cannot be null.
        Return
        ComponentName! Name of the component implementing an activity that can display the intent.

        resolveActivityInfo

        Added in API level 1
        open fun resolveActivityInfo(
            pm: PackageManager,
            flags: Int
        ): ActivityInfo!

        Resolve the Intent into an ActivityInfo describing the activity that should execute the intent. Resolution follows the same rules as described for resolveActivity, but you get back the completely information about the resolved activity instead of just its class name.

        Parameters
        pm PackageManager: The package manager with which to resolve the Intent. This value cannot be null.
        flags Int: Addition information to retrieve as per PackageManager.getActivityInfo(). Value is either 0 or a combination of android.content.pm.PackageManager#GET_META_DATA, android.content.pm.PackageManager#GET_SHARED_LIBRARY_FILES, android.content.pm.PackageManager#MATCH_ALL, android.content.pm.PackageManager.MATCH_DEBUG_TRIAGED_MISSING, android.content.pm.PackageManager#MATCH_DEFAULT_ONLY, android.content.pm.PackageManager#MATCH_DISABLED_COMPONENTS, android.content.pm.PackageManager#MATCH_DISABLED_UNTIL_USED_COMPONENTS, android.content.pm.PackageManager#MATCH_DIRECT_BOOT_AUTO, android.content.pm.PackageManager#MATCH_DIRECT_BOOT_AWARE, android.content.pm.PackageManager#MATCH_DIRECT_BOOT_UNAWARE, android.content.pm.PackageManager#MATCH_SYSTEM_ONLY, android.content.pm.PackageManager#MATCH_UNINSTALLED_PACKAGES, android.content.pm.PackageManager.MATCH_INSTANT, android.content.pm.PackageManager.MATCH_STATIC_SHARED_AND_SDK_LIBRARIES, android.content.pm.PackageManager#GET_DISABLED_COMPONENTS, android.content.pm.PackageManager#GET_DISABLED_UNTIL_USED_COMPONENTS, android.content.pm.PackageManager#GET_UNINSTALLED_PACKAGES, and android.content.pm.PackageManager.MATCH_QUARANTINED_COMPONENTS
        Return
        ActivityInfo! PackageManager.ActivityInfo

        See Also

        resolveType

        Added in API level 1
        open fun resolveType(context: Context): String?

        Return the MIME data type of this intent. If the type field is explicitly set, that is simply returned. Otherwise, if the data is set, the type of that data is returned. If neither fields are set, a null is returned.

        Parameters
        context Context: This value cannot be null.
        Return
        String? The MIME type of this intent.

        resolveType

        Added in API level 1
        open fun resolveType(resolver: ContentResolver): String?

        Return the MIME data type of this intent. If the type field is explicitly set, that is simply returned. Otherwise, if the data is set, the type of that data is returned. If neither fields are set, a null is returned.

        Parameters
        resolver ContentResolver: A ContentResolver that can be used to determine the MIME type of the intent's data. This value cannot be null.
        Return
        String? The MIME type of this intent.

        resolveTypeIfNeeded

        Added in API level 1
        open fun resolveTypeIfNeeded(resolver: ContentResolver): String?

        Return the MIME data type of this intent, only if it will be needed for intent resolution. This is not generally useful for application code; it is used by the frameworks for communicating with back-end system services.

        Parameters
        resolver ContentResolver: A ContentResolver that can be used to determine the MIME type of the intent's data. This value cannot be null.
        Return
        String? The MIME type of this intent, or null if it is unknown or not needed.

        setAction

        Added in API level 1
        open fun setAction(action: String?): Intent

        Set the general action to be performed.

        Parameters
        action String?: An action name, such as ACTION_VIEW. Application-specific actions should be prefixed with the vendor's package name. This value may be null.
        Return
        Intent Returns the same Intent object, for chaining multiple calls into a single statement. This value cannot be null.

        See Also

        setClass

        Added in API level 1
        open fun setClass(
            packageContext: Context,
            cls: Class<*>
        ): Intent

        Convenience for calling setComponent(android.content.ComponentName) with the name returned by a Class object.

        Parameters
        packageContext Context: A Context of the application package implementing this class. This value cannot be null.
        cls Class<*>: The class name to set, equivalent to setClassName(context, cls.getName()). This value cannot be null.
        Return
        Intent Returns the same Intent object, for chaining multiple calls into a single statement. This value cannot be null.

        See Also

        setClassName

        Added in API level 1
        open fun setClassName(
            packageContext: Context,
            className: String
        ): Intent

        Convenience for calling setComponent with an explicit class name.

        Parameters
        packageContext Context: A Context of the application package implementing this class. This value cannot be null.
        className String: The name of a class inside of the application package that will be used as the component for this Intent. This value cannot be null.
        Return
        Intent Returns the same Intent object, for chaining multiple calls into a single statement. This value cannot be null.

        setClassName

        Added in API level 1
        open fun setClassName(
            packageName: String,
            className: String
        ): Intent

        Convenience for calling setComponent with an explicit application package name and class name.

        Parameters
        packageName String: The name of the package implementing the desired component. This value cannot be null.
        className String: The name of a class inside of the application package that will be used as the component for this Intent. This value cannot be null.
        Return
        Intent Returns the same Intent object, for chaining multiple calls into a single statement. This value cannot be null.

        setClipData

        Added in API level 16
        open fun setClipData(clip: ClipData?): Unit

        Set a ClipData associated with this Intent. This replaces any previously set ClipData.

        The ClipData in an intent is not used for Intent matching or other such operations. Semantically it is like extras, used to transmit additional data with the Intent. The main feature of using this over the extras for data is that FLAG_GRANT_READ_URI_PERMISSION and FLAG_GRANT_WRITE_URI_PERMISSION will operate on any URI items included in the clip data. This is useful, in particular, if you want to transmit an Intent containing multiple content: URIs for which the recipient may not have global permission to access the content provider.

        If the ClipData contains items that are themselves Intents, any grant flags in those Intents will be ignored. Only the top-level flags of the main Intent are respected, and will be applied to all Uri or Intent items in the clip (or sub-items of the clip).

        The MIME type, label, and icon in the ClipData object are not directly used by Intent. Applications should generally rely on the MIME type of the Intent itself, not what it may find in the ClipData. A common practice is to construct a ClipData for use with an Intent with a MIME type of "*/*".

        Parameters
        clip ClipData?: The new clip to set. May be null to clear the current clip.

        setComponent

        Added in API level 1
        open fun setComponent(component: ComponentName?): Intent

        (Usually optional) Explicitly set the component to handle the intent. If left with the default value of null, the system will determine the appropriate class to use based on the other fields (action, data, type, categories) in the Intent. If this class is defined, the specified class will always be used regardless of the other fields. You should only set this value when you know you absolutely want a specific class to be used; otherwise it is better to let the system find the appropriate class so that you will respect the installed applications and user preferences.

        Parameters
        component ComponentName?: The name of the application component to handle the intent, or null to let the system find one for you.
        Return
        Intent Returns the same Intent object, for chaining multiple calls into a single statement.

        setData

        Added in API level 1
        open fun setData(data: Uri?): Intent

        Set the data this intent is operating on. This method automatically clears any type that was previously set by setType or setTypeAndNormalize.

        Note: scheme matching in the Android framework is case-sensitive, unlike the formal RFC. As a result, you should always write your Uri with a lower case scheme, or use Uri#normalizeScheme or setDataAndNormalize to ensure that the scheme is converted to lower case.

        Parameters
        data Uri?: The Uri of the data this intent is now targeting. This value may be null.
        Return
        Intent Returns the same Intent object, for chaining multiple calls into a single statement. This value cannot be null.

        setDataAndNormalize

        Added in API level 16
        open fun setDataAndNormalize(data: Uri): Intent

        Normalize and set the data this intent is operating on.

        This method automatically clears any type that was previously set (for example, by setType).

        The data Uri is normalized using android.net.Uri#normalizeScheme before it is set, so really this is just a convenience method for

        setData(data.normalize())
          
        Parameters
        data Uri: The Uri of the data this intent is now targeting. This value cannot be null.
        Return
        Intent Returns the same Intent object, for chaining multiple calls into a single statement. This value cannot be null.

        setDataAndType

        Added in API level 1
        open fun setDataAndType(
            data: Uri?,
            type: String?
        ): Intent

        (Usually optional) Set the data for the intent along with an explicit MIME data type. This method should very rarely be used -- it allows you to override the MIME type that would ordinarily be inferred from the data with your own type given here.

        Note: MIME type and Uri scheme matching in the Android framework is case-sensitive, unlike the formal RFC definitions. As a result, you should always write these elements with lower case letters, or use normalizeMimeType or android.net.Uri#normalizeScheme or setDataAndTypeAndNormalize to ensure that they are converted to lower case.

        Parameters
        data Uri?: The Uri of the data this intent is now targeting. This value may be null.
        type String?: The MIME type of the data being handled by this intent. This value may be null.
        Return
        Intent Returns the same Intent object, for chaining multiple calls into a single statement. This value cannot be null.

        setDataAndTypeAndNormalize

        Added in API level 16
        open fun setDataAndTypeAndNormalize(
            data: Uri,
            type: String?
        ): Intent

        (Usually optional) Normalize and set both the data Uri and an explicit MIME data type. This method should very rarely be used -- it allows you to override the MIME type that would ordinarily be inferred from the data with your own type given here.

        The data Uri and the MIME type are normalize using android.net.Uri#normalizeScheme and normalizeMimeType before they are set, so really this is just a convenience method for

        setDataAndType(data.normalize(), Intent.normalizeMimeType(type))
          
        Parameters
        data Uri: The Uri of the data this intent is now targeting. This value cannot be null.
        type String?: The MIME type of the data being handled by this intent. This value may be null.
        Return
        Intent Returns the same Intent object, for chaining multiple calls into a single statement. This value cannot be null.

        setExtrasClassLoader

        Added in API level 1
        open fun setExtrasClassLoader(loader: ClassLoader?): Unit

        Sets the ClassLoader that will be used when unmarshalling any Parcelable values from the extras of this Intent.

        Parameters
        loader ClassLoader?: a ClassLoader, or null to use the default loader at the time of unmarshalling.

        setFlags

        Added in API level 1
        open fun setFlags(flags: Int): Intent

        Set special flags controlling how this intent is handled. Most values here depend on the type of component being executed by the Intent, specifically the FLAG_ACTIVITY_* flags are all for use with android.content.Context#startActivity and the FLAG_RECEIVER_* flags are all for use with Context.sendBroadcast().

        See the Tasks and Back Stack documentation for important information on how some of these options impact the behavior of your application.

        Parameters
        flags Int: The desired flags. Value is either 0 or a combination of android.content.Intent#FLAG_GRANT_READ_URI_PERMISSION, android.content.Intent#FLAG_GRANT_WRITE_URI_PERMISSION, android.content.Intent#FLAG_FROM_BACKGROUND, android.content.Intent#FLAG_DEBUG_LOG_RESOLUTION, android.content.Intent#FLAG_EXCLUDE_STOPPED_PACKAGES, android.content.Intent#FLAG_INCLUDE_STOPPED_PACKAGES, android.content.Intent#FLAG_GRANT_PERSISTABLE_URI_PERMISSION, android.content.Intent#FLAG_GRANT_PREFIX_URI_PERMISSION, android.content.Intent.FLAG_DEBUG_TRIAGED_MISSING, android.content.Intent.FLAG_IGNORE_EPHEMERAL, android.content.Intent#FLAG_ACTIVITY_MATCH_EXTERNAL, android.content.Intent#FLAG_ACTIVITY_NO_HISTORY, android.content.Intent#FLAG_ACTIVITY_SINGLE_TOP, android.content.Intent#FLAG_ACTIVITY_NEW_TASK, android.content.Intent#FLAG_ACTIVITY_MULTIPLE_TASK, android.content.Intent#FLAG_ACTIVITY_CLEAR_TOP, android.content.Intent#FLAG_ACTIVITY_FORWARD_RESULT, android.content.Intent#FLAG_ACTIVITY_PREVIOUS_IS_TOP, android.content.Intent#FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS, android.content.Intent#FLAG_ACTIVITY_BROUGHT_TO_FRONT, android.content.Intent#FLAG_ACTIVITY_RESET_TASK_IF_NEEDED, android.content.Intent#FLAG_ACTIVITY_LAUNCHED_FROM_HISTORY, android.content.Intent#FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET, android.content.Intent#FLAG_ACTIVITY_NEW_DOCUMENT, android.content.Intent#FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET, android.content.Intent#FLAG_ACTIVITY_NO_USER_ACTION, android.content.Intent#FLAG_ACTIVITY_REORDER_TO_FRONT, android.content.Intent#FLAG_ACTIVITY_NO_ANIMATION, android.content.Intent#FLAG_ACTIVITY_CLEAR_TASK, android.content.Intent#FLAG_ACTIVITY_TASK_ON_HOME, android.content.Intent#FLAG_ACTIVITY_RETAIN_IN_RECENTS, android.content.Intent#FLAG_ACTIVITY_LAUNCH_ADJACENT, android.content.Intent#FLAG_ACTIVITY_REQUIRE_NON_BROWSER, android.content.Intent#FLAG_ACTIVITY_REQUIRE_DEFAULT, android.content.Intent#FLAG_RECEIVER_REGISTERED_ONLY, android.content.Intent#FLAG_RECEIVER_REPLACE_PENDING, android.content.Intent#FLAG_RECEIVER_FOREGROUND, android.content.Intent#FLAG_RECEIVER_NO_ABORT, android.content.Intent.FLAG_RECEIVER_REGISTERED_ONLY_BEFORE_BOOT, android.content.Intent.FLAG_RECEIVER_BOOT_UPGRADE, android.content.Intent.FLAG_RECEIVER_INCLUDE_BACKGROUND, android.content.Intent.FLAG_RECEIVER_EXCLUDE_BACKGROUND, android.content.Intent.FLAG_RECEIVER_FROM_SHELL, android.content.Intent#FLAG_RECEIVER_VISIBLE_TO_INSTANT_APPS, android.content.Intent.FLAG_RECEIVER_OFFLOAD, and android.content.Intent.FLAG_RECEIVER_OFFLOAD_FOREGROUND
        Return
        Intent Returns the same Intent object, for chaining multiple calls into a single statement. This value cannot be null.

        setIdentifier

        Added in API level 29
        open fun setIdentifier(identifier: String?): Intent

        Set an identifier for this Intent. If set, this provides a unique identity for this Intent, allowing it to be unique from other Intents that would otherwise look the same. In particular, this will be used by filterEquals(android.content.Intent) to determine if two Intents are the same as with other fields like setAction. However, unlike those fields, the identifier is never used for matching against an IntentFilter; it is as if the identifier has not been set on the Intent.

        This can be used, for example, to make this Intent unique from other Intents that are otherwise the same, for use in creating a android.app.PendingIntent. (Be aware however that the receiver of the PendingIntent will see whatever you put in here.) The structure of this string is completely undefined by the platform, however if you are going to be exposing identifier strings across different applications you may need to define your own structure if there is no central party defining the contents of this field.

        Parameters
        identifier String?: The identifier for this Intent. The contents of the string have no meaning to the system, except whether they are exactly the same as another identifier. This value may be null.
        Return
        Intent Returns the same Intent object, for chaining multiple calls into a single statement. This value cannot be null.

        See Also

        setPackage

        Added in API level 4
        open fun setPackage(packageName: String?): Intent

        (Usually optional) Set an explicit application package name that limits the components this Intent will resolve to. If left to the default value of null, all components in all applications will considered. If non-null, the Intent can only match the components in the given application package.

        Parameters
        packageName String?: The name of the application package to handle the intent, or null to allow any application package.
        Return
        Intent Returns the same Intent object, for chaining multiple calls into a single statement.

        setSelector

        Added in API level 15
        open fun setSelector(selector: Intent?): Unit

        Set a selector for this Intent. This is a modification to the kinds of things the Intent will match. If the selector is set, it will be used when trying to find entities that can handle the Intent, instead of the main contents of the Intent. This allows you build an Intent containing a generic protocol while targeting it more specifically.

        An example of where this may be used is with things like CATEGORY_APP_BROWSER. This category allows you to build an Intent that will launch the Browser application. However, the correct main entry point of an application is actually ACTION_MAIN CATEGORY_LAUNCHER with setComponent(android.content.ComponentName) used to specify the actual Activity to launch. If you launch the browser with something different, undesired behavior may happen if the user has previously or later launches it the normal way, since they do not match. Instead, you can build an Intent with the MAIN action (but no ComponentName yet specified) and set a selector with ACTION_MAIN and CATEGORY_APP_BROWSER to point it specifically to the browser activity.

        Setting a selector does not impact the behavior of filterEquals(android.content.Intent) and filterHashCode(). This is part of the desired behavior of a selector -- it does not impact the base meaning of the Intent, just what kinds of things will be matched against it when determining who can handle it.

        You can not use both a selector and setPackage(java.lang.String) on the same base Intent.

        Parameters
        selector Intent?: The desired selector Intent; set to null to not use a special selector.

        setSourceBounds

        Added in API level 7
        open fun setSourceBounds(r: Rect?): Unit

        Set the bounds of the sender of this intent, in screen coordinates. This can be used as a hint to the receiver for animations and the like. Null means that there is no source bounds.

        Parameters
        r Rect?: This value may be null.

        setType

        Added in API level 1
        open fun setType(type: String?): Intent

        Set an explicit MIME data type.

        This is used to create intents that only specify a type and not data, for example to indicate the type of data to return.

        This method automatically clears any data that was previously set (for example by setData).

        Note: MIME type matching in the Android framework is case-sensitive, unlike formal RFC MIME types. As a result, you should always write your MIME types with lower case letters, or use normalizeMimeType or setTypeAndNormalize to ensure that it is converted to lower case.

        Parameters
        type String?: The MIME type of the data being handled by this intent. This value may be null.
        Return
        Intent Returns the same Intent object, for chaining multiple calls into a single statement. This value cannot be null.

        setTypeAndNormalize

        Added in API level 16
        open fun setTypeAndNormalize(type: String?): Intent

        Normalize and set an explicit MIME data type.

        This is used to create intents that only specify a type and not data, for example to indicate the type of data to return.

        This method automatically clears any data that was previously set (for example by setData).

        The MIME type is normalized using normalizeMimeType before it is set, so really this is just a convenience method for

        setType(Intent.normalizeMimeType(type))
          
        Parameters
        type String?: The MIME type of the data being handled by this intent. This value may be null.
        Return
        Intent Returns the same Intent object, for chaining multiple calls into a single statement. This value cannot be null.

        toString

        Added in API level 1
        open fun toString(): String
        Return
        String a string representation of the object.

        toURI

        Added in API level 1
        Deprecated in API level 15
        open fun toURI(): String!

        Deprecated: Use toUri instead.

        Call toUri with 0 flags.

        toUri

        Added in API level 4
        open fun toUri(flags: Int): String!

        Convert this Intent into a String holding a URI representation of it. The returned URI string has been properly URI encoded, so it can be used with Uri.parse(String). The URI contains the Intent's data as the base URI, with an additional fragment describing the action, categories, type, flags, package, component, and extras.

        You can convert the returned string back to an Intent with getIntent.

        Parameters
        flags Int: Additional operating flags. Value is either 0 or a combination of android.content.Intent#URI_ALLOW_UNSAFE, android.content.Intent#URI_ANDROID_APP_SCHEME, and android.content.Intent#URI_INTENT_SCHEME
        Return
        String! Returns a URI encoding URI string describing the entire contents of the Intent.

        writeToParcel

        Added in API level 1
        open fun writeToParcel(
            out: Parcel,
            flags: Int
        ): Unit
        Parameters
        dest The Parcel in which the object should be written. This value cannot be null.
        flags Int: Additional flags about how the object should be written. May be 0 or PARCELABLE_WRITE_RETURN_VALUE. Value is either 0 or a combination of android.os.Parcelable#PARCELABLE_WRITE_RETURN_VALUE, and android.os.Parcelable.PARCELABLE_ELIDE_DUPLICATES

        Properties

        CREATOR

        Added in API level 1
        static val CREATOR: Parcelable.Creator<Intent!>