IT. Expert System.

Android Reference

Intent


android.content

Class Intent

  • All Implemented Interfaces:
    Parcelable, Cloneable
    Direct Known Subclasses:
    LabeledIntent


    public class Intent
    extends Object
    implements Parcelable, Cloneable
    An intent is an abstract description of an operation to be performed. It can be used with startActivity to launch an Activity, broadcastIntent to send it to any interested BroadcastReceiver components, and Context.startService(android.content.Intent) or Context.bindService(android.content.Intent, android.content.ServiceConnection, int) to communicate with a background 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.

    Developer Guides

    For information about how to create and resolve intents, read the Intents and Intent Filters developer guide.

    Intent Structure

    The primary pieces of information in an intent are:

    • action -- The general action to be performed, such as ACTION_VIEW, ACTION_EDIT, ACTION_MAIN, etc.

    • data -- The data to operate on, such as a person record in the contacts database, expressed as a Uri.

    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 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/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(android.content.ComponentName) or setClass(android.content.Context, java.lang.Class<?>)), 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 Activity, BroadcastReceiver, or 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 Context.registerReceiver(android.content.BroadcastReceiver, android.content.IntentFilter).) 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 Context.startActivity().

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

     <manifest xmlns:android="http://schemas.android.com/apk/res/android"
           package="com.android.notepad">
         <application android:icon="@drawable/app_notes"
                 android:label="@string/app_name">
    
             <provider 
                     android:authorities="com.google.provider.NotePad" />
    
             <activity  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/vnd.google.note" />
                 </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/vnd.google.note" />
                 </intent-filter>
             </activity>
    
             <activity  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/vnd.google.note" />
                 </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/vnd.google.note" />
                 </intent-filter>
    
             </activity>
    
             <activity  android:label="@string/title_edit_title"
                     android:theme="@android:style/Theme.Dialog">
                 <intent-filter android:label="@string/resolve_title">
                     <action android:name="com.android.notepad.action.EDIT_TITLE" />
                     <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/vnd.google.note" />
                 </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="android.intent.action.MAIN" />
           <category android:name="android.intent.category.LAUNCHER" />
       </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="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 mimeType:name="vnd.android.cursor.dir/vnd.google.note" />
       </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 Context.startActivity method to resolve your activity when its component name is not explicitly specified.

    3.  <intent-filter>
           <action android:name="android.intent.action.GET_CONTENT" />
           <category android:name="android.intent.category.DEFAULT" />
           <data android:mimeType="vnd.android.cursor.item/vnd.google.note" />
       </intent-filter>

      This filter describes the ability 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="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/vnd.google.note" />
       </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="android.intent.action.INSERT" />
           <category android:name="android.intent.category.DEFAULT" />
           <data android:mimeType="vnd.android.cursor.dir/vnd.google.note" />
       </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="com.android.notepad.action.EDIT_TITLE" />
         <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/vnd.google.note" />
     </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 PackageManager.queryIntentActivityOptions(android.content.ComponentName, android.content.Intent[], android.content.Intent, int) method, or more often to build dynamic menu items with Menu.addIntentOptions(int, int, int, android.content.ComponentName, android.content.Intent[], android.content.Intent, int, android.view.MenuItem[]). 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 Context.startActivity(android.content.Intent). 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 Context.registerReceiver(android.content.BroadcastReceiver, android.content.IntentFilter) or a <receiver> tag in a manifest).

    Standard Categories

    These are the current standard categories that can be used to further clarify an Intent via addCategory(java.lang.String).

    Standard Extra Data

    These are the current standard fields that can be used as extra data via putExtra(java.lang.String, boolean).

    Flags

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

    • Field Detail

      • ACTION_MAIN

        public static final String ACTION_MAIN
        Activity Action: Start as a main entry point, does not expect to receive data.

        Input: nothing

        Output: nothing

        See Also:
        Constant Field Values
      • ACTION_VIEW

        public static final String ACTION_VIEW
        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.

        See Also:
        Constant Field Values
      • ACTION_ATTACH_DATA

        public static final String ACTION_ATTACH_DATA
        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.

        See Also:
        Constant Field Values
      • ACTION_EDIT

        public static final String ACTION_EDIT
        Activity Action: Provide explicit editable access to the given data.

        Input: getData() is URI of data to be edited.

        Output: nothing.

        See Also:
        Constant Field Values
      • ACTION_INSERT_OR_EDIT

        public static final String ACTION_INSERT_OR_EDIT
        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.

        See Also:
        Constant Field Values
      • ACTION_PICK

        public static final String ACTION_PICK
        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.

        See Also:
        Constant Field Values
      • ACTION_CHOOSER

        public static final String ACTION_CHOOSER
        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(android.content.ClipData) 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(android.content.Intent, java.lang.CharSequence) 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.

        See Also:
        Constant Field Values
      • ACTION_GET_CONTENT

        public static final String ACTION_GET_CONTENT
        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. A 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(android.content.Intent, java.lang.CharSequence)), 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).

        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.

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

        See Also:
        Constant Field Values
      • ACTION_DIAL

        public static final String ACTION_DIAL
        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.

        See Also:
        Constant Field Values
      • ACTION_CALL

        public static final String ACTION_CALL
        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.

        See Also:
        Constant Field Values
      • ACTION_CALL_EMERGENCY

        public static final String ACTION_CALL_EMERGENCY
        Activity Action: Perform a call to an emergency number specified by the data.

        Input: getData() is URI of a phone number to be dialed or a tel: URI of an explicit phone number.

        Output: nothing.

        See Also:
        Constant Field Values
      • ACTION_CALL_PRIVILEGED

        public static final String ACTION_CALL_PRIVILEGED
        Activity action: Perform a call to any number (emergency or not) specified by the data.

        Input: getData() is URI of a phone number to be dialed or a tel: URI of an explicit phone number.

        Output: nothing.

        See Also:
        Constant Field Values
      • ACTION_SENDTO

        public static final String ACTION_SENDTO
        Activity Action: Send a message to someone specified by the data.

        Input: getData() is URI describing the target.

        Output: nothing.

        See Also:
        Constant Field Values
      • ACTION_SEND

        public static final String ACTION_SEND
        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(android.content.Intent, java.lang.CharSequence)), 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 Build.VERSION_CODES.JELLY_BEAN, the data being sent can be supplied through setClipData(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).

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

        Output: nothing.

        See Also:
        Constant Field Values
      • ACTION_SEND_MULTIPLE

        public static final String ACTION_SEND_MULTIPLE
        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 Build.VERSION_CODES.JELLY_BEAN, the data being sent can be supplied through setClipData(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).

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

        Output: nothing.

        See Also:
        Constant Field Values
      • ACTION_ANSWER

        public static final String ACTION_ANSWER
        Activity Action: Handle an incoming phone call.

        Input: nothing.

        Output: nothing.

        See Also:
        Constant Field Values
      • ACTION_INSERT

        public static final String ACTION_INSERT
        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.

        See Also:
        Constant Field Values
      • ACTION_PASTE

        public static final String ACTION_PASTE
        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.

        See Also:
        Constant Field Values
      • ACTION_DELETE

        public static final String ACTION_DELETE
        Activity Action: Delete the given data from its container.

        Input: getData() is URI of data to be deleted.

        Output: nothing.

        See Also:
        Constant Field Values
      • ACTION_RUN

        public static final String ACTION_RUN
        Activity Action: Run the data, whatever that means.

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

        Output: nothing.

        See Also:
        Constant Field Values
      • ACTION_SYNC

        public static final String ACTION_SYNC
        Activity Action: Perform a data synchronization.

        Input: ?

        Output: ?

        See Also:
        Constant Field Values
      • ACTION_SYSTEM_TUTORIAL

        public static final String ACTION_SYSTEM_TUTORIAL
        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.

        See Also:
        Constant Field Values
      • ACTION_WEB_SEARCH

        public static final String ACTION_WEB_SEARCH
        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.

        See Also:
        Constant Field Values
      • ACTION_ASSIST

        public static final String ACTION_ASSIST
        Activity Action: Perform assist action.

        Input: nothing Output: nothing.

        See Also:
        Constant Field Values
      • ACTION_ALL_APPS

        public static final String ACTION_ALL_APPS
        Activity Action: List all available applications

        Input: Nothing.

        Output: nothing.

        See Also:
        Constant Field Values
      • ACTION_SET_WALLPAPER

        public static final String ACTION_SET_WALLPAPER
        Activity Action: Show settings for choosing wallpaper

        Input: Nothing.

        Output: Nothing.

        See Also:
        Constant Field Values
      • ACTION_BUG_REPORT

        public static final String ACTION_BUG_REPORT
        Activity Action: Show activity for reporting a bug.

        Input: Nothing.

        Output: Nothing.

        See Also:
        Constant Field Values
      • ACTION_FACTORY_TEST

        public static final String ACTION_FACTORY_TEST
        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

        See Also:
        Constant Field Values
      • ACTION_CALL_BUTTON

        public static final String ACTION_CALL_BUTTON
        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.

        See Also:
        Constant Field Values
      • ACTION_VOICE_COMMAND

        public static final String ACTION_VOICE_COMMAND
        Activity Action: Start Voice Command.

        Input: Nothing.

        Output: Nothing.

        See Also:
        Constant Field Values
      • ACTION_SEARCH_LONG_PRESS

        public static final String ACTION_SEARCH_LONG_PRESS
        Activity Action: Start action associated with long pressing on the search key.

        Input: Nothing.

        Output: Nothing.

        See Also:
        Constant Field Values
      • ACTION_APP_ERROR

        public static final String ACTION_APP_ERROR
        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.

        See Also:
        EXTRA_BUG_REPORT, Constant Field Values
      • ACTION_POWER_USAGE_SUMMARY

        public static final String ACTION_POWER_USAGE_SUMMARY
        Activity Action: Show power usage information to the user.

        Input: Nothing.

        Output: Nothing.

        See Also:
        Constant Field Values
      • ACTION_UPGRADE_SETUP

        public static final String ACTION_UPGRADE_SETUP
        Activity Action: Setup wizard to launch after a platform update. This activity should have a string meta-data field associated with it, METADATA_SETUP_VERSION, which defines the current version of the platform for setup. The activity will be launched only if Settings.Secure.LAST_SETUP_SHOWN is not the same value.

        Input: Nothing.

        Output: Nothing.

        See Also:
        Constant Field Values
      • ACTION_MANAGE_NETWORK_USAGE

        public static final String ACTION_MANAGE_NETWORK_USAGE
        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.
        See Also:
        Constant Field Values
      • EXTRA_NOT_UNKNOWN_SOURCE

        public static final String EXTRA_NOT_UNKNOWN_SOURCE
        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().
        See Also:
        Constant Field Values
      • EXTRA_ALLOW_REPLACE

        @Deprecated
        public static final String EXTRA_ALLOW_REPLACE
        Deprecated. As of 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.
        See Also:
        Constant Field Values
      • EXTRA_INSTALL_RESULT

        public static final String EXTRA_INSTALL_RESULT
        Package manager install result code. @hide because result codes are not yet ready to be exposed.
        See Also:
        Constant Field Values
      • ACTION_UNINSTALL_PACKAGE

        public static final String ACTION_UNINSTALL_PACKAGE
        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 install succeeded.

        See Also:
        Constant Field Values
      • EXTRA_UNINSTALL_ALL_USERS

        public static final String EXTRA_UNINSTALL_ALL_USERS
        Specify whether the package should be uninstalled for all users.
        See Also:
        Constant Field Values
      • ACTION_SCREEN_OFF

        public static final String ACTION_SCREEN_OFF
        Broadcast Action: Sent after the screen turns off.

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

        See Also:
        Constant Field Values
      • ACTION_SCREEN_ON

        public static final String ACTION_SCREEN_ON
        Broadcast Action: Sent after the screen turns on.

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

        See Also:
        Constant Field Values
      • ACTION_DREAMING_STOPPED

        public static final String ACTION_DREAMING_STOPPED
        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.

        See Also:
        Constant Field Values
      • ACTION_DREAMING_STARTED

        public static final String ACTION_DREAMING_STARTED
        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.

        See Also:
        Constant Field Values
      • ACTION_USER_PRESENT

        public static final String ACTION_USER_PRESENT
        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.

        See Also:
        Constant Field Values
      • ACTION_TIME_TICK

        public static final String ACTION_TIME_TICK
        Broadcast Action: The current time has changed. Sent every minute. You can not receive this through components declared in manifests, only by exlicitly registering for it with Context.registerReceiver().

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

        See Also:
        Constant Field Values
      • ACTION_TIME_CHANGED

        public static final String ACTION_TIME_CHANGED
        Broadcast Action: The time was set.
        See Also:
        Constant Field Values
      • ACTION_DATE_CHANGED

        public static final String ACTION_DATE_CHANGED
        Broadcast Action: The date has changed.
        See Also:
        Constant Field Values
      • ACTION_TIMEZONE_CHANGED

        public static final String ACTION_TIMEZONE_CHANGED
        Broadcast Action: The timezone has changed. The intent will have the following extra values:

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

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

        See Also:
        Constant Field Values
      • ACTION_CLEAR_DNS_CACHE

        public static final String ACTION_CLEAR_DNS_CACHE
        Clear DNS Cache Action: This is broadcast when networks have changed and old DNS entries should be tossed.
        See Also:
        Constant Field Values
      • ACTION_ALARM_CHANGED

        public static final String ACTION_ALARM_CHANGED
        Alarm Changed Action: This is broadcast when the AlarmClock application's alarm is set or unset. It is used by the AlarmClock application and the StatusBar service.
        See Also:
        Constant Field Values
      • ACTION_SYNC_STATE_CHANGED

        public static final String ACTION_SYNC_STATE_CHANGED
        Sync State Changed Action: This is broadcast when the sync starts or stops or when one has been failing for a long time. It is used by the SyncManager and the StatusBar service.
        See Also:
        Constant Field Values
      • ACTION_BOOT_COMPLETED

        public static final String ACTION_BOOT_COMPLETED
        Broadcast Action: This is broadcast once, after the system 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 is a protected intent that can only be sent by the system.

        See Also:
        Constant Field Values
      • ACTION_CLOSE_SYSTEM_DIALOGS

        public static final String ACTION_CLOSE_SYSTEM_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.
        See Also:
        Constant Field Values
      • ACTION_PACKAGE_INSTALL

        @Deprecated
        public static final String ACTION_PACKAGE_INSTALL
        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.

        See Also:
        Constant Field Values
      • ACTION_PACKAGE_ADDED

        public static final String ACTION_PACKAGE_ADDED
        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.

        See Also:
        Constant Field Values
      • ACTION_PACKAGE_REPLACED

        public static final String ACTION_PACKAGE_REPLACED
        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.

        See Also:
        Constant Field Values
      • ACTION_MY_PACKAGE_REPLACED

        public static final String ACTION_MY_PACKAGE_REPLACED
        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.

        See Also:
        Constant Field Values
      • ACTION_PACKAGE_REMOVED

        public static final String ACTION_PACKAGE_REMOVED
        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 installed does not receive this Intent.

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

        See Also:
        Constant Field Values
      • ACTION_PACKAGE_FULLY_REMOVED

        public static final String ACTION_PACKAGE_FULLY_REMOVED
        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.

        See Also:
        Constant Field Values
      • ACTION_PACKAGE_CHANGED

        public static final String ACTION_PACKAGE_CHANGED
        Broadcast Action: An existing application package has been changed (e.g. 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.

        See Also:
        Constant Field Values
      • ACTION_PACKAGE_RESTARTED

        public static final String ACTION_PACKAGE_RESTARTED
        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.

        See Also:
        Constant Field Values
      • ACTION_PACKAGE_DATA_CLEARED

        public static final String ACTION_PACKAGE_DATA_CLEARED
        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.

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

        See Also:
        Constant Field Values
      • ACTION_UID_REMOVED

        public static final String ACTION_UID_REMOVED
        Broadcast Action: A user ID has been removed from the system. The user ID number is stored in the extra data under EXTRA_UID.

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

        See Also:
        Constant Field Values
      • ACTION_PACKAGE_FIRST_LAUNCH

        public static final String ACTION_PACKAGE_FIRST_LAUNCH
        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.

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

        See Also:
        Constant Field Values
      • ACTION_PACKAGE_NEEDS_VERIFICATION

        public static final String ACTION_PACKAGE_NEEDS_VERIFICATION
        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.

        See Also:
        Constant Field Values
      • ACTION_PACKAGE_VERIFIED

        public static final String ACTION_PACKAGE_VERIFIED
        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.

        See Also:
        Constant Field Values
      • ACTION_EXTERNAL_APPLICATIONS_AVAILABLE

        public static final String ACTION_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. 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.

        See Also:
        Constant Field Values
      • ACTION_EXTERNAL_APPLICATIONS_UNAVAILABLE

        public static final String ACTION_EXTERNAL_APPLICATIONS_UNAVAILABLE
        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.

        See Also:
        Constant Field Values
      • ACTION_WALLPAPER_CHANGED

        @Deprecated
        public static final String ACTION_WALLPAPER_CHANGED
        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 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 crazy, 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.
        See Also:
        Constant Field Values
      • ACTION_CONFIGURATION_CHANGED

        public static final String ACTION_CONFIGURATION_CHANGED
        Broadcast Action: The current device 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 can not 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.

        See Also:
        Configuration, Constant Field Values
      • ACTION_LOCALE_CHANGED

        public static final String ACTION_LOCALE_CHANGED
        Broadcast Action: The current device's locale has changed.

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

        See Also:
        Constant Field Values
      • ACTION_BATTERY_LOW

        public static final String ACTION_BATTERY_LOW
        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.

        See Also:
        Constant Field Values
      • ACTION_BATTERY_OKAY

        public static final String ACTION_BATTERY_OKAY
        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.

        See Also:
        Constant Field Values
      • ACTION_POWER_CONNECTED

        public static final String ACTION_POWER_CONNECTED
        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.

        See Also:
        Constant Field Values
      • ACTION_POWER_DISCONNECTED

        public static final String ACTION_POWER_DISCONNECTED
        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.

        See Also:
        Constant Field Values
      • ACTION_SHUTDOWN

        public static final String ACTION_SHUTDOWN
        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.

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

        See Also:
        Constant Field Values
      • ACTION_REQUEST_SHUTDOWN

        public static final String ACTION_REQUEST_SHUTDOWN
        Activity Action: Start this activity to request system shutdown. The optional boolean extra field EXTRA_KEY_CONFIRM can be set to true to request confirmation from the user before shutting down.

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

        See Also:
        Constant Field Values
      • ACTION_DEVICE_STORAGE_LOW

        public static final String ACTION_DEVICE_STORAGE_LOW
        Broadcast Action: A sticky broadcast that indicates low memory condition on the device

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

        See Also:
        Constant Field Values
      • ACTION_DEVICE_STORAGE_OK

        public static final String ACTION_DEVICE_STORAGE_OK
        Broadcast Action: Indicates low memory condition on the device no longer exists

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

        See Also:
        Constant Field Values
      • ACTION_DEVICE_STORAGE_FULL

        public static final String ACTION_DEVICE_STORAGE_FULL
        Broadcast Action: A sticky broadcast that indicates a memory full condition on the device. This is intended for activities that want to be able to fill the data partition completely, leaving only enough free space to prevent system-wide SQLite failures.

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

        See Also:
        Constant Field Values
      • ACTION_DEVICE_STORAGE_NOT_FULL

        public static final String ACTION_DEVICE_STORAGE_NOT_FULL
        Broadcast Action: Indicates memory full condition on the device no longer exists.

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

        See Also:
        Constant Field Values
      • ACTION_MANAGE_PACKAGE_STORAGE

        public static final String ACTION_MANAGE_PACKAGE_STORAGE
        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.
        See Also:
        Constant Field Values
      • ACTION_UMS_CONNECTED

        @Deprecated
        public static final String ACTION_UMS_CONNECTED
        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
        See Also:
        Constant Field Values
      • ACTION_UMS_DISCONNECTED

        @Deprecated
        public static final String ACTION_UMS_DISCONNECTED
        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
        See Also:
        Constant Field Values
      • ACTION_MEDIA_REMOVED

        public static final String ACTION_MEDIA_REMOVED
        Broadcast Action: External media has been removed. The path to the mount point for the removed media is contained in the Intent.mData field.
        See Also:
        Constant Field Values
      • ACTION_MEDIA_UNMOUNTED

        public static final String ACTION_MEDIA_UNMOUNTED
        Broadcast Action: External media is present, but not mounted at its mount point. The path to the mount point for the removed media is contained in the Intent.mData field.
        See Also:
        Constant Field Values
      • ACTION_MEDIA_CHECKING

        public static final String ACTION_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.
        See Also:
        Constant Field Values
      • ACTION_MEDIA_NOFS

        public static final String ACTION_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.
        See Also:
        Constant Field Values
      • ACTION_MEDIA_MOUNTED

        public static final String ACTION_MEDIA_MOUNTED
        Broadcast Action: External media is present and mounted at its mount point. The path to the mount point for the removed 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.
        See Also:
        Constant Field Values
      • ACTION_MEDIA_SHARED

        public static final String ACTION_MEDIA_SHARED
        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.
        See Also:
        Constant Field Values
      • ACTION_MEDIA_UNSHARED

        public static final String ACTION_MEDIA_UNSHARED
        Broadcast Action: External media is no longer being shared via USB mass storage. The path to the mount point for the previously shared media is contained in the Intent.mData field.
        See Also:
        Constant Field Values
      • ACTION_MEDIA_BAD_REMOVAL

        public static final String ACTION_MEDIA_BAD_REMOVAL
        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.
        See Also:
        Constant Field Values
      • ACTION_MEDIA_UNMOUNTABLE

        public static final String ACTION_MEDIA_UNMOUNTABLE
        Broadcast Action: External media is present but cannot be mounted. The path to the mount point for the removed media is contained in the Intent.mData field.
        See Also:
        Constant Field Values
      • ACTION_MEDIA_EJECT

        public static final String ACTION_MEDIA_EJECT
        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.
        See Also:
        Constant Field Values
      • ACTION_MEDIA_SCANNER_STARTED

        public static final String ACTION_MEDIA_SCANNER_STARTED
        Broadcast Action: The media scanner has started scanning a directory. The path to the directory being scanned is contained in the Intent.mData field.
        See Also:
        Constant Field Values
      • ACTION_MEDIA_SCANNER_FINISHED

        public static final String ACTION_MEDIA_SCANNER_FINISHED
        Broadcast Action: The media scanner has finished scanning a directory. The path to the scanned directory is contained in the Intent.mData field.
        See Also:
        Constant Field Values
      • ACTION_MEDIA_SCANNER_SCAN_FILE

        public static final String ACTION_MEDIA_SCANNER_SCAN_FILE
        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 the Intent.mData field.
        See Also:
        Constant Field Values
      • ACTION_MEDIA_BUTTON

        public static final String ACTION_MEDIA_BUTTON
        Broadcast Action: The "Media Button" was pressed. Includes a single extra field, EXTRA_KEY_EVENT, containing the key event that caused the broadcast.
        See Also:
        Constant Field Values
      • ACTION_CAMERA_BUTTON

        public static final String ACTION_CAMERA_BUTTON
        Broadcast Action: The "Camera Button" was pressed. Includes a single extra field, EXTRA_KEY_EVENT, containing the key event that caused the broadcast.
        See Also:
        Constant Field Values
      • ACTION_GTALK_SERVICE_CONNECTED

        public static final String ACTION_GTALK_SERVICE_CONNECTED
        Broadcast Action: A GTalk connection has been established.
        See Also:
        Constant Field Values
      • ACTION_GTALK_SERVICE_DISCONNECTED

        public static final String ACTION_GTALK_SERVICE_DISCONNECTED
        Broadcast Action: A GTalk connection has been disconnected.
        See Also:
        Constant Field Values
      • ACTION_INPUT_METHOD_CHANGED

        public static final String ACTION_INPUT_METHOD_CHANGED
        Broadcast Action: An input method has been changed.
        See Also:
        Constant Field Values
      • ACTION_AIRPLANE_MODE_CHANGED

        public static final String ACTION_AIRPLANE_MODE_CHANGED

        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.

        See Also:
        Constant Field Values
      • ACTION_PROVIDER_CHANGED

        public static final String ACTION_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. 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.
        See Also:
        Constant Field Values
      • ACTION_HEADSET_PLUG

        public static final String ACTION_HEADSET_PLUG
        Broadcast Action: Wired Headset plugged in or unplugged.

        The intent will have the following extra values:

        • state - 0 for unplugged, 1 for plugged.
        • name - Headset type, human readable string
        • microphone - 1 if headset has a microphone, 0 otherwise
See Also:
Constant Field Values
  • ACTION_ANALOG_AUDIO_DOCK_PLUG

    public static final String ACTION_ANALOG_AUDIO_DOCK_PLUG
    Broadcast Action: An analog audio speaker/headset plugged in or unplugged.

    The intent will have the following extra values:

    • state - 0 for unplugged, 1 for plugged.
    • name - Headset type, human readable string
See Also:
Constant Field Values
  • ACTION_DIGITAL_AUDIO_DOCK_PLUG

    public static final String ACTION_DIGITAL_AUDIO_DOCK_PLUG
    Broadcast Action: A digital audio speaker/headset plugged in or unplugged.

    The intent will have the following extra values:

    • state - 0 for unplugged, 1 for plugged.
    • name - Headset type, human readable string
See Also:
Constant Field Values
See Also:
Constant Field Values
See Also:
Constant Field Values
See Also:
Constant Field Values


Content

Android Reference

Java basics

Java Enterprise Edition (EE)

Java Standard Edition (SE)

SQL

HTML

PHP

CSS

Java Script

MYSQL

JQUERY

VBS

REGEX

C

C++

C#

Design patterns

RFC (standard status)

RFC (proposed standard status)

RFC (draft standard status)

RFC (informational status)

RFC (experimental status)

RFC (best current practice status)

RFC (historic status)

RFC (unknown status)

IT dictionary

License.
All information of this service is derived from the free sources and is provided solely in the form of quotations. This service provides information and interfaces solely for the familiarization (not ownership) and under the "as is" condition.
Copyright 2016 © ELTASK.COM. All rights reserved.
Site is optimized for mobile devices.
Downloads: 3354 / . Delta: 0.16793 с