Lines Matching defs:PendingIntent

48  * <p>By giving a PendingIntent to another application,
51 * identity). As such, you should be careful about how you build the PendingIntent:
56 * <p>A PendingIntent itself is simply a reference to a token maintained by
59 * PendingIntent itself will remain usable from other processes that
61 * same kind of PendingIntent (same operation, same Intent action, data,
62 * categories, and components, and same flags), it will receive a PendingIntent
67 * are considered to be the same for purposes of retrieving a PendingIntent.
68 * A common mistake people make is to create multiple PendingIntent objects
70 * a different PendingIntent each time. This does <em>not</em> happen. The
75 * the same PendingIntent for both of them.
79 * <p>If you truly need multiple distinct PendingIntent objects active at
88 * <p>If you only need one PendingIntent active at a time for any of the
91 * cancel or modify whatever current PendingIntent is associated with the
94 public final class PendingIntent implements Parcelable {
118 * Flag indicating that this PendingIntent can be used only once.
126 * Flag indicating that if the described PendingIntent does not
133 * Flag indicating that if the described PendingIntent already exists,
137 * this to retrieve a new PendingIntent when you are only changing the
145 * Flag indicating that if the described PendingIntent already exists,
150 * previous PendingIntent will be able to launch it with your new
156 * Flag indicating that the created PendingIntent should be immutable.
164 * Exception thrown when trying to send through a PendingIntent that
182 * completed. Primarily for use with a PendingIntent that is
192 * @param pendingIntent The PendingIntent this operation was sent through.
198 void onSendFinished(PendingIntent pendingIntent, Intent intent,
204 private final PendingIntent mPendingIntent;
212 FinishedDispatcher(PendingIntent pi, OnFinished who, Handler handler) {
257 void onMarshaled(PendingIntent intent, Parcel parcel, int flags);
275 * Retrieve a PendingIntent that will start a new activity, like calling
286 * @param context The Context in which this PendingIntent should start
296 * @return Returns an existing or new PendingIntent matching the given
300 public static PendingIntent getActivity(Context context, int requestCode,
306 * Retrieve a PendingIntent that will start a new activity, like calling
317 * @param context The Context in which this PendingIntent should start
329 * @return Returns an existing or new PendingIntent matching the given
333 public static PendingIntent getActivity(Context context, int requestCode,
347 return target != null ? new PendingIntent(target) : null;
358 public static PendingIntent getActivityAsUser(Context context, int requestCode,
372 return target != null ? new PendingIntent(target) : null;
381 * taken as the primary key for the PendingIntent, like the single Intent
383 * the resulting PendingIntent, all of the Intents are started in the same
396 * PendingIntent. In other words, it is the significant element for matching
409 * @param context The Context in which this PendingIntent should start
419 * @return Returns an existing or new PendingIntent matching the given
423 public static PendingIntent getActivities(Context context, int requestCode,
431 * taken as the primary key for the PendingIntent, like the single Intent
433 * the resulting PendingIntent, all of the Intents are started in the same
446 * PendingIntent. In other words, it is the significant element for matching
459 * @param context The Context in which this PendingIntent should start
469 * @return Returns an existing or new PendingIntent matching the given
473 public static PendingIntent getActivities(Context context, int requestCode,
488 return target != null ? new PendingIntent(target) : null;
499 public static PendingIntent getActivitiesAsUser(Context context, int requestCode,
514 return target != null ? new PendingIntent(target) : null;
521 * Retrieve a PendingIntent that will perform a broadcast, like calling
529 * @param context The Context in which this PendingIntent should perform
539 * @return Returns an existing or new PendingIntent matching the given
543 public static PendingIntent getBroadcast(Context context, int requestCode,
554 public static PendingIntent getBroadcastAsUser(Context context, int requestCode,
567 return target != null ? new PendingIntent(target) : null;
574 * Retrieve a PendingIntent that will start a service, like calling
583 * @param context The Context in which this PendingIntent should start
593 * @return Returns an existing or new PendingIntent matching the given
597 public static PendingIntent getService(Context context, int requestCode,
610 return target != null ? new PendingIntent(target) : null;
617 * Retrieve a IntentSender object that wraps the existing sender of the PendingIntent
619 * @return Returns a IntentSender object that wraps the sender of PendingIntent
627 * Cancel a currently active PendingIntent. Only the original application
628 * owning a PendingIntent can cancel it.
638 * Perform the operation associated with this PendingIntent.
640 * @see #send(Context, int, Intent, android.app.PendingIntent.OnFinished, Handler)
642 * @throws CanceledException Throws CanceledException if the PendingIntent
650 * Perform the operation associated with this PendingIntent.
652 * @param code Result code to supply back to the PendingIntent's target.
654 * @see #send(Context, int, Intent, android.app.PendingIntent.OnFinished, Handler)
656 * @throws CanceledException Throws CanceledException if the PendingIntent
664 * Perform the operation associated with this PendingIntent, allowing the
668 * @param code Result code to supply back to the PendingIntent's target.
674 * @see #send(Context, int, Intent, android.app.PendingIntent.OnFinished, Handler)
676 * @throws CanceledException Throws CanceledException if the PendingIntent
685 * Perform the operation associated with this PendingIntent, allowing the
688 * @param code Result code to supply back to the PendingIntent's target.
695 * @see #send(Context, int, Intent, android.app.PendingIntent.OnFinished, Handler)
697 * @throws CanceledException Throws CanceledException if the PendingIntent
706 * Perform the operation associated with this PendingIntent, allowing the
710 * <p>For the intent parameter, a PendingIntent
712 * how the PendingIntent was retrieved in {@link #getActivity},
717 * @param code Result code to supply back to the PendingIntent's target.
732 * @see #send(int, android.app.PendingIntent.OnFinished, Handler)
735 * @throws CanceledException Throws CanceledException if the PendingIntent
744 * Perform the operation associated with this PendingIntent, allowing the
748 * <p>For the intent parameter, a PendingIntent
750 * how the PendingIntent was retrieved in {@link #getActivity},
755 * @param code Result code to supply back to the PendingIntent's target.
766 * @param requiredPermission Name of permission that a recipient of the PendingIntent
775 * @see #send(int, android.app.PendingIntent.OnFinished, Handler)
778 * @throws CanceledException Throws CanceledException if the PendingIntent
789 * Perform the operation associated with this PendingIntent, allowing the
793 * <p>For the intent parameter, a PendingIntent
795 * how the PendingIntent was retrieved in {@link #getActivity},
800 * @param code Result code to supply back to the PendingIntent's target.
811 * @param requiredPermission Name of permission that a recipient of the PendingIntent
822 * @see #send(int, android.app.PendingIntent.OnFinished, Handler)
825 * @throws CanceledException Throws CanceledException if the PendingIntent
866 * PendingIntent, that is the identity under which you will actually be
871 * who created the PendingIntent. It does <strong>not</strong> tell you who
872 * handed the PendingIntent to you: that is, PendingIntent objects are intended to be
873 * passed between applications, so the PendingIntent you receive from an application
877 * through a {@link #send} call, not who gave you the PendingIntent.</p>
879 * @return The package name of the PendingIntent, or null if there is
895 * PendingIntent, that is the identity under which you will actually be
900 * who created the PendingIntent. It does <strong>not</strong> tell you who
901 * handed the PendingIntent to you: that is, PendingIntent objects are intended to be
902 * passed between applications, so the PendingIntent you receive from an application
906 * through a {@link #send} call, not who gave you the PendingIntent.</p>
908 * @return The uid of the PendingIntent, or -1 if there is
923 * PendingIntent, that is the user under which you will actually be
930 * who created the PendingIntent. It does <strong>not</strong> tell you who
931 * handed the PendingIntent to you: that is, PendingIntent objects are intended to be
932 * passed between applications, so the PendingIntent you receive from an application
936 * through a {@link #send} call, not who gave you the PendingIntent.</p>
938 * @return The user handle of the PendingIntent, or null if there is
955 * Check to verify that this PendingIntent targets a specific package.
969 * Check whether this PendingIntent will launch an Activity.
983 * Return the Intent of this PendingIntent.
997 * Return descriptive tag for this PendingIntent.
1010 * Comparison operator on two PendingIntent objects, such that true
1014 * across a process being killed), resulting in different PendingIntent
1020 if (otherObj instanceof PendingIntent) {
1021 return mTarget.asBinder().equals(((PendingIntent)otherObj)
1035 sb.append("PendingIntent{");
1056 public static final Parcelable.Creator<PendingIntent> CREATOR
1057 = new Parcelable.Creator<PendingIntent>() {
1058 public PendingIntent createFromParcel(Parcel in) {
1060 return target != null ? new PendingIntent(target) : null;
1063 public PendingIntent[] newArray(int size) {
1064 return new PendingIntent[size];
1069 * Convenience function for writing either a PendingIntent or null pointer to
1073 * @param sender The PendingIntent to write, or null.
1074 * @param out Where to write the PendingIntent.
1076 public static void writePendingIntentOrNullToParcel(@Nullable PendingIntent sender,
1093 public static PendingIntent readPendingIntentOrNullFromParcel(@NonNull Parcel in) {
1095 return b != null ? new PendingIntent(b) : null;
1098 /*package*/ PendingIntent(IIntentSender target) {
1102 /*package*/ PendingIntent(IBinder target) {