Lines Matching defs:Intent

72  * can be used with {@link Context#startActivity(Intent) startActivity} to
74 * {@link android.content.Context#sendBroadcast(Intent) broadcastIntent} to
80 * <p>An Intent provides a facility for performing late runtime binding between the code in
88 * <a href="{@docRoot}guide/topics/intents/intents-filters.html">Intents and Intent Filters</a>
93 * <h3>Intent Structure</h3>
155 * all of the other Intent attributes become optional.</p>
187 * <p>There are a variety of standard Intent action and category constants
188 * defined in the Intent class, but applications can also define their own.
201 * <h3>Intent Resolution</h3>
219 * know what to do with it. This is handled by the process of <em>Intent
220 * resolution</em>, which maps an Intent to an {@link android.app.Activity},
225 * Intent against all of the &lt;intent-filter&gt; descriptions in the
231 * <p>There are three pieces of information in the Intent that are used for
241 * <li> <p>The <b>type</b> is retrieved from the Intent's data, if not
242 * already supplied in the Intent. Like the action, if a type is
246 * type is included in the Intent, instead the <b>scheme</b> of the
334 * the Intent), and the LAUNCHER category says that this entry point should be
452 * the Intent), but here we show a way you can publish alternative
497 * <p>These are the current standard actions that Intent defines for launching
527 * <p>These are the current standard actions that Intent defines for receiving
551 * clarify an Intent via {@link #addCategory}.
613 * <p>These are the possible flags that can be used in the Intent via
617 public class Intent implements Parcelable, Cloneable {
702 * <p>Output: An Intent representing the shortcut. The intent must contain three
703 * extras: SHORTCUT_INTENT (value: Intent), SHORTCUT_NAME (value: String),
711 * @see android.content.Intent.ShortcutIconResource
717 * The name of the extra used to define the Intent of a shortcut.
738 * @see android.content.Intent.ShortcutIconResource
746 * @see Intent#ACTION_CREATE_SHORTCUT
747 * @see Intent#EXTRA_SHORTCUT_ICON_RESOURCE
844 * the permissions to be granted on the ACTION_CHOOSER Intent
850 * As a convenience, an Intent of this form can be created with the
854 * a {@link #EXTRA_INTENT} field containing the Intent being executed,
864 * Convenience function for creating a {@link #ACTION_CHOOSER} Intent.
866 * <p>Builds a new {@link #ACTION_CHOOSER} Intent that wraps the given
874 * @param target The Intent that the user will be selecting an activity
877 * @return Return a new Intent object that you can hand to
878 * {@link Context#startActivity(Intent) Context.startActivity()} and
881 public static Intent createChooser(Intent target, CharSequence title) {
886 * Convenience function for creating a {@link #ACTION_CHOOSER} Intent.
888 * <p>Builds a new {@link #ACTION_CHOOSER} Intent that wraps the given
901 * @param target The Intent that the user will be selecting an activity
905 * @return Return a new Intent object that you can hand to
906 * {@link Context#startActivity(Intent) Context.startActivity()} and
909 public static Intent createChooser(Intent target, CharSequence title, IntentSender sender) {
910 Intent intent = new Intent(ACTION_CHOOSER);
956 * data you want and launch it with {@link Context#startActivity(Intent)}.
974 * accomplished by requiring the {@link #CATEGORY_OPENABLE} in the Intent.
1020 * <p>Note: this Intent <strong>cannot</strong> be used to call emergency
1095 * it will be copied there for you when calling {@link Context#startActivity(Intent)}.
1133 * it will be copied there for you when calling {@link Context#startActivity(Intent)}.
1191 * <p>Input: get*Extra field {@link #EXTRA_INTENT} is an Intent
1428 * invoking the Intent. For this to work you must start the installer with
1436 * {@link #ACTION_VIEW} to indicate the URI from which the local APK in the Intent
1443 * This extra can be used with any Intent used to launch an activity, supplying information
1463 * not be created, in particular when Intent extras are supplied through the
1570 * Intent extra: An app package name.
1646 * Intent extra: The name of a permission.
1859 * that is being installed does <em>not</em> receive this Intent.
2113 * contents of the Intent.
2273 * The path to the mount point for the removed media is contained in the Intent.mData field.
2280 * The path to the mount point for the unmounted media is contained in the Intent.mData field.
2287 * The path to the mount point for the checking media is contained in the Intent.mData field.
2294 * The path to the mount point for the checking media is contained in the Intent.mData field.
2301 * The path to the mount point for the mounted media is contained in the Intent.mData field.
2302 * The Intent contains an extra with name "read-only" and Boolean value to indicate if the
2310 * The path to the mount point for the shared media is contained in the Intent.mData field.
2317 * The path to the mount point for the previously shared media is contained in the Intent.mData field.
2325 * The path to the mount point for the removed media is contained in the Intent.mData field.
2332 * The path to the mount point for the unmountable media is contained in the Intent.mData field.
2340 * The path to the mount point for the media to be ejected is contained in the Intent.mData field.
2347 * The path to the directory being scanned is contained in the Intent.mData field.
2354 * The path to the scanned directory is contained in the Intent.mData field.
2361 * The path to the file is contained in the Intent.mData field.
2491 * <p>The Intent will have the following extra value:</p>
2493 * <li><em>{@link android.content.Intent#EXTRA_PHONE_NUMBER}</em> -
2510 * <p>Any BroadcastReceiver receiving this Intent <em>must not</em>
2521 * permission to receive this Intent.</p>
2570 * {@link BroadcastReceiver#onReceive(Context, Intent)}, rather start a
2571 * maintenance service by {@link Context#startService(Intent)}. Also
2601 * {@link BroadcastReceiver#onReceive(Context, Intent)}, rather stop the
2652 * contain an extra {@link #EXTRA_RESTRICTIONS_INTENT}, which is of type <code>Intent</code>.
2869 * Callers must include {@link #CATEGORY_OPENABLE} in the Intent so that
2905 * Callers must include {@link #CATEGORY_OPENABLE} in the Intent so that
2996 * Intent when initiating an action -- it is for use in intent filters
3004 * and clicks on a link in the text, the Intent generated execute that
3009 * matching Intent.
3195 * <p>NOTE: This should not be used as the primary key of an Intent,
3199 * Intent with this category in the selector.</p>
3207 * <p>NOTE: This should not be used as the primary key of an Intent,
3211 * Intent with this category in the selector.</p>
3219 * <p>NOTE: This should not be used as the primary key of an Intent,
3223 * Intent with this category in the selector.</p>
3231 * <p>NOTE: This should not be used as the primary key of an Intent,
3235 * Intent with this category in the selector.</p>
3243 * <p>NOTE: This should not be used as the primary key of an Intent,
3247 * Intent with this category in the selector.</p>
3256 * <p>NOTE: This should not be used as the primary key of an Intent,
3260 * Intent with this category in the selector.</p>
3268 * <p>NOTE: This should not be used as the primary key of an Intent,
3272 * Intent with this category in the selector.</p>
3280 * <p>NOTE: This should not be used as the primary key of an Intent,
3284 * Intent with this category in the selector.</p>
3293 * <p>NOTE: This should not be used as the primary key of an Intent,
3297 * Intent with this category in the selector.</p>
3315 * A constant CharSequence that is associated with the Intent, used with
3324 * A constant String that is associated with the Intent, used with
3332 * A content: URI holding a stream of data associated with the Intent,
3358 * An Intent describing the choices you would like shown with
3364 * An Intent[] describing additional, alternate choices you would like shown with
3411 * {@link #fillIn(Intent, int) filled in} to that {@link IntentSender} and sent
3418 * to match and fill in the final Intent or ChooserTarget before starting it.
3419 * The supplied intent must {@link #filterEquals(Intent) match} one of the intents from
3438 * A Parcelable[] of {@link Intent} or
3495 * triggered the creation of the Intent it is in.
3508 * Used as a boolean extra field in {@link android.content.Intent#ACTION_PACKAGE_REMOVED} or
3509 * {@link android.content.Intent#ACTION_PACKAGE_CHANGED} intents to override the default action
3516 * {@link android.content.Intent#ACTION_NEW_OUTGOING_CALL}, or the actual
3517 * number to call in a {@link android.content.Intent#ACTION_CALL}.
3522 * Used as an int extra field in {@link android.content.Intent#ACTION_UID_REMOVED}
3524 * extra in {@link android.content.Intent#ACTION_PACKAGE_REMOVED} or
3525 * {@link android.content.Intent#ACTION_PACKAGE_CHANGED} for the same
3537 * Used as a boolean extra field in {@link android.content.Intent#ACTION_PACKAGE_REMOVED}
3546 * Used as a boolean extra field in {@link android.content.Intent#ACTION_PACKAGE_REMOVED}
3554 * Used as a boolean extra field in {@link android.content.Intent#ACTION_PACKAGE_REMOVED}
3572 * Used as an int extra field in {@link android.content.Intent#ACTION_DOCK_EVENT}
3574 * {@link android.content.Intent#EXTRA_DOCK_STATE_UNDOCKED},
3575 * {@link android.content.Intent#EXTRA_DOCK_STATE_DESK}, or
3576 * {@link android.content.Intent#EXTRA_DOCK_STATE_CAR}, or
3577 * {@link android.content.Intent#EXTRA_DOCK_STATE_LE_DESK}, or
3578 * {@link android.content.Intent#EXTRA_DOCK_STATE_HE_DESK}.
3583 * Used as an int value for {@link android.content.Intent#EXTRA_DOCK_STATE}
3589 * Used as an int value for {@link android.content.Intent#EXTRA_DOCK_STATE}
3595 * Used as an int value for {@link android.content.Intent#EXTRA_DOCK_STATE}
3601 * Used as an int value for {@link android.content.Intent#EXTRA_DOCK_STATE}
3607 * Used as an int value for {@link android.content.Intent#EXTRA_DOCK_STATE}
3639 * This field is part of {@link android.content.Intent#ACTION_PACKAGE_CHANGED},
3649 * {@link android.content.Intent#ACTION_EXTERNAL_APPLICATIONS_AVAILABLE},
3650 * {@link android.content.Intent#ACTION_EXTERNAL_APPLICATIONS_UNAVAILABLE}
3658 * {@link android.content.Intent#ACTION_EXTERNAL_APPLICATIONS_AVAILABLE},
3659 * {@link android.content.Intent#ACTION_EXTERNAL_APPLICATIONS_UNAVAILABLE}
3705 * of the result Intent.
3800 // Intent flags (see mFlags variable).
3822 return (modeFlags & (Intent.FLAG_GRANT_READ_URI_PERMISSION
3823 | Intent.FLAG_GRANT_WRITE_URI_PERMISSION)) != 0;
3827 * If set, the recipient of this Intent will be granted permission to
3828 * perform read operations on the URI in the Intent's data and any URIs
3829 * specified in its ClipData. When applying to an Intent's ClipData,
3831 * in Intent items will be granted; only the grant flags of the top-level
3832 * Intent are used.
3836 * If set, the recipient of this Intent will be granted permission to
3837 * perform write operations on the URI in the Intent's data and any URIs
3838 * specified in its ClipData. When applying to an Intent's ClipData,
3840 * in Intent items will be granted; only the grant flags of the top-level
3841 * Intent are used.
3845 * Can be set by the caller to indicate that this Intent is coming from
3942 * search through existing tasks for ones matching this Intent. Only if no such
3953 * Intent, regardless of whether there is already an existing task running
3977 * all of the other activities on top of it will be closed and this Intent
3978 * will be delivered to the (now on top) old activity as a new Intent.
3981 * If D calls startActivity() with an Intent that resolves to the component
3983 * Intent, resulting in the stack now being: A, B.
3992 * Intent will be delivered to the current instance's onNewIntent().
4057 * by this Intent. Through the use of this flag, or its equivalent attribute,
4063 * preferred over the Intent flag described here. The attribute form allows the
4065 * whereas using this flag requires each Intent that launches the Activity to specify it.
4105 * If set in an Intent passed to {@link Context#startActivity Context.startActivity()},
4110 * If D calls startActivity() with an Intent that resolves to the component
4119 * If set in an Intent passed to {@link Context#startActivity Context.startActivity()},
4131 * If set in an Intent passed to {@link Context#startActivity Context.startActivity()},
4139 * If set in an Intent passed to {@link Context#startActivity Context.startActivity()},
4170 * by {@link Intent#filterEquals(Intent) Intent.filterEquals} returning
4231 * Intent vs. all others that should be treated as raw URIs. When used
4245 * android-app://{package_id}[/{scheme}[/{host}[/{path}]]][#Intent;{...}]</pre>
4249 * The final #Intent; fragment can be used without a scheme, host, or path.
4254 * <p>Some examples of how this scheme maps to Intent objects:</p>
4259 * <tr><th>URI</th> <th>Intent</th></tr>
4283 * <tr><td><code>android-app://com.example.app/<br />#Intent;action=com.example.MY_ACTION;end</code></td>
4289 * <tr><td><code>android-app://com.example.app/http/example.com/foo?1234<br />#Intent;action=com.example.MY_ACTION;end</code></td>
4296 * <tr><td><code>android-app://com.example.app/<br />#Intent;action=com.example.MY_ACTION;<br />i.some_int=100;S.some_str=hello;end</code></td>
4313 * generated Intent can not cause unexpected data access to happen.
4333 private Intent mSelector;
4342 public Intent() {
4348 public Intent(Intent o) {
4366 this.mSelector = new Intent(o.mSelector);
4375 return new Intent(this);
4378 private Intent(Intent o, boolean all) {
4390 * Make a clone of only the parts of the Intent that are relevant for
4393 public Intent cloneFilter() {
4394 return new Intent(this, false);
4405 * @param action The Intent action, such as ACTION_VIEW.
4407 public Intent(String action) {
4424 * @param action The Intent action, such as ACTION_VIEW.
4425 * @param uri The Intent data URI.
4427 public Intent(String action, Uri uri) {
4446 * @see #Intent(String, android.net.Uri , Context, Class)
4448 public Intent(Context packageContext, Class<?> cls) {
4454 * This is equivalent to using {@link #Intent(String, android.net.Uri)} to
4455 * construct the Intent and then calling {@link #setClass} to set its
4464 * @param action The Intent action, such as ACTION_VIEW.
4465 * @param uri The Intent data URI.
4470 * @see #Intent(String, android.net.Uri)
4471 * @see #Intent(Context, Class)
4475 public Intent(String action, Uri uri,
4484 * is the Intent that is started when the application's is launched from
4486 * same way, it is important that they use an Intent structured the same
4489 * <p>The returned Intent has the given Activity component as its explicit
4493 * to do that through {@link #addFlags(int)} on the returned Intent.
4495 * @param mainActivity The main activity component that this Intent will
4497 * @return Returns a newly created Intent that can be used to launch the
4503 public static Intent makeMainActivity(ComponentName mainActivity) {
4504 Intent intent = new Intent(ACTION_MAIN);
4511 * Make an Intent for the main activity of an application, without
4513 * the activity. This results in a final Intent that is structured
4516 * same way, it is important that they use an Intent structured the same
4519 * <p>The returned Intent has {@link #ACTION_MAIN} as its action, and includes the
4522 * to do that through {@link #addFlags(int)} on the returned Intent.
4524 * @param selectorAction The action name of the Intent's selector.
4525 * @param selectorCategory The name of a category to add to the Intent's
4527 * @return Returns a newly created Intent that can be used to launch the
4530 * @see #setSelector(Intent)
4532 public static Intent makeMainSelectorActivity(String selectorAction,
4534 Intent intent = new Intent(ACTION_MAIN);
4536 Intent selector = new Intent();
4544 * Make an Intent that can be used to re-launch an application's task
4553 * @return Returns a newly created Intent that can be used to relaunch the
4556 public static Intent makeRestartActivityTask(ComponentName mainActivity) {
4557 Intent intent = makeMainActivity(mainActivity);
4558 intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK
4559 | Intent.FLAG_ACTIVITY_CLEAR_TASK);
4568 public static Intent getIntent(String uri) throws URISyntaxException {
4575 * {@link #toUri}. If the Intent was not generate by toUri(), its data
4581 * @param uri The URI to turn into an Intent.
4585 * @return Intent The newly created Intent object.
4588 * it bad (as parsed by the Uri class) or the Intent data within the
4593 public static Intent parseUri(String uri, int flags) throws URISyntaxException {
4601 Intent intent = new Intent(ACTION_VIEW);
4615 return new Intent(ACTION_VIEW, Uri.parse(uri));
4618 // old format Intent URI
4619 } else if (!uri.startsWith("#Intent;", i)) {
4628 Intent intent = new Intent(ACTION_VIEW);
4629 Intent baseIntent = intent;
4638 i += 8; // length of "#Intent;"
4643 // loop over contents of Intent, all name=value;
4702 intent = new Intent();
4730 // The Intent had a selector; fix it up.
4755 // Target the Intent at the given package name always.
4803 throw new URISyntaxException(uri, "illegal Intent URI format", i);
4807 public static Intent getIntentOld(String uri) throws URISyntaxException {
4811 private static Intent getIntentOld(String uri, int flags) throws URISyntaxException {
4812 Intent intent;
4830 intent = new Intent(action);
4964 intent = new Intent(ACTION_VIEW, Uri.parse(uri));
5125 * Return the specific selector associated with this Intent. If there is
5130 public Intent getSelector() {
5135 * Return the {@link ClipData} associated with this Intent. If there is
5151 * any Parcelable values from the extras of this Intent.
5172 * Returns true if the Intent's extras contain a parcelled file descriptor.
5173 * @return true if the Intent contains a parcelled file descriptor.
5706 * Retrieve the application package name this Intent is limited to. When
5707 * resolving an Intent, if non-null this limits the resolution to only
5710 * @return The name of the application package for the Intent.
5751 * <p>The activity must handle the {@link Intent#CATEGORY_DEFAULT} Intent
5781 * @param pm The package manager with which to resolve the Intent.
5807 * Resolve the Intent into an {@link ActivityInfo}
5813 * @param pm The package manager with which to resolve the Intent.
5844 * multiple potential matches to the Intent. Returns null if
5880 * @return Returns the same Intent object, for chaining multiple calls
5885 public Intent setAction(String action) {
5904 * @return Returns the same Intent object, for chaining multiple calls
5911 public Intent setData(Uri data) {
5932 * @return Returns the same Intent object, for chaining multiple calls
5939 public Intent setDataAndNormalize(Uri data) {
5960 * @return Returns the same Intent object, for chaining multiple calls
5968 public Intent setType(String type) {
5987 * setType(Intent.normalizeMimeType(type))
5992 * @return Returns the same Intent object, for chaining multiple calls
5999 public Intent setTypeAndNormalize(String type) {
6019 * @return Returns the same Intent object, for chaining multiple calls
6028 public Intent setDataAndType(Uri data, String type) {
6044 * setDataAndType(data.normalize(), Intent.normalizeMimeType(type))
6050 * @return Returns the same Intent object, for chaining multiple calls
6059 public Intent setDataAndTypeAndNormalize(Uri data, String type) {
6070 * predefined Intent categories, or a custom category in your own
6073 * @return Returns the same Intent object, for chaining multiple calls
6079 public Intent addCategory(String category) {
6104 * Set a selector for this Intent. This is a modification to the kinds of
6105 * things the Intent will match. If the selector is set, it will be used
6106 * when trying to find entities that can handle the Intent, instead of the
6107 * main contents of the Intent. This allows you build an Intent containing
6112 * Intent that will launch the Browser application. However, the correct
6118 * Instead, you can build an Intent with the MAIN action (but no ComponentName
6123 * {@link #filterEquals(Intent)} and {@link #filterHashCode()}. This is part of the
6125 * of the Intent, just what kinds of things will be matched against it
6129 * the same base Intent.</p>
6131 * @param selector The desired selector Intent; set to null to not use
6134 public void setSelector(Intent selector) {
6137 "Intent being set as a selector of itself");
6147 * Set a {@link ClipData} associated with this Intent. This replaces any
6150 * <p>The ClipData in an intent is not used for Intent matching or other
6152 * additional data with the Intent. The main feature of using this over
6156 * you want to transmit an Intent containing multiple <code>content:</code>
6162 * of the main Intent are respected, and will be applied to all Uri or
6163 * Intent items in the clip (or sub-items of the clip).
6166 * directly used by Intent. Applications should generally rely on the
6167 * MIME type of the Intent itself, not what it may find in the ClipData.
6168 * A common practice is to construct a ClipData for use with an Intent
6199 * @return Returns the same Intent object, for chaining multiple calls
6206 public Intent putExtra(String name, boolean value) {
6222 * @return Returns the same Intent object, for chaining multiple calls
6229 public Intent putExtra(String name, byte value) {
6245 * @return Returns the same Intent object, for chaining multiple calls
6252 public Intent putExtra(String name, char value) {
6268 * @return Returns the same Intent object, for chaining multiple calls
6275 public Intent putExtra(String name, short value) {
6291 * @return Returns the same Intent object, for chaining multiple calls
6298 public Intent putExtra(String name, int value) {
6314 * @return Returns the same Intent object, for chaining multiple calls
6321 public Intent putExtra(String name, long value) {
6337 * @return Returns the same Intent object, for chaining multiple calls
6344 public Intent putExtra(String name, float value) {
6360 * @return Returns the same Intent object, for chaining multiple calls
6367 public Intent putExtra(String name, double value) {
6383 * @return Returns the same Intent object, for chaining multiple calls
6390 public Intent putExtra(String name, String value) {
6406 * @return Returns the same Intent object, for chaining multiple calls
6413 public Intent putExtra(String name, CharSequence value) {
6429 * @return Returns the same Intent object, for chaining multiple calls
6436 public Intent putExtra(String name, Parcelable value) {
6452 * @return Returns the same Intent object, for chaining multiple calls
6459 public Intent putExtra(String name, Parcelable[] value) {
6475 * @return Returns the same Intent object, for chaining multiple calls
6482 public Intent putParcelableArrayListExtra(String name, ArrayList<? extends Parcelable> value) {
6498 * @return Returns the same Intent object, for chaining multiple calls
6505 public Intent putIntegerArrayListExtra(String name, ArrayList<Integer> value) {
6521 * @return Returns the same Intent object, for chaining multiple calls
6528 public Intent putStringArrayListExtra(String name, ArrayList<String> value) {
6544 * @return Returns the same Intent object, for chaining multiple calls
6551 public Intent putCharSequenceArrayListExtra(String name, ArrayList<CharSequence> value) {
6567 * @return Returns the same Intent object, for chaining multiple calls
6574 public Intent putExtra(String name, Serializable value) {
6590 * @return Returns the same Intent object, for chaining multiple calls
6597 public Intent putExtra(String name, boolean[] value) {
6613 * @return Returns the same Intent object, for chaining multiple calls
6620 public Intent putExtra(String name, byte[] value) {
6636 * @return Returns the same Intent object, for chaining multiple calls
6643 public Intent putExtra(String name, short[] value) {
6659 * @return Returns the same Intent object, for chaining multiple calls
6666 public Intent putExtra(String name, char[] value) {
6682 * @return Returns the same Intent object, for chaining multiple calls
6689 public Intent putExtra(String name, int[] value) {
6705 * @return Returns the same Intent object, for chaining multiple calls
6712 public Intent putExtra(String name, long[] value) {
6728 * @return Returns the same Intent object, for chaining multiple calls
6735 public Intent putExtra(String name, float[] value) {
6751 * @return Returns the same Intent object, for chaining multiple calls
6758 public Intent putExtra(String name, double[] value) {
6774 * @return Returns the same Intent object, for chaining multiple calls
6781 public Intent putExtra(String name, String[] value) {
6797 * @return Returns the same Intent object, for chaining multiple calls
6804 public Intent putExtra(String name, CharSequence[] value) {
6820 * @return Returns the same Intent object, for chaining multiple calls
6827 public Intent putExtra(String name, Bundle value) {
6843 * @return Returns the same Intent object, for chaining multiple calls
6854 public Intent putExtra(String name, IBinder value) {
6869 public Intent putExtras(Intent src) {
6890 public Intent putExtras(Bundle extras) {
6899 * Completely replace the extras in the Intent with the extras in the
6900 * given Intent.
6902 * @param src The exact extras contained in this Intent are copied
6905 public Intent replaceExtras(Intent src) {
6911 * Completely replace the extras in the Intent with the given Bundle of
6914 * @param extras The new set of extras in the Intent, or null to erase
6917 public Intent replaceExtras(Bundle extras) {
6938 * here depend on the type of component being executed by the Intent,
6942 * {@link Context#sendBroadcast(Intent) Context.sendBroadcast()}.
6951 * @return Returns the same Intent object, for chaining multiple calls
6983 public Intent setFlags(int flags) {
6994 * @return Returns the same Intent object, for chaining multiple calls
6999 public Intent addFlags(int flags) {
7006 * the components this Intent will resolve to. If left to the default
7008 * If non-null, the Intent can only match the components in the given
7014 * @return Returns the same Intent object, for chaining multiple calls
7020 public Intent setPackage(String packageName) {
7033 * type, categories) in the Intent. If this class is defined, the
7043 * @return Returns the same Intent object, for chaining multiple calls
7052 public Intent setComponent(ComponentName component) {
7064 * that will be used as the component for this Intent.
7066 * @return Returns the same Intent object, for chaining multiple calls
7072 public Intent setClassName(Context packageContext, String className) {
7084 * that will be used as the component for this Intent.
7086 * @return Returns the same Intent object, for chaining multiple calls
7092 public Intent setClassName(String packageName, String className) {
7106 * @return Returns the same Intent object, for chaining multiple calls
7111 public Intent setClass(Context packageContext, Class<?> cls) {
7195 * being defined, the following pieces of data in the Intent are
7207 * <li> selector, as set by {@link #setSelector(Intent)}.
7223 * <p>For example, consider Intent A with {data="foo", categories="bar"}
7224 * and Intent B with {action="gotit", data-type="some/thing",
7227 * <p>Calling A.fillIn(B, Intent.FILL_IN_DATA) will result in A now
7231 * @param other Another Intent whose values are to be used to fill in
7242 public int fillIn(Intent other, @FillInFlags int flags) {
7277 mSelector = new Intent(other.mSelector);
7318 Log.w("Intent", "Failure filling in extras", e);
7329 * Wrapper class holding an Intent and implementing comparisons on it for
7332 * simple calls to {@link Intent#filterEquals(Intent)} filterEquals()} and
7333 * {@link android.content.Intent#filterHashCode()} filterHashCode()}
7334 * on the wrapped Intent.
7337 private final Intent mIntent;
7340 public FilterComparison(Intent intent) {
7346 * Return the Intent that this FilterComparison represents.
7347 * @return Returns the Intent held by the FilterComparison. Do
7350 public Intent getIntent() {
7357 Intent other = ((FilterComparison)obj).mIntent;
7375 * @param other The other Intent to compare against.
7380 public boolean filterEquals(Intent other) {
7429 b.append("Intent { ");
7440 b.append("Intent { ");
7451 b.append("Intent { ");
7581 * Convert this Intent into a String holding a URI representation of it.
7584 * Intent's data as the base URI, with an additional fragment describing
7587 * <p>You can convert the returned string back to an Intent with
7594 * of the Intent.
7601 "Intent must include an explicit package name to build an android-app: "
7633 toUriFragment(uri, null, scheme == null ? Intent.ACTION_MAIN : Intent.ACTION_VIEW,
7666 toUriFragment(uri, scheme, Intent.ACTION_VIEW, null, flags);
7686 uri.append("#Intent;");
7796 public static final Parcelable.Creator<Intent> CREATOR
7797 = new Parcelable.Creator<Intent>() {
7798 public Intent createFromParcel(Parcel in) {
7799 return new Intent(in);
7801 public Intent[] newArray(int size) {
7802 return new Intent[size];
7807 protected Intent(Parcel in) {
7835 mSelector = new Intent(in);
7847 * an Intent object. The given XML parser should be located at the tag
7859 * @return An Intent object matching the XML data.
7863 public static Intent parseIntent(Resources resources, XmlPullParser parser, AttributeSet attrs)
7865 Intent intent = new Intent();
7868 com.android.internal.R.styleable.Intent);
7945 public static Intent restoreFromXml(XmlPullParser in) throws IOException,
7947 Intent intent = new Intent();
7965 Log.e("Intent", "restoreFromXml: unknown attribute=" + attrName);
7981 Log.w("Intent", "restoreFromXml: unknown name=" + name);
8003 * be normalized before they are used to create an Intent.
8025 * Prepare this {@link Intent} to leave an app process.
8045 mData.checkFileUriExposed("Intent.getData()");
8122 final Intent intent = getParcelableExtra(EXTRA_INTENT);
8132 final Intent intent = (Intent) intents[i];