Lines Matching defs:intent

50  * An intent is an abstract description of an operation to be performed.  It
73 * <p>The primary pieces of information in an intent are:</p>
110 * new intent { <b>{@link #ACTION_VIEW} <i>content://contacts/N</i></b> }
116 * attributes that you can also include with an intent:</p>
125 * intent data. Normally the type is inferred from the data itself.
129 * class to use for the intent. Normally this is determined by looking
130 * at the other information in the intent (the action, data/type, and
170 * "android.intent.action.VIEW".</p>
194 * intent.
197 * <p>When using implicit intents, given such an arbitrary intent we need to
203 * <p>The intent resolution mechanism basically revolves around matching an
204 * Intent against all of the &lt;intent-filter&gt; descriptions in the
213 * intent. The appropriate component is determined based on the intent
222 * included in the intent (either explicitly or implicitly in its
226 * intent data (such as <code>http:</code> or <code>mailto:</code>) is
233 * with an intent that lists <em>both</em> of those categories.
253 * &lt;intent-filter&gt;
254 * &lt;action android:name="android.intent.action.MAIN" /&gt;
255 * &lt;category android:name="android.intent.category.LAUNCHER" /&gt;
256 * &lt;/intent-filter&gt;
257 * &lt;intent-filter&gt;
258 * &lt;action android:name="android.intent.action.VIEW" /&gt;
259 * &lt;action android:name="android.intent.action.EDIT" /&gt;
260 * &lt;action android:name="android.intent.action.PICK" /&gt;
261 * &lt;category android:name="android.intent.category.DEFAULT" /&gt;
263 * &lt;/intent-filter&gt;
264 * &lt;intent-filter&gt;
265 * &lt;action android:name="android.intent.action.GET_CONTENT" /&gt;
266 * &lt;category android:name="android.intent.category.DEFAULT" /&gt;
268 * &lt;/intent-filter&gt;
272 * &lt;intent-filter android:label="@string/resolve_edit"&gt;
273 * &lt;action android:name="android.intent.action.VIEW" /&gt;
274 * &lt;action android:name="android.intent.action.EDIT" /&gt;
275 * &lt;category android:name="android.intent.category.DEFAULT" /&gt;
277 * &lt;/intent-filter&gt;
279 * &lt;intent-filter&gt;
280 * &lt;action android:name="android.intent.action.INSERT" /&gt;
281 * &lt;category android:name="android.intent.category.DEFAULT" /&gt;
283 * &lt;/intent-filter&gt;
289 * &lt;intent-filter android:label="@string/resolve_title"&gt;
291 * &lt;category android:name="android.intent.category.DEFAULT" /&gt;
292 * &lt;category android:name="android.intent.category.ALTERNATIVE" /&gt;
293 * &lt;category android:name="android.intent.category.SELECTED_ALTERNATIVE" /&gt;
295 * &lt;/intent-filter&gt;
303 * entry into the app. It can do three things as described by its three intent
307 * &lt;intent-filter&gt;
308 * &lt;action android:name="{@link #ACTION_MAIN android.intent.action.MAIN}" /&gt;
309 * &lt;category android:name="{@link #CATEGORY_LAUNCHER android.intent.category.LAUNCHER}" /&gt;
310 * &lt;/intent-filter&gt;</pre>
316 * &lt;intent-filter&gt;
317 * &lt;action android:name="{@link #ACTION_VIEW android.intent.action.VIEW}" /&gt;
318 * &lt;action android:name="{@link #ACTION_EDIT android.intent.action.EDIT}" /&gt;
319 * &lt;action android:name="{@link #ACTION_PICK android.intent.action.PICK}" /&gt;
320 * &lt;category android:name="{@link #CATEGORY_DEFAULT android.intent.category.DEFAULT}" /&gt;
322 * &lt;/intent-filter&gt;</pre>
335 * &lt;intent-filter&gt;
336 * &lt;action android:name="{@link #ACTION_GET_CONTENT android.intent.action.GET_CONTENT}" /&gt;
337 * &lt;category android:name="{@link #CATEGORY_DEFAULT android.intent.category.DEFAULT}" /&gt;
339 * &lt;/intent-filter&gt;</pre>
359 * category=android.app.category.LAUNCHER }</b> is the actual intent
361 * <li> <p><b>{ action=android.intent.action.VIEW
381 * by its two intent templates:
384 * &lt;intent-filter android:label="@string/resolve_edit"&gt;
385 * &lt;action android:name="{@link #ACTION_VIEW android.intent.action.VIEW}" /&gt;
386 * &lt;action android:name="{@link #ACTION_EDIT android.intent.action.EDIT}" /&gt;
387 * &lt;category android:name="{@link #CATEGORY_DEFAULT android.intent.category.DEFAULT}" /&gt;
389 * &lt;/intent-filter&gt;</pre>
397 * &lt;intent-filter&gt;
398 * &lt;action android:name="{@link #ACTION_INSERT android.intent.action.INSERT}" /&gt;
399 * &lt;category android:name="{@link #CATEGORY_DEFAULT android.intent.category.DEFAULT}" /&gt;
401 * &lt;/intent-filter&gt;</pre>
413 * <li> <p><b>{ action=android.intent.action.VIEW
435 * &lt;intent-filter android:label="@string/resolve_title"&gt;
437 * &lt;category android:name="{@link #CATEGORY_DEFAULT android.intent.category.DEFAULT}" /&gt;
438 * &lt;category android:name="{@link #CATEGORY_ALTERNATIVE android.intent.category.ALTERNATIVE}" /&gt;
439 * &lt;category android:name="{@link #CATEGORY_SELECTED_ALTERNATIVE android.intent.category.SELECTED_ALTERNATIVE}" /&gt;
441 * &lt;/intent-filter&gt;</pre>
443 * <p>In the single intent template here, we
458 * {@link android.view.Menu#addIntentOptions}. Note that in the intent
464 * <p>Given these capabilities, the following intent will resolve to the
599 // Standard intent activity actions (see action variable).
608 public static final String ACTION_MAIN = "android.intent.action.MAIN";
622 public static final String ACTION_VIEW = "android.intent.action.VIEW";
633 * to the recipient to decide where the data should be attached; the intent
639 public static final String ACTION_ATTACH_DATA = "android.intent.action.ATTACH_DATA";
647 public static final String ACTION_EDIT = "android.intent.action.EDIT";
658 public static final String ACTION_INSERT_OR_EDIT = "android.intent.action.INSERT_OR_EDIT";
667 public static final String ACTION_PICK = "android.intent.action.PICK";
672 * <p>Output: An Intent representing the shortcut. The intent must contain three
684 public static final String ACTION_CREATE_SHORTCUT = "android.intent.action.CREATE_SHORTCUT";
691 public static final String EXTRA_SHORTCUT_INTENT = "android.intent.extra.shortcut.INTENT";
697 public static final String EXTRA_SHORTCUT_NAME = "android.intent.extra.shortcut.NAME";
703 public static final String EXTRA_SHORTCUT_ICON = "android.intent.extra.shortcut.ICON";
711 "android.intent.extra.shortcut.ICON_RESOURCE";
831 public static final String ACTION_CHOOSER = "android.intent.action.CHOOSER";
837 * target intent, also optionally supplying a title. If the target
838 * intent has specified {@link #FLAG_GRANT_READ_URI_PERMISSION} or
840 * set in the returned chooser intent, with its ClipData set appropriately:
852 Intent intent = new Intent(ACTION_CHOOSER);
853 intent.putExtra(EXTRA_INTENT, target);
855 intent.putExtra(EXTRA_TITLE, title);
874 intent.setClipData(targetClipData);
875 intent.addFlags(permFlags);
879 return intent;
902 * In this case, you should wrap the GET_CONTENT intent with a chooser
921 * that no URI is supplied in the intent, as there are no constraints on
931 public static final String ACTION_GET_CONTENT = "android.intent.action.GET_CONTENT";
942 public static final String ACTION_DIAL = "android.intent.action.DIAL";
957 public static final String ACTION_CALL = "android.intent.action.CALL";
966 public static final String ACTION_CALL_EMERGENCY = "android.intent.action.CALL_EMERGENCY";
975 public static final String ACTION_CALL_PRIVILEGED = "android.intent.action.CALL_PRIVILEGED";
982 public static final String ACTION_SENDTO = "android.intent.action.SENDTO";
988 * When launching a SEND intent, you should usually wrap it in a chooser
1019 public static final String ACTION_SEND = "android.intent.action.SEND";
1033 * use the content resolver on each URI. The intent sender should try to
1034 * put the most concrete mime type in the intent type, but it can fall
1037 * e.g. if you are sending image/jpg and image/jpg, the intent's type can
1039 * intent's type should be image/*.
1057 public static final String ACTION_SEND_MULTIPLE = "android.intent.action.SEND_MULTIPLE";
1064 public static final String ACTION_ANSWER = "android.intent.action.ANSWER";
1072 public static final String ACTION_INSERT = "android.intent.action.INSERT";
1081 public static final String ACTION_PASTE = "android.intent.action.PASTE";
1088 public static final String ACTION_DELETE = "android.intent.action.DELETE";
1095 public static final String ACTION_RUN = "android.intent.action.RUN";
1102 public static final String ACTION_SYNC = "android.intent.action.SYNC";
1104 * Activity Action: Pick an activity given an intent, returning the class
1112 public static final String ACTION_PICK_ACTIVITY = "android.intent.action.PICK_ACTIVITY";
1121 public static final String ACTION_SEARCH = "android.intent.action.SEARCH";
1130 public static final String ACTION_SYSTEM_TUTORIAL = "android.intent.action.SYSTEM_TUTORIAL";
1142 public static final String ACTION_WEB_SEARCH = "android.intent.action.WEB_SEARCH";
1150 public static final String ACTION_ASSIST = "android.intent.action.ASSIST";
1157 public static final String ACTION_ALL_APPS = "android.intent.action.ALL_APPS";
1164 public static final String ACTION_SET_WALLPAPER = "android.intent.action.SET_WALLPAPER";
1172 public static final String ACTION_BUG_REPORT = "android.intent.action.BUG_REPORT";
1181 public static final String ACTION_FACTORY_TEST = "android.intent.action.FACTORY_TEST";
1190 public static final String ACTION_CALL_BUTTON = "android.intent.action.CALL_BUTTON";
1198 public static final String ACTION_VOICE_COMMAND = "android.intent.action.VOICE_COMMAND";
1207 public static final String ACTION_SEARCH_LONG_PRESS = "android.intent.action.SEARCH_LONG_PRESS";
1211 * This intent is delivered to the package which installed the application, usually
1220 public static final String ACTION_APP_ERROR = "android.intent.action.APP_ERROR";
1228 public static final String ACTION_POWER_USAGE_SUMMARY = "android.intent.action.POWER_USAGE_SUMMARY";
1242 public static final String ACTION_UPGRADE_SETUP = "android.intent.action.UPGRADE_SETUP";
1251 "android.intent.action.MANAGE_NETWORK_USAGE";
1271 public static final String ACTION_INSTALL_PACKAGE = "android.intent.action.INSTALL_PACKAGE";
1276 * {@link #ACTION_APP_ERROR} intent.
1279 = "android.intent.extra.INSTALLER_PACKAGE_NAME";
1289 = "android.intent.extra.NOT_UNKNOWN_SOURCE";
1297 = "android.intent.extra.ORIGINATING_URI";
1305 = "android.intent.extra.REFERRER";
1313 = "android.intent.extra.ORIGINATING_UID";
1325 = "android.intent.extra.ALLOW_REPLACE";
1335 = "android.intent.extra.RETURN_RESULT";
1342 = "android.intent.extra.INSTALL_RESULT";
1355 public static final String ACTION_UNINSTALL_PACKAGE = "android.intent.action.UNINSTALL_PACKAGE";
1362 = "android.intent.extra.UNINSTALL_ALL_USERS";
1373 // Standard intent broadcast actions (see action variable).
1378 * <p class="note">This is a protected intent that can only be sent
1382 public static final String ACTION_SCREEN_OFF = "android.intent.action.SCREEN_OFF";
1386 * <p class="note">This is a protected intent that can only be sent
1390 public static final String ACTION_SCREEN_ON = "android.intent.action.SCREEN_ON";
1395 * <p class="note">This is a protected intent that can only be sent by the system.
1399 public static final String ACTION_DREAMING_STOPPED = "android.intent.action.DREAMING_STOPPED";
1404 * <p class="note">This is a protected intent that can only be sent by the system.
1408 public static final String ACTION_DREAMING_STARTED = "android.intent.action.DREAMING_STARTED";
1414 * <p class="note">This is a protected intent that can only be sent
1418 public static final String ACTION_USER_PRESENT = "android.intent.action.USER_PRESENT";
1427 * <p class="note">This is a protected intent that can only be sent
1431 public static final String ACTION_TIME_TICK = "android.intent.action.TIME_TICK";
1436 public static final String ACTION_TIME_CHANGED = "android.intent.action.TIME_SET";
1441 public static final String ACTION_DATE_CHANGED = "android.intent.action.DATE_CHANGED";
1443 * Broadcast Action: The timezone has changed. The intent will have the following extra values:</p>
1448 * <p class="note">This is a protected intent that can only be sent
1452 public static final String ACTION_TIMEZONE_CHANGED = "android.intent.action.TIMEZONE_CHANGED";
1459 public static final String ACTION_CLEAR_DNS_CACHE = "android.intent.action.CLEAR_DNS_CACHE";
1467 public static final String ACTION_ALARM_CHANGED = "android.intent.action.ALARM_CHANGED";
1475 = "android.intent.action.SYNC_STATE_CHANGED";
1483 * <p class="note">This is a protected intent that can only be sent
1487 public static final String ACTION_BOOT_COMPLETED = "android.intent.action.BOOT_COMPLETED";
1493 public static final String ACTION_CLOSE_SYSTEM_DIALOGS = "android.intent.action.CLOSE_SYSTEM_DIALOGS";
1499 * <p class="note">This is a protected intent that can only be sent
1506 public static final String ACTION_PACKAGE_INSTALL = "android.intent.action.PACKAGE_INSTALL";
1518 * <p class="note">This is a protected intent that can only be sent
1522 public static final String ACTION_PACKAGE_ADDED = "android.intent.action.PACKAGE_ADDED";
1532 * <p class="note">This is a protected intent that can only be sent
1536 public static final String ACTION_PACKAGE_REPLACED = "android.intent.action.PACKAGE_REPLACED";
1541 * use an intent filter for this action.
1543 * <p class="note">This is a protected intent that can only be sent
1547 public static final String ACTION_MY_PACKAGE_REPLACED = "android.intent.action.MY_PACKAGE_REPLACED";
1561 * <p class="note">This is a protected intent that can only be sent
1565 public static final String ACTION_PACKAGE_REMOVED = "android.intent.action.PACKAGE_REMOVED";
1578 * <p class="note">This is a protected intent that can only be sent
1583 = "android.intent.action.PACKAGE_FULLY_REMOVED";
1596 * <p class="note">This is a protected intent that can only be sent
1600 public static final String ACTION_PACKAGE_CHANGED = "android.intent.action.PACKAGE_CHANGED";
1611 * <p class="note">This is a protected intent that can only be sent
1615 public static final String ACTION_QUERY_PACKAGE_RESTART = "android.intent.action.QUERY_PACKAGE_RESTART";
1627 * <p class="note">This is a protected intent that can only be sent
1631 public static final String ACTION_PACKAGE_RESTARTED = "android.intent.action.PACKAGE_RESTARTED";
1642 * <p class="note">This is a protected intent that can only be sent
1646 public static final String ACTION_PACKAGE_DATA_CLEARED = "android.intent.action.PACKAGE_DATA_CLEARED";
1651 * <p class="note">This is a protected intent that can only be sent
1655 public static final String ACTION_UID_REMOVED = "android.intent.action.UID_REMOVED";
1662 * <p class="note">This is a protected intent that can only be sent
1666 public static final String ACTION_PACKAGE_FIRST_LAUNCH = "android.intent.action.PACKAGE_FIRST_LAUNCH";
1672 * This is a protected intent that can only be sent by the system.
1676 public static final String ACTION_PACKAGE_NEEDS_VERIFICATION = "android.intent.action.PACKAGE_NEEDS_VERIFICATION";
1682 * This is a protected intent that can only be sent by the system.
1685 public static final String ACTION_PACKAGE_VERIFIED = "android.intent.action.PACKAGE_VERIFIED";
1707 * <p class="note">This is a protected intent that can only be sent
1712 "android.intent.action.EXTERNAL_APPLICATIONS_AVAILABLE";
1731 * <p class="note">This is a protected intent that can only be sent
1736 "android.intent.action.EXTERNAL_APPLICATIONS_UNAVAILABLE";
1755 public static final String ACTION_WALLPAPER_CHANGED = "android.intent.action.WALLPAPER_CHANGED";
1772 * <p class="note">This is a protected intent that can only be sent
1778 public static final String ACTION_CONFIGURATION_CHANGED = "android.intent.action.CONFIGURATION_CHANGED";
1782 * <p class="note">This is a protected intent that can only be sent
1786 public static final String ACTION_LOCALE_CHANGED = "android.intent.action.LOCALE_CHANGED";
1803 * <p class="note">This is a protected intent that can only be sent
1807 public static final String ACTION_BATTERY_CHANGED = "android.intent.action.BATTERY_CHANGED";
1812 * <p class="note">This is a protected intent that can only be sent
1816 public static final String ACTION_BATTERY_LOW = "android.intent.action.BATTERY_LOW";
1822 * <p class="note">This is a protected intent that can only be sent
1826 public static final String ACTION_BATTERY_OKAY = "android.intent.action.BATTERY_OKAY";
1834 * <p class="note">This is a protected intent that can only be sent
1838 public static final String ACTION_POWER_CONNECTED = "android.intent.action.ACTION_POWER_CONNECTED";
1846 * <p class="note">This is a protected intent that can only be sent
1851 "android.intent.action.ACTION_POWER_DISCONNECTED";
1859 * <p class="note">This is a protected intent that can only be sent
1863 public static final String ACTION_SHUTDOWN = "android.intent.action.ACTION_SHUTDOWN";
1869 * <p class="note">This is a protected intent that can only be sent
1874 public static final String ACTION_REQUEST_SHUTDOWN = "android.intent.action.ACTION_REQUEST_SHUTDOWN";
1879 * <p class="note">This is a protected intent that can only be sent
1883 public static final String ACTION_DEVICE_STORAGE_LOW = "android.intent.action.DEVICE_STORAGE_LOW";
1887 * <p class="note">This is a protected intent that can only be sent
1891 public static final String ACTION_DEVICE_STORAGE_OK = "android.intent.action.DEVICE_STORAGE_OK";
1898 * <p class="note">This is a protected intent that can only be sent
1904 public static final String ACTION_DEVICE_STORAGE_FULL = "android.intent.action.DEVICE_STORAGE_FULL";
1909 * <p class="note">This is a protected intent that can only be sent
1915 public static final String ACTION_DEVICE_STORAGE_NOT_FULL = "android.intent.action.DEVICE_STORAGE_NOT_FULL";
1923 public static final String ACTION_MANAGE_PACKAGE_STORAGE = "android.intent.action.MANAGE_PACKAGE_STORAGE";
1932 public static final String ACTION_UMS_CONNECTED = "android.intent.action.UMS_CONNECTED";
1942 public static final String ACTION_UMS_DISCONNECTED = "android.intent.action.UMS_DISCONNECTED";
1949 public static final String ACTION_MEDIA_REMOVED = "android.intent.action.MEDIA_REMOVED";
1956 public static final String ACTION_MEDIA_UNMOUNTED = "android.intent.action.MEDIA_UNMOUNTED";
1963 public static final String ACTION_MEDIA_CHECKING = "android.intent.action.MEDIA_CHECKING";
1970 public static final String ACTION_MEDIA_NOFS = "android.intent.action.MEDIA_NOFS";
1979 public static final String ACTION_MEDIA_MOUNTED = "android.intent.action.MEDIA_MOUNTED";
1986 public static final String ACTION_MEDIA_SHARED = "android.intent.action.MEDIA_SHARED";
1994 public static final String ACTION_MEDIA_UNSHARED = "android.intent.action.MEDIA_UNSHARED";
2001 public static final String ACTION_MEDIA_BAD_REMOVAL = "android.intent.action.MEDIA_BAD_REMOVAL";
2008 public static final String ACTION_MEDIA_UNMOUNTABLE = "android.intent.action.MEDIA_UNMOUNTABLE";
2012 * Applications should close all files they have open within the mount point when they receive this intent.
2016 public static final String ACTION_MEDIA_EJECT = "android.intent.action.MEDIA_EJECT";
2023 public static final String ACTION_MEDIA_SCANNER_STARTED = "android.intent.action.MEDIA_SCANNER_STARTED";
2030 public static final String ACTION_MEDIA_SCANNER_FINISHED = "android.intent.action.MEDIA_SCANNER_FINISHED";
2037 public static final String ACTION_MEDIA_SCANNER_SCAN_FILE = "android.intent.action.MEDIA_SCANNER_SCAN_FILE";
2045 public static final String ACTION_MEDIA_BUTTON = "android.intent.action.MEDIA_BUTTON";
2053 public static final String ACTION_CAMERA_BUTTON = "android.intent.action.CAMERA_BUTTON";
2063 "android.intent.action.GTALK_CONNECTED";
2070 "android.intent.action.GTALK_DISCONNECTED";
2077 "android.intent.action.INPUT_METHOD_CHANGED";
2081 * more radios have been turned off or on. The intent will have the following extra value:</p>
2088 * <p class="note">This is a protected intent that can only be sent
2092 public static final String ACTION_AIRPLANE_MODE_CHANGED = "android.intent.action.AIRPLANE_MODE";
2103 * <p>The data of the intent identifies which part of which provider
2107 * <p>The intent will have the following extra values:
2114 * This intent will be sent at boot (if the count is non-zero) and when the
2122 "android.intent.action.PROVIDER_CHANGED";
2127 * <p>The intent will have the following extra values:
2137 "android.intent.action.HEADSET_PLUG";
2142 * <p>The intent will have the following extra values:
2152 "android.intent.action.ANALOG_AUDIO_DOCK_PLUG";
2157 * <p>The intent will have the following extra values:
2167 "android.intent.action.DIGITAL_AUDIO_DOCK_PLUG";
2172 * <p>The intent will have the following extra values:
2182 "android.intent.action.HDMI_AUDIO_PLUG";
2187 * <p>The intent will have the following extra values:
2198 "android.intent.action.USB_AUDIO_ACCESSORY_PLUG";
2203 * <p>The intent will have the following extra values:
2214 "android.intent.action.USB_AUDIO_DEVICE_PLUG";
2222 * <p class="note">This is a protected intent that can only be sent
2229 = "android.intent.action.ADVANCED_SETTINGS";
2262 * <p class="note">This is a protected intent that can only be sent
2267 "android.intent.action.NEW_OUTGOING_CALL";
2273 * <p class="note">This is a protected intent that can only be sent
2278 "android.intent.action.REBOOT";
2284 * <p>The intent will have the following extra values:
2295 "android.intent.action.DOCK_EVENT";
2298 * Broadcast Action: a remote intent is to be broadcasted.
2300 * A remote intent is used for remote RPC between devices. The remote intent
2302 * device parses the remote intent and broadcasts it. Note that anyone can
2303 * broadcast a remote intent. However, if the intent receiver of the remote intent
2304 * does not trust intent broadcasts from arbitrary intent senders, it should require
2310 "com.google.android.c2dm.intent.RECEIVE";
2322 "android.intent.action.PRE_BOOT_COMPLETED";
2335 "android.intent.action.USER_INITIALIZE";
2347 "android.intent.action.USER_FOREGROUND";
2359 "android.intent.action.USER_BACKGROUND";
2369 "android.intent.action.USER_ADDED";
2381 "android.intent.action.USER_STARTED";
2398 "android.intent.action.USER_STARTING";
2416 "android.intent.action.USER_STOPPING";
2428 "android.intent.action.USER_STOPPED";
2439 "android.intent.action.USER_REMOVED";
2450 "android.intent.action.USER_SWITCHED";
2460 "android.intent.action.USER_INFO_CHANGED";
2466 "android.intent.action.QUICK_CLOCK";
2470 // Standard intent categories (see addCategory()).
2477 * Intent when initiating an action -- it is for use in intent filters
2481 public static final String CATEGORY_DEFAULT = "android.intent.category.DEFAULT";
2493 public static final String CATEGORY_BROWSABLE = "android.intent.category.BROWSABLE";
2503 * include a specific label in the &lt;intent-filter&gt; of this action
2516 public static final String CATEGORY_ALTERNATIVE = "android.intent.category.ALTERNATIVE";
2525 public static final String CATEGORY_SELECTED_ALTERNATIVE = "android.intent.category.SELECTED_ALTERNATIVE";
2530 public static final String CATEGORY_TAB = "android.intent.category.TAB";
2535 public static final String CATEGORY_LAUNCHER = "android.intent.category.LAUNCHER";
2542 public static final String CATEGORY_INFO = "android.intent.category.INFO";
2548 public static final String CATEGORY_HOME = "android.intent.category.HOME";
2553 public static final String CATEGORY_PREFERENCE = "android.intent.category.PREFERENCE";
2558 public static final String CATEGORY_DEVELOPMENT_PREFERENCE = "android.intent.category.DEVELOPMENT_PREFERENCE";
2563 public static final String CATEGORY_EMBED = "android.intent.category.EMBED";
2568 public static final String CATEGORY_APP_MARKET = "android.intent.category.APP_MARKET";
2573 public static final String CATEGORY_MONKEY = "android.intent.category.MONKEY";
2577 public static final String CATEGORY_TEST = "android.intent.category.TEST";
2581 public static final String CATEGORY_UNIT_TEST = "android.intent.category.UNIT_TEST";
2586 public static final String CATEGORY_SAMPLE_CODE = "android.intent.category.SAMPLE_CODE";
2588 * Used to indicate that a GET_CONTENT intent only wants URIs that can be opened with
2593 public static final String CATEGORY_OPENABLE = "android.intent.category.OPENABLE";
2599 "android.intent.category.FRAMEWORK_INSTRUMENTATION_TEST";
2606 public static final String CATEGORY_CAR_DOCK = "android.intent.category.CAR_DOCK";
2613 public static final String CATEGORY_DESK_DOCK = "android.intent.category.DESK_DOCK";
2620 public static final String CATEGORY_LE_DESK_DOCK = "android.intent.category.LE_DESK_DOCK";
2628 public static final String CATEGORY_HE_DESK_DOCK = "android.intent.category.HE_DESK_DOCK";
2634 public static final String CATEGORY_CAR_MODE = "android.intent.category.CAR_MODE";
2638 // Application launch intent categories (see addCategory()).
2650 public static final String CATEGORY_APP_BROWSER = "android.intent.category.APP_BROWSER";
2662 public static final String CATEGORY_APP_CALCULATOR = "android.intent.category.APP_CALCULATOR";
2674 public static final String CATEGORY_APP_CALENDAR = "android.intent.category.APP_CALENDAR";
2686 public static final String CATEGORY_APP_CONTACTS = "android.intent.category.APP_CONTACTS";
2698 public static final String CATEGORY_APP_EMAIL = "android.intent.category.APP_EMAIL";
2711 public static final String CATEGORY_APP_GALLERY = "android.intent.category.APP_GALLERY";
2723 public static final String CATEGORY_APP_MAPS = "android.intent.category.APP_MAPS";
2735 public static final String CATEGORY_APP_MESSAGING = "android.intent.category.APP_MESSAGING";
2748 public static final String CATEGORY_APP_MUSIC = "android.intent.category.APP_MUSIC";
2760 public static final String EXTRA_TEMPLATE = "android.intent.extra.TEMPLATE";
2769 public static final String EXTRA_TEXT = "android.intent.extra.TEXT";
2777 public static final String EXTRA_HTML_TEXT = "android.intent.extra.HTML_TEXT";
2783 public static final String EXTRA_STREAM = "android.intent.extra.STREAM";
2788 public static final String EXTRA_EMAIL = "android.intent.extra.EMAIL";
2793 public static final String EXTRA_CC = "android.intent.extra.CC";
2798 public static final String EXTRA_BCC = "android.intent.extra.BCC";
2803 public static final String EXTRA_SUBJECT = "android.intent.extra.SUBJECT";
2809 public static final String EXTRA_INTENT = "android.intent.extra.INTENT";
2815 public static final String EXTRA_TITLE = "android.intent.extra.TITLE";
2824 public static final String EXTRA_INITIAL_INTENTS = "android.intent.extra.INITIAL_INTENTS";
2830 public static final String EXTRA_KEY_EVENT = "android.intent.extra.KEY_EVENT";
2838 public static final String EXTRA_KEY_CONFIRM = "android.intent.extra.KEY_CONFIRM";
2845 public static final String EXTRA_DONT_KILL_APP = "android.intent.extra.DONT_KILL_APP";
2852 public static final String EXTRA_PHONE_NUMBER = "android.intent.extra.PHONE_NUMBER";
2861 public static final String EXTRA_UID = "android.intent.extra.UID";
2866 public static final String EXTRA_PACKAGES = "android.intent.extra.PACKAGES";
2874 public static final String EXTRA_DATA_REMOVED = "android.intent.extra.DATA_REMOVED";
2883 = "android.intent.extra.REMOVED_FOR_ALL_USERS";
2891 public static final String EXTRA_REPLACING = "android.intent.extra.REPLACING";
2896 * delievered with the intent. For one-shot alarms this will always be 1.
2901 public static final String EXTRA_ALARM_COUNT = "android.intent.extra.ALARM_COUNT";
2912 public static final String EXTRA_DOCK_STATE = "android.intent.extra.DOCK_STATE";
2954 public static final String EXTRA_BUG_REPORT = "android.intent.extra.BUG_REPORT";
2957 * Used in the extra field in the remote intent. It's astring token passed with the
2958 * remote intent.
2961 "android.intent.extra.remote_intent_token";
2968 "android.intent.extra.changed_component_name";
2975 "android.intent.extra.changed_component_name_list";
2984 "android.intent.extra.changed_package_list";
2994 "android.intent.extra.changed_uid_list";
3003 "android.intent.extra.client_label";
3012 "android.intent.extra.client_intent";
3015 * Used to indicate that a {@link #ACTION_GET_CONTENT} intent should only return
3024 "android.intent.extra.LOCAL_ONLY";
3032 "android.intent.extra.user_handle";
3063 * printed during the resolution of this intent to show you what has
3068 * If set, this intent will not match any components in packages that
3074 * If set, this intent will always match any components in packages that
3152 * either receive the new intent you are starting here in its
3154 * new intent. If it has declared its launch mode to be "multiple" (the
3156 * the same intent, then it will be finished and re-created; for all other
3173 * If set and this intent is being used to launch a new activity from an
3181 * If set and this intent is being used to launch a new activity from an
3183 * activity for deciding whether the new intent should be delivered to
3326 * will be launched. Sticky intent state will be recorded properly even
3328 * is specified in the broadcast intent, this flag is unnecessary.
3358 * always has the "intent:" scheme. This syntax can be used when you want
3383 * Create an empty intent.
3440 * Create an intent with a given action. All other fields (data, type,
3443 * example the system VIEW action is android.intent.action.VIEW; an
3454 * Create an intent with a given action and for a given data url. Note
3457 * android.intent.action.VIEW; an application's custom action would be
3475 * Create an intent for a specific component. All other fields (action, data,
3477 * calls. This provides a convenient way to create an intent that is
3484 * @param cls The component class that is to be used for the intent.
3495 * Create an intent for a specific component with a specified action and data.
3510 * @param cls The component class that is to be used for the intent.
3525 * Create an intent to launch the main (root) activity of a task. This
3546 Intent intent = new Intent(ACTION_MAIN);
3547 intent.setComponent(mainActivity);
3548 intent.addCategory(CATEGORY_LAUNCHER);
3549 return intent;
3576 Intent intent = new Intent(ACTION_MAIN);
3577 intent.addCategory(CATEGORY_LAUNCHER);
3581 intent.setSelector(selector);
3582 return intent;
3599 Intent intent = makeMainActivity(mainActivity);
3600 intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK
3602 return intent;
3615 * Create an intent from a URI. This URI may encode the action,
3616 * category, and other intent fields, if it was returned by
3638 // Validate intent scheme for if requested.
3640 if (!uri.startsWith("intent:")) {
3641 Intent intent = new Intent(ACTION_VIEW);
3643 intent.setData(Uri.parse(uri));
3647 return intent;
3659 Intent intent = new Intent(ACTION_VIEW);
3660 Intent baseIntent = intent;
3676 intent.setAction(value);
3681 intent.addCategory(value);
3686 intent.mType = value;
3691 intent.mFlags = Integer.decode(value).intValue();
3696 intent.mPackage = value;
3701 intent.mComponent = ComponentName.unflattenFromString(value);
3711 intent.mSourceBounds = Rect.unflattenFromString(value);
3716 intent = new Intent();
3723 if (intent.mExtras == null) intent.mExtras = new Bundle();
3724 Bundle b = intent.mExtras;
3742 if (intent != baseIntent) {
3744 baseIntent.setSelector(intent);
3745 intent = baseIntent;
3749 if (data.startsWith("intent:")) {
3758 intent.mData = Uri.parse(data);
3765 return intent;
3773 Intent intent;
3791 intent = new Intent(action);
3801 intent.addCategory(uri.substring(i, sep));
3812 intent.mType = uri.substring(i, j);
3820 intent.mFlags = Integer.decode(uri.substring(i, j)).intValue();
3832 intent.mComponent = new ComponentName(pkg, cls);
3864 if (intent.mExtras == null) intent.mExtras = new Bundle();
3870 intent.mExtras.putString(key, Uri.decode(value));
3873 intent.mExtras.putBoolean(key, Boolean.parseBoolean(value));
3876 intent.mExtras.putByte(key, Byte.parseByte(value));
3879 intent.mExtras.putChar(key, Uri.decode(value).charAt(0));
3882 intent.mExtras.putDouble(key, Double.parseDouble(value));
3885 intent.mExtras.putFloat(key, Float.parseFloat(value));
3888 intent.mExtras.putInt(key, Integer.parseInt(value));
3891 intent.mExtras.putLong(key, Long.parseLong(value));
3894 intent.mExtras.putShort(key, Short.parseShort(value));
3911 intent.mData = Uri.parse(uri.substring(0, intentFragmentStart));
3913 intent.mData = Uri.parse(uri);
3916 if (intent.mAction == null) {
3918 intent.mAction = ACTION_VIEW;
3922 intent = new Intent(ACTION_VIEW, Uri.parse(uri));
3925 return intent;
3931 * the information in the intent should be interpreted -- most importantly,
3934 * @return The action of this intent or null if none is specified.
3943 * Retrieve data this intent is operating on. This URI specifies the name
3948 * @return The URI of the data this intent is targeting or null.
3966 * Return the scheme portion of the intent's data. If the data is null or
3973 * @return The scheme of this intent.
3982 * Retrieve any explicit MIME type included in the intent. This is usually
3983 * null, as the type is determined by the intent data.
3996 * Return the MIME data type of this intent. If the type field is
4001 * @return The MIME type of this intent.
4011 * Return the MIME data type of this intent. If the type field is
4017 * type of the intent's data.
4019 * @return The MIME type of this intent.
4037 * Return the MIME data type of this intent, only if it will be needed for
4038 * intent resolution. This is not generally useful for application code;
4043 * type of the intent's data.
4045 * @return The MIME type of this intent, or null if it is unknown or not
4056 * Check if a category exists in the intent.
4060 * @return boolean True if the intent contains the category, else false.
4070 * Return the set of all categories in the intent. If there are no categories,
4140 * Retrieve extended data from the intent.
4156 * Retrieve extended data from the intent.
4173 * Retrieve extended data from the intent.
4190 * Retrieve extended data from the intent.
4207 * Retrieve extended data from the intent.
4224 * Retrieve extended data from the intent.
4241 * Retrieve extended data from the intent.
4258 * Retrieve extended data from the intent.
4275 * Retrieve extended data from the intent.
4292 * Retrieve extended data from the intent.
4306 * Retrieve extended data from the intent.
4320 * Retrieve extended data from the intent.
4334 * Retrieve extended data from the intent.
4348 * Retrieve extended data from the intent.
4362 * Retrieve extended data from the intent.
4376 * Retrieve extended data from the intent.
4390 * Retrieve extended data from the intent.
4404 * Retrieve extended data from the intent.
4418 * Retrieve extended data from the intent.
4432 * Retrieve extended data from the intent.
4446 * Retrieve extended data from the intent.
4460 * Retrieve extended data from the intent.
4474 * Retrieve extended data from the intent.
4488 * Retrieve extended data from the intent.
4502 * Retrieve extended data from the intent.
4516 * Retrieve extended data from the intent.
4530 * Retrieve extended data from the intent.
4544 * Retrieve extended data from the intent.
4558 * Retrieve extended data from the intent.
4572 * Retrieve extended data from the intent.
4590 * Retrieve extended data from the intent.
4618 * Retrieves a map of extended data from the intent.
4630 * Retrieve any special flags associated with this intent. You will
4663 * Retrieve the concrete component associated with the intent. When receiving
4664 * an intent, this is the component that was found to best handle it (that is,
4668 * @return The name of the application component to handle the intent.
4678 * Get the bounds of the sender of this intent, in screen coordinates. This can be
4687 * Return the Activity component that should be used to handle this intent.
4689 * intent, evaluated as follows:
4712 * <p>If multiple activities are found to satisfy the intent, the one with
4722 * intent. You do not normally need to call it yourself.</p>
4727 * display the intent.
4751 * describing the activity that should execute the intent. Resolution
4801 * Set the data this intent is operating on. This method automatically
4812 * @param data The Uri of the data this intent is now targeting.
4828 * Normalize and set the data this intent is operating on.
4840 * @param data The Uri of the data this intent is now targeting.
4868 * @param type The MIME type of the data being handled by this intent.
4900 * @param type The MIME type of the data being handled by this intent.
4914 * (Usually optional) Set the data for the intent along with an explicit
4926 * @param data The Uri of the data this intent is now targeting.
4927 * @param type The MIME type of the data being handled by this intent.
4957 * @param data The Uri of the data this intent is now targeting.
4958 * @param type The MIME type of the data being handled by this intent.
4974 * Add a new category to the intent. Categories provide additional detail
4975 * about the action the intent performs. When resolving an intent, only
4998 * Remove a category from an intent.
5060 * <p>The ClipData in an intent is not used for Intent matching or other
5088 * Add extended data to the intent. The name must include a package
5111 * Add extended data to the intent. The name must include a package
5134 * Add extended data to the intent. The name must include a package
5157 * Add extended data to the intent. The name must include a package
5180 * Add extended data to the intent. The name must include a package
5203 * Add extended data to the intent. The name must include a package
5226 * Add extended data to the intent. The name must include a package
5249 * Add extended data to the intent. The name must include a package
5272 * Add extended data to the intent. The name must include a package
5295 * Add extended data to the intent. The name must include a package
5318 * Add extended data to the intent. The name must include a package
5341 * Add extended data to the intent. The name must include a package
5364 * Add extended data to the intent. The name must include a package
5387 * Add extended data to the intent. The name must include a package
5410 * Add extended data to the intent. The name must include a package
5433 * Add extended data to the intent. The name must include a package
5456 * Add extended data to the intent. The name must include a package
5479 * Add extended data to the intent. The name must include a package
5502 * Add extended data to the intent. The name must include a package
5525 * Add extended data to the intent. The name must include a package
5548 * Add extended data to the intent. The name must include a package
5571 * Add extended data to the intent. The name must include a package
5594 * Add extended data to the intent. The name must include a package
5617 * Add extended data to the intent. The name must include a package
5640 * Add extended data to the intent. The name must include a package
5663 * Add extended data to the intent. The name must include a package
5686 * Add extended data to the intent. The name must include a package
5709 * Add extended data to the intent. The name must include a package
5732 * Add extended data to the intent. The name must include a package
5759 * Copy all extras in 'src' in to this intent.
5777 * Add a set of extended data to the intent. The keys must include a package
5781 * @param extras The Bundle of extras to add to this intent.
5799 * into the target intent, replacing any that were previously there.
5819 * Remove extended data from the intent.
5833 * Set special flags controlling how this intent is handled. Most values
5882 * Add additional flags to the intent (or with existing flags
5905 * intent, or null to allow any application package.
5923 * (Usually optional) Explicitly set the component to handle the intent.
5934 * intent, or null to let the system find one for you.
6010 * Set the bounds of the sender of this intent, in screen coordinates. This can be
6162 // since otherwise the sender could force the intent somewhere the
6207 public FilterComparison(Intent intent) {
6208 mIntent = intent;
6209 mHashCode = intent.filterHashCode();
6237 * Determine if two intents are the same for the purposes of intent
6530 uri.append("intent:");
6542 uri.append("intent:");
6713 * Parses the "intent" element (and its children) from XML and instantiates
6715 * where parsing should start (often named "intent"), from which the
6720 * to the intent.
6723 * @param parser The XML parser pointing at an "intent" tag.
6732 Intent intent = new Intent();
6737 intent.setAction(sa.getString(com.android.internal.R.styleable.Intent_action));
6741 intent.setDataAndType(data != null ? Uri.parse(data) : null, mimeType);
6746 intent.setComponent(new ComponentName(packageName, className));
6767 intent.addCategory(cat);
6772 if (intent.mExtras == null) {
6773 intent.mExtras = new Bundle();
6775 resources.parseBundleExtra("extra", attrs, intent.mExtras);
6783 return intent;
6792 * intent filtering.
6838 // Inspect target intent to see if we need to migrate