Java android.content Intent fields, constructors, methods, implement or subclass

Example usage for Java android.content Intent fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for android.content Intent.

The text is from its open source code.

Subclass

android.content.Intent has subclasses.
Click this link to see all its subclasses.

Field

StringACTION_MAIN
Activity Action: Start as a main entry point, does not expect to receive data.
StringACTION_VIEW
Activity Action: Display the data to the user.
StringACTION_DEFAULT
A synonym for #ACTION_VIEW , the "standard" action that is performed on a piece of data.
StringACTION_ATTACH_DATA
Used to indicate that some piece of data should be attached to some other place.
StringACTION_EDIT
Activity Action: Provide explicit editable access to the given data.
StringACTION_INSERT_OR_EDIT
Activity Action: Pick an existing item, or insert a new item, and then edit it.
StringACTION_PICK
Activity Action: Pick an item from the data, returning what was selected.
StringACTION_CREATE_SHORTCUT
Activity Action: Creates a shortcut.
StringEXTRA_SHORTCUT_INTENT
The name of the extra used to define the Intent of a shortcut.
StringEXTRA_SHORTCUT_NAME
The name of the extra used to define the name of a shortcut.
StringEXTRA_SHORTCUT_ICON
The name of the extra used to define the icon, as a Bitmap, of a shortcut.
StringEXTRA_SHORTCUT_ICON_RESOURCE
The name of the extra used to define the icon, as a ShortcutIconResource, of a shortcut.
StringACTION_APPLICATION_PREFERENCES
An activity that provides a user interface for adjusting application preferences.
StringACTION_SHOW_APP_INFO
Activity Action: Launch an activity showing the app information.
StringACTION_CHOOSER
Activity Action: Display an activity chooser, allowing the user to pick what they want to before proceeding.
StringACTION_GET_CONTENT
Activity Action: Allow the user to select a particular kind of data and return it.
StringACTION_DIAL
Activity Action: Dial a number as specified by the data.
StringACTION_CALL
Activity Action: Perform a call to someone specified by the data.
StringACTION_SENDTO
Activity Action: Send a message to someone specified by the data.
StringACTION_SEND
Activity Action: Deliver some data to someone else.
StringACTION_SEND_MULTIPLE
Activity Action: Deliver multiple data to someone else.
StringACTION_INSERT
Activity Action: Insert an empty item into the given container.
StringACTION_PASTE
Activity Action: Create a new item in the given container, initializing it from the current contents of the clipboard.
StringACTION_DELETE
Activity Action: Delete the given data from its container.
StringACTION_RUN
Activity Action: Run the data, whatever that means.
StringACTION_SYNC
Activity Action: Perform a data synchronization.
StringACTION_PICK_ACTIVITY
Activity Action: Pick an activity given an intent, returning the class selected.
StringACTION_SEARCH
Activity Action: Perform a search.
StringACTION_WEB_SEARCH
Activity Action: Perform a web search.
StringACTION_ASSIST
Activity Action: Perform assist action.
StringACTION_SET_WALLPAPER
Activity Action: Show settings for choosing wallpaper.
StringACTION_BUG_REPORT
Activity Action: Show activity for reporting a bug.
StringACTION_CALL_BUTTON
Activity Action: The user pressed the "call" button to go to the dialer or other appropriate UI for placing a call.
StringACTION_SEARCH_LONG_PRESS
Activity Action: Start action associated with long pressing on the search key.
StringACTION_APP_ERROR
Activity Action: The user pressed the "Report" button in the crash/ANR dialog.
StringACTION_POWER_USAGE_SUMMARY
Activity Action: Show power usage information to the user.
StringACTION_MANAGE_NETWORK_USAGE
Activity Action: Show settings for managing network data usage of a specific application.
StringACTION_INSTALL_PACKAGE
Activity Action: Launch application installer.
StringEXTRA_INSTALLER_PACKAGE_NAME
Used as a string extra field with #ACTION_INSTALL_PACKAGE to install a package.
StringEXTRA_NOT_UNKNOWN_SOURCE
Used as a boolean extra field with #ACTION_INSTALL_PACKAGE to install a package.
StringEXTRA_ORIGINATING_URI
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.
StringEXTRA_REFERRER
This extra can be used with any Intent used to launch an activity, supplying information about who is launching that activity.
StringEXTRA_ORIGINATING_UID
Used as an int extra field with #ACTION_INSTALL_PACKAGE and #ACTION_VIEW to indicate the uid of the package that initiated the install Currently only a system app that hosts the provider authority "downloads" or holds the permission android.Manifest.permission.MANAGE_DOCUMENTS can use this.
StringEXTRA_ALLOW_REPLACE
Used as a boolean extra field with #ACTION_INSTALL_PACKAGE to install a package.
StringEXTRA_RETURN_RESULT
Used as a boolean extra field with #ACTION_INSTALL_PACKAGE or #ACTION_UNINSTALL_PACKAGE .
StringEXTRA_INSTALL_RESULT
Package manager install result code.
StringACTION_UNINSTALL_PACKAGE
Activity Action: Launch application uninstaller.
StringEXTRA_PACKAGE_NAME
Intent extra: An app package name.
StringEXTRA_PERMISSION_NAME
Intent extra: The name of a permission.
StringACTION_SCREEN_OFF
Broadcast Action: Sent when the device goes to sleep and becomes non-interactive.
StringACTION_SCREEN_ON
Broadcast Action: Sent when the device wakes up and becomes interactive.
StringACTION_DREAMING_STARTED
Broadcast Action: Sent after the system starts dreaming.
StringACTION_USER_PRESENT
Broadcast Action: Sent when the user is present after device wakes up (e.g when the keyguard is gone).
StringACTION_TIME_TICK
Broadcast Action: The current time has changed.
StringACTION_TIME_CHANGED
Broadcast Action: The time was set.
StringACTION_DATE_CHANGED
Broadcast Action: The date has changed.
StringACTION_TIMEZONE_CHANGED
Broadcast Action: The timezone has changed.
StringACTION_LOCKED_BOOT_COMPLETED
Broadcast Action: This is broadcast once, after the user has finished booting, but while still in the "locked" state.
StringACTION_BOOT_COMPLETED
Broadcast Action: This is broadcast once, after the user has finished booting.
StringACTION_CLOSE_SYSTEM_DIALOGS
Broadcast Action: This is broadcast when a user action should request a temporary system dialog to dismiss.
StringACTION_PACKAGE_ADDED
Broadcast Action: A new application package has been installed on the device.
StringACTION_PACKAGE_REPLACED
Broadcast Action: A new version of an application package has been installed, replacing an existing version that was previously installed.
StringACTION_MY_PACKAGE_REPLACED
Broadcast Action: A new version of your application has been installed over an existing one.
StringACTION_PACKAGE_REMOVED
Broadcast Action: An existing application package has been removed from the device.
StringACTION_PACKAGE_FULLY_REMOVED
Broadcast Action: An existing application package has been completely removed from the device.
StringACTION_PACKAGE_CHANGED
Broadcast Action: An existing application package has been changed (for example, a component has been enabled or disabled).
StringACTION_PACKAGE_RESTARTED
Broadcast Action: The user has restarted a package, and all of its processes have been killed.
StringACTION_PACKAGE_DATA_CLEARED
Broadcast Action: The user has cleared the data of a package.
StringACTION_EXTERNAL_APPLICATIONS_AVAILABLE
Broadcast Action: Resources for a set of packages (which were previously unavailable) are currently available since the media on which they exist is available.
StringACTION_EXTERNAL_APPLICATIONS_UNAVAILABLE
Broadcast Action: Resources for a set of packages are currently unavailable since the media on which they exist is unavailable.
StringACTION_WALLPAPER_CHANGED
Broadcast Action: The current system wallpaper has changed.
StringACTION_CONFIGURATION_CHANGED
Broadcast Action: The current device android.content.res.Configuration (orientation, locale, etc) has changed.
StringACTION_LOCALE_CHANGED
Broadcast Action: The current device's locale has changed.
StringACTION_BATTERY_CHANGED
Broadcast Action: This is a sticky broadcast containing the charging state, level, and other information about the battery.
StringACTION_BATTERY_LOW
Broadcast Action: Indicates low battery condition on the device.
StringACTION_BATTERY_OKAY
Broadcast Action: Indicates the battery is now okay after being low.
StringACTION_POWER_CONNECTED
Broadcast Action: External power has been connected to the device.
StringACTION_POWER_DISCONNECTED
Broadcast Action: External power has been removed from the device.
StringACTION_SHUTDOWN
Broadcast Action: Device is shutting down.
StringACTION_DEVICE_STORAGE_LOW
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.

StringACTION_DEVICE_STORAGE_OK
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.

StringACTION_MANAGE_PACKAGE_STORAGE
Broadcast Action: Indicates low memory condition notification acknowledged by user and package management should be started.
StringACTION_UMS_CONNECTED
Broadcast Action: The device has entered USB Mass Storage mode.
StringACTION_UMS_DISCONNECTED
Broadcast Action: The device has exited USB Mass Storage mode.
StringACTION_MEDIA_REMOVED
Broadcast Action: External media has been removed.
StringACTION_MEDIA_UNMOUNTED
Broadcast Action: External media is present, but not mounted at its mount point.
StringACTION_MEDIA_CHECKING
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.
StringACTION_MEDIA_NOFS
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.
StringACTION_MEDIA_MOUNTED
Broadcast Action: External media is present and mounted at its mount point.
StringACTION_MEDIA_SHARED
Broadcast Action: External media is unmounted because it is being shared via USB mass storage.
StringACTION_MEDIA_UNSHARED
Broadcast Action: External media is no longer being shared via USB mass storage.
StringACTION_MEDIA_BAD_REMOVAL
Broadcast Action: External media was removed from SD card slot, but mount point was not unmounted.
StringACTION_MEDIA_UNMOUNTABLE
Broadcast Action: External media is present but cannot be mounted.
StringACTION_MEDIA_EJECT
Broadcast Action: User has expressed the desire to remove the external storage media.
StringACTION_MEDIA_SCANNER_STARTED
Broadcast Action: The media scanner has started scanning a directory.
StringACTION_MEDIA_SCANNER_FINISHED
Broadcast Action: The media scanner has finished scanning a directory.
StringACTION_MEDIA_SCANNER_SCAN_FILE
Broadcast Action: Request the media scanner to scan a file and add it to the media database.
StringACTION_MEDIA_BUTTON
Broadcast Action: The "Media Button" was pressed.
StringACTION_AIRPLANE_MODE_CHANGED

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

StringACTION_PROVIDER_CHANGED
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.
StringACTION_HEADSET_PLUG
Broadcast Action: Wired Headset plugged in or unplugged.
StringACTION_APPLICATION_RESTRICTIONS_CHANGED
Broadcast Action: Sent after application restrictions are changed.
StringACTION_NEW_OUTGOING_CALL
Broadcast Action: An outgoing call is about to be placed.
StringACTION_REBOOT
Broadcast Action: Have the device reboot.
StringACTION_DOCK_EVENT
Broadcast Action: A sticky broadcast for changes in the physical docking state of the device.
StringACTION_GET_RESTRICTION_ENTRIES
Broadcast to a specific application to query any supported restrictions to impose on restricted users.
StringACTION_USER_FOREGROUND
Sent when a user switch is happening, causing the process's user to be brought to the foreground.
StringACTION_USER_BACKGROUND
Sent when a user switch is happening, causing the process's user to be sent to the background.
StringACTION_USER_ADDED
Broadcast sent to the system when a user is added.
StringACTION_USER_REMOVED
Broadcast sent to the system when a user is removed.
StringACTION_USER_UNLOCKED
Broadcast Action: Sent when the credential-encrypted private storage has become unlocked for the target user.
StringACTION_OPEN_DOCUMENT
Activity Action: Allow the user to select and return one or more existing documents.
StringACTION_CREATE_DOCUMENT
Activity Action: Allow the user to create a new document.
StringACTION_OPEN_DOCUMENT_TREE
Activity Action: Allow the user to pick a directory subtree.
StringACTION_MASTER_CLEAR
Deprecated - use ACTION_FACTORY_RESET instead.
StringACTION_PROCESS_TEXT
Activity Action: Process a piece of text.
StringEXTRA_PROCESS_TEXT
The name of the extra used to define the text to be processed, as a CharSequence.
StringEXTRA_PROCESS_TEXT_READONLY
The name of the boolean extra used to define if the processed text will be used as read-only.
StringCATEGORY_DEFAULT
Set if the activity should be an option for the default action (center press) to perform on a piece of data.
StringCATEGORY_BROWSABLE
Activities that can be safely invoked from a browser must support this category.
StringCATEGORY_ALTERNATIVE
Set if the activity should be considered as an alternative action to the data the user is currently viewing.
StringCATEGORY_SELECTED_ALTERNATIVE
Set if the activity should be considered as an alternative selection action to the data the user has currently selected.
StringCATEGORY_TAB
Intended to be used as a tab inside of a containing TabActivity.
StringCATEGORY_LAUNCHER
Should be displayed in the top-level launcher.
StringCATEGORY_INFO
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.
StringCATEGORY_HOME
This is the home activity, that is the first activity that is displayed when the device boots.
StringCATEGORY_EMBED
Capable of running inside a parent activity container.
StringCATEGORY_APP_MARKET
This activity allows the user to browse and download new applications.
StringCATEGORY_OPENABLE
Used to indicate that an intent only wants URIs that can be opened with ContentResolver#openFileDescriptor(Uri,String) .
StringCATEGORY_APP_CALENDAR
Used with #ACTION_MAIN to launch the calendar application.
StringCATEGORY_APP_MAPS
Used with #ACTION_MAIN to launch the maps application.
StringCATEGORY_APP_MESSAGING
Used with #ACTION_MAIN to launch the messaging application.
StringCATEGORY_APP_MUSIC
Used with #ACTION_MAIN to launch the music application.
StringEXTRA_TEXT
A constant CharSequence that is associated with the Intent, used with #ACTION_SEND to supply the literal data to be sent.
StringEXTRA_HTML_TEXT
A constant String that is associated with the Intent, used with #ACTION_SEND to supply an alternative to #EXTRA_TEXT as HTML formatted text.
StringEXTRA_STREAM
A content: URI holding a stream of data associated with the Intent, used with #ACTION_SEND to supply the data being sent.
StringEXTRA_EMAIL
A String[] holding e-mail addresses that should be delivered to.
StringEXTRA_CC
A String[] holding e-mail addresses that should be carbon copied.
StringEXTRA_BCC
A String[] holding e-mail addresses that should be blind carbon copied.
StringEXTRA_SUBJECT
A constant string holding the desired subject line of a message.
StringEXTRA_INTENT
An Intent describing the choices you would like shown with #ACTION_PICK_ACTIVITY or #ACTION_CHOOSER .
StringEXTRA_ALTERNATE_INTENTS
An Intent[] describing additional, alternate choices you would like shown with #ACTION_CHOOSER .
StringEXTRA_TITLE
A CharSequence dialog title to provide to the user when used with a #ACTION_CHOOSER .
StringEXTRA_INITIAL_INTENTS
A Parcelable[] of Intent or android.content.pm.LabeledIntent objects as set with #putExtra(String,Parcelable[]) of additional activities to place a the front of the list of choices, when shown to the user with a #ACTION_CHOOSER .
StringEXTRA_KEY_EVENT
A android.view.KeyEvent object containing the event that triggered the creation of the Intent it is in.
StringEXTRA_PHONE_NUMBER
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 .
StringEXTRA_UID
Used as an int extra field in android.content.Intent#ACTION_UID_REMOVED intents to supply the uid the package had been assigned.
StringEXTRA_DATA_REMOVED
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).
StringEXTRA_REPLACING
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.
StringEXTRA_ALARM_COUNT
Used as an int extra field in android.app.AlarmManager intents to tell the application being invoked how many pending alarms are being delievered with the intent.
StringEXTRA_DOCK_STATE
Used as an int extra field in android.content.Intent#ACTION_DOCK_EVENT intents to request the dock state.
intEXTRA_DOCK_STATE_UNDOCKED
Used as an int value for android.content.Intent#EXTRA_DOCK_STATE to represent that the phone is not in any dock.
intEXTRA_DOCK_STATE_DESK
Used as an int value for android.content.Intent#EXTRA_DOCK_STATE to represent that the phone is in a desk dock.
StringEXTRA_BUG_REPORT
Used as a parcelable extra field in #ACTION_APP_ERROR , containing the bug report.
StringEXTRA_REMOTE_INTENT_TOKEN
Used in the extra field in the remote intent.
StringEXTRA_LOCAL_ONLY
Extra used to indicate that an intent should only return data that is on the local device.
StringEXTRA_ALLOW_MULTIPLE
Extra used to indicate that an intent can allow the user to select and return multiple items.
StringEXTRA_USER
The UserHandle carried with broadcasts intents related to addition and removal of managed profiles - #ACTION_MANAGED_PROFILE_ADDED and #ACTION_MANAGED_PROFILE_REMOVED .
StringEXTRA_RESTRICTIONS_LIST
Extra used in the response from a BroadcastReceiver that handles #ACTION_GET_RESTRICTION_ENTRIES .
StringEXTRA_RESTRICTIONS_BUNDLE
Extra sent in the intent to the BroadcastReceiver that handles #ACTION_GET_RESTRICTION_ENTRIES .
StringEXTRA_MIME_TYPES
Extra used to communicate a set of acceptable MIME types.
StringEXTRA_REASON
Intent extra: the reason that the operation associated with this intent is being performed.
intFLAG_GRANT_READ_URI_PERMISSION
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.
intFLAG_GRANT_WRITE_URI_PERMISSION
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.
intFLAG_FROM_BACKGROUND
Can be set by the caller to indicate that this Intent is coming from a background operation, not from direct user interaction.
intFLAG_DEBUG_LOG_RESOLUTION
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.
intFLAG_EXCLUDE_STOPPED_PACKAGES
If set, this intent will not match any components in packages that are currently stopped.
intFLAG_INCLUDE_STOPPED_PACKAGES
If set, this intent will always match any components in packages that are currently stopped.
intFLAG_GRANT_PERSISTABLE_URI_PERMISSION
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) .
intFLAG_GRANT_PREFIX_URI_PERMISSION
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.
intFLAG_ACTIVITY_NO_HISTORY
If set, the new activity is not kept in the history stack.
intFLAG_ACTIVITY_SINGLE_TOP
If set, the activity will not be launched if it is already running at the top of the history stack.
intFLAG_ACTIVITY_NEW_TASK
If set, this activity will become the start of a new task on this history stack.
intFLAG_ACTIVITY_MULTIPLE_TASK
This flag is used to create a new task and launch an activity into it.
intFLAG_ACTIVITY_CLEAR_TOP
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.
intFLAG_ACTIVITY_FORWARD_RESULT
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.
intFLAG_ACTIVITY_PREVIOUS_IS_TOP
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.
intFLAG_ACTIVITY_EXCLUDE_FROM_RECENTS
If set, the new activity is not kept in the list of recently launched activities.
intFLAG_ACTIVITY_BROUGHT_TO_FRONT
This flag is not normally set by application code, but set for you by the system as described in the android.R.styleable#AndroidManifestActivity_launchMode launchMode documentation for the singleTask mode.
intFLAG_ACTIVITY_RESET_TASK_IF_NEEDED
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.
intFLAG_ACTIVITY_LAUNCHED_FROM_HISTORY
This flag is not normally set by application code, but set for you by the system if this activity is being launched from history (longpress home key).
intFLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET
intFLAG_ACTIVITY_NEW_DOCUMENT
This flag is used to open a document into a new task rooted at the activity launched by this Intent.
intFLAG_ACTIVITY_NO_USER_ACTION
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.
intFLAG_ACTIVITY_REORDER_TO_FRONT
If set in an Intent passed to Context#startActivity 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.
intFLAG_ACTIVITY_NO_ANIMATION
If set in an Intent passed to Context#startActivity Context.startActivity() , this flag will prevent the system from applying an activity transition animation to go to the next activity state.
intFLAG_ACTIVITY_CLEAR_TASK
If set in an Intent passed to Context#startActivity Context.startActivity() , this flag will cause any existing task that would be associated with the activity to be cleared before the activity is started.
intFLAG_ACTIVITY_TASK_ON_HOME
If set in an Intent passed to Context#startActivity 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).
intFLAG_ACTIVITY_RETAIN_IN_RECENTS
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()).
intFLAG_ACTIVITY_LAUNCH_ADJACENT
This flag is only used in split-screen multi-window mode.
intFLAG_RECEIVER_REGISTERED_ONLY
If set, when sending a broadcast only registered receivers will be called -- no BroadcastReceiver components will be launched.
intFLAG_RECEIVER_REPLACE_PENDING
If set, when sending a broadcast the new broadcast will replace any existing pending broadcast that matches it.
intFLAG_RECEIVER_FOREGROUND
If set, when sending a broadcast the recipient is allowed to run at foreground priority, with a shorter timeout interval.
intFLAG_RECEIVER_REGISTERED_ONLY_BEFORE_BOOT
If set, when sending a broadcast before boot has completed only registered receivers will be called -- no BroadcastReceiver components will be launched.
intURI_INTENT_SCHEME
Flag for use with #toUri and #parseUri : the URI string always has the "intent:" scheme.
intURI_ANDROID_APP_SCHEME
Flag for use with #toUri and #parseUri : the URI string always has the "android-app:" scheme.
intURI_ALLOW_UNSAFE
Flag for use with #toUri and #parseUri : allow parsing of unsafe information.
intFILL_IN_ACTION
Use with #fillIn to allow the current action value to be overwritten, even if it is already set.
intFILL_IN_DATA
Use with #fillIn to allow the current data or type value overwritten, even if it is already set.
Parcelable.CreatorCREATOR

Constructor

Intent(Intent o)
Copy constructor.
Intent(String action)
Create an intent with a given action.
Intent(Parcel in)
Intent()
Create an empty intent.
Intent(Intent o, @CopyMode int copyMode)
Intent(String action, Uri uri)
Create an intent with a given action and for a given data url.
Intent(Context packageContext, Class cls)
Create an intent for a specific component.

Method

IntentaddCategory(String category)
Add a new category to the intent.
IntentaddFlags(@Flags int flags)
Add additional flags to the intent (or with existing flags value).
Objectclone()
IntentcloneFilter()
Make a clone of only the parts of the Intent that are relevant for filter matching: the action, data, type, component, and categories.
IntentcreateChooser(Intent target, CharSequence title)
Convenience function for creating a #ACTION_CHOOSER Intent.
intfillIn(@NonNull Intent other, @FillInFlags int flags)
Copy the contents of other in to this object, but only where fields are not defined by this object.
booleanfilterEquals(Intent other)
Determine if two intents are the same for the purposes of intent resolution (filtering).
StringgetAction()
Retrieve the general action to be performed, such as #ACTION_VIEW .
boolean[]getBooleanArrayExtra(String name)
Retrieve extended data from the intent.
booleangetBooleanExtra(String name, boolean defaultValue)
Retrieve extended data from the intent.
BundlegetBundleExtra(String name)
Retrieve extended data from the intent.
byte[]getByteArrayExtra(String name)
Retrieve extended data from the intent.
bytegetByteExtra(String name, byte defaultValue)
Retrieve extended data from the intent.
SetgetCategories()
Return the set of all categories in the intent.
char[]getCharArrayExtra(String name)
Retrieve extended data from the intent.
chargetCharExtra(String name, char defaultValue)
Retrieve extended data from the intent.
CharSequence[]getCharSequenceArrayExtra(String name)
Retrieve extended data from the intent.
ArrayListgetCharSequenceArrayListExtra(String name)
Retrieve extended data from the intent.
CharSequencegetCharSequenceExtra(String name)
Retrieve extended data from the intent.
ClipDatagetClipData()
Return the ClipData associated with this Intent.
ComponentNamegetComponent()
Retrieve the concrete component associated with the intent.
UrigetData()
Retrieve data this intent is operating on.
StringgetDataString()
The same as #getData() , but returns the URI as an encoded String.
double[]getDoubleArrayExtra(String name)
Retrieve extended data from the intent.
doublegetDoubleExtra(String name, double defaultValue)
Retrieve extended data from the intent.
BundlegetExtras()
Retrieves a map of extended data from the intent.
intgetFlags()
Retrieve any special flags associated with this intent.
float[]getFloatArrayExtra(String name)
Retrieve extended data from the intent.
floatgetFloatExtra(String name, float defaultValue)
Retrieve extended data from the intent.
int[]getIntArrayExtra(String name)
Retrieve extended data from the intent.
ArrayListgetIntegerArrayListExtra(String name)
Retrieve extended data from the intent.
IntentgetIntent(String uri)
Call #parseUri with 0 flags.
intgetIntExtra(String name, int defaultValue)
Retrieve extended data from the intent.
long[]getLongArrayExtra(String name)
Retrieve extended data from the intent.
longgetLongExtra(String name, long defaultValue)
Retrieve extended data from the intent.
StringgetPackage()
Retrieve the application package name this Intent is limited to.
Parcelable[]getParcelableArrayExtra(String name)
Retrieve extended data from the intent.
ArrayListgetParcelableArrayListExtra(String name)
Retrieve extended data from the intent.
TgetParcelableExtra(String name)
Retrieve extended data from the intent.
StringgetScheme()
Return the scheme portion of the intent's data.
SerializablegetSerializableExtra(String name)
Retrieve extended data from the intent.
short[]getShortArrayExtra(String name)
Retrieve extended data from the intent.
shortgetShortExtra(String name, short defaultValue)
Retrieve extended data from the intent.
RectgetSourceBounds()
Get the bounds of the sender of this intent, in screen coordinates.
String[]getStringArrayExtra(String name)
Retrieve extended data from the intent.
ArrayListgetStringArrayListExtra(String name)
Retrieve extended data from the intent.
StringgetStringExtra(String name)
Retrieve extended data from the intent.
StringgetType()
Retrieve any explicit MIME type included in the intent.
booleanhasCategory(String category)
Check if a category exists in the intent.
booleanhasExtra(String name)
Returns true if an extra value is associated with the given name.
inthashCode()
Returns a hash code value for the object.
IntentmakeMainActivity(ComponentName mainActivity)
Create an intent to launch the main (root) activity of a task.
IntentmakeMainSelectorActivity(String selectorAction, String selectorCategory)
Make an Intent for the main activity of an application, without specifying a specific activity to run but giving a selector to find the activity.
booleanmigrateExtraStreamToClipData()
Migrate any #EXTRA_STREAM in #ACTION_SEND and #ACTION_SEND_MULTIPLE to ClipData .
StringnormalizeMimeType(@Nullable String type)
Normalize a MIME data type.
IntentparseIntent(@NonNull Resources resources, @NonNull XmlPullParser parser, AttributeSet attrs)
Parses the "intent" element (and its children) from XML and instantiates an Intent object.
IntentparseUri(String uri, @UriFlags int flags)
Create an intent from a URI.
IntentputCharSequenceArrayListExtra(String name, ArrayList value)
Add extended data to the intent.
IntentputExtra(String name, boolean value)
Add extended data to the intent.
IntentputExtra(String name, byte value)
Add extended data to the intent.
IntentputExtra(String name, char value)
Add extended data to the intent.
IntentputExtra(String name, short value)
Add extended data to the intent.
IntentputExtra(String name, int value)
Add extended data to the intent.
IntentputExtra(String name, long value)
Add extended data to the intent.
IntentputExtra(String name, float value)
Add extended data to the intent.
IntentputExtra(String name, double value)
Add extended data to the intent.
IntentputExtra(String name, String value)
Add extended data to the intent.
IntentputExtra(String name, CharSequence value)
Add extended data to the intent.
IntentputExtra(String name, Parcelable value)
Add extended data to the intent.
IntentputExtra(String name, Parcelable[] value)
Add extended data to the intent.
IntentputExtra(String name, Serializable value)
Add extended data to the intent.
IntentputExtra(String name, boolean[] value)
Add extended data to the intent.
IntentputExtra(String name, byte[] value)
Add extended data to the intent.
IntentputExtra(String name, short[] value)
Add extended data to the intent.
IntentputExtra(String name, char[] value)
Add extended data to the intent.
IntentputExtra(String name, int[] value)
Add extended data to the intent.
IntentputExtra(String name, long[] value)
Add extended data to the intent.
IntentputExtra(String name, float[] value)
Add extended data to the intent.
IntentputExtra(String name, double[] value)
Add extended data to the intent.
IntentputExtra(String name, String[] value)
Add extended data to the intent.
IntentputExtra(String name, CharSequence[] value)
Add extended data to the intent.
IntentputExtra(String name, Bundle value)
Add extended data to the intent.
IntentputExtra(String name, IBinder value)
Add extended data to the intent.
IntentputExtras(@NonNull Intent src)
Copy all extras in 'src' in to this intent.
IntentputExtras(@NonNull Bundle extras)
Add a set of extended data to the intent.
IntentputIntegerArrayListExtra(String name, ArrayList value)
Add extended data to the intent.
IntentputParcelableArrayListExtra(String name, ArrayList value)
Add extended data to the intent.
IntentputStringArrayListExtra(String name, ArrayList value)
Add extended data to the intent.
voidremoveCategory(String category)
Remove a category from an intent.
voidremoveExtra(String name)
Remove extended data from the intent.
IntentreplaceExtras(@NonNull Intent src)
Completely replace the extras in the Intent with the extras in the given Intent.
IntentreplaceExtras(@Nullable Bundle extras)
Completely replace the extras in the Intent with the given Bundle of extras.
ComponentNameresolveActivity(@NonNull PackageManager pm)
Return the Activity component that should be used to handle this intent.
ActivityInforesolveActivityInfo(@NonNull PackageManager pm, @PackageManager.ComponentInfoFlags int flags)
Resolve the Intent into an ActivityInfo describing the activity that should execute the intent.
StringresolveType(@NonNull Context context)
Return the MIME data type of this intent.
StringresolveType(@NonNull ContentResolver resolver)
Return the MIME data type of this intent.
StringresolveTypeIfNeeded(@NonNull ContentResolver resolver)
Return the MIME data type of this intent, only if it will be needed for intent resolution.
IntentsetAction(@Nullable String action)
Set the general action to be performed.
voidsetAllowFds(boolean allowFds)
IntentsetClass(@NonNull Context packageContext, @NonNull Class cls)
Convenience for calling #setComponent(ComponentName) with the name returned by a Class object.
IntentsetClassName(@NonNull Context packageContext, @NonNull String className)
Convenience for calling #setComponent with an explicit class name.
IntentsetClassName(@NonNull String packageName, @NonNull String className)
Convenience for calling #setComponent with an explicit application package name and class name.
voidsetClipData(@Nullable ClipData clip)
Set a ClipData associated with this Intent.
IntentsetComponent(@Nullable ComponentName component)
(Usually optional) Explicitly set the component to handle the intent.
IntentsetData(@Nullable Uri data)
Set the data this intent is operating on.
IntentsetDataAndType(@Nullable Uri data, @Nullable String type)
(Usually optional) Set the data for the intent along with an explicit MIME data type.
IntentsetDataAndTypeAndNormalize(@NonNull Uri data, @Nullable String type)
(Usually optional) Normalize and set both the data Uri and an explicit MIME data type.
voidsetExtrasClassLoader(@Nullable ClassLoader loader)
Sets the ClassLoader that will be used when unmarshalling any Parcelable values from the extras of this Intent.
IntentsetFlags(@Flags int flags)
Set special flags controlling how this intent is handled.
IntentsetPackage(@Nullable String packageName)
(Usually optional) Set an explicit application package name that limits the components this Intent will resolve to.
voidsetSelector(@Nullable Intent selector)
Set a selector for this Intent.
voidsetSourceBounds(@Nullable Rect r)
Set the bounds of the sender of this intent, in screen coordinates.
IntentsetType(@Nullable String type)
Set an explicit MIME data type.
IntentsetTypeAndNormalize(@Nullable String type)
Normalize and set an explicit MIME data type.
StringtoString()
StringtoUri(@UriFlags int flags)
Convert this Intent into a String holding a URI representation of it.
voidwriteToParcel(Parcel out, int flags)