Lines Matching defs:PendingIntent

40  * <p>By giving a PendingIntent to another application,
43 * identity). As such, you should be careful about how you build the PendingIntent:
48 * <p>A PendingIntent itself is simply a reference to a token maintained by
51 * PendingIntent itself will remain usable from other processes that
53 * same kind of PendingIntent (same operation, same Intent action, data,
54 * categories, and components, and same flags), it will receive a PendingIntent
59 * are considered to be the same for purposes of retrieving a PendingIntent.
60 * A common mistake people make is to create multiple PendingIntent objects
62 * a different PendingIntent each time. This does <em>not</em> happen. The
67 * the same PendingIntent for both of them.
71 * <p>If you truly need multiple distinct PendingIntent objects active at
80 * <p>If you only need one PendingIntent active at a time for any of the
83 * cancel or modify whatever current PendingIntent is associated with the
86 public final class PendingIntent implements Parcelable {
92 * PendingIntent can only be used once. If set, after
99 * {@link #getService}: if the described PendingIntent does not already
105 * {@link #getService}: if the described PendingIntent already exists,
107 * this to retrieve a new PendingIntent when you are only changing the
116 * {@link #getService}: if the described PendingIntent already exists,
120 * previous PendingIntent will be able to launch it with your new
126 * Exception thrown when trying to send through a PendingIntent that
144 * completed. Primarily for use with a PendingIntent that is
154 * @param pendingIntent The PendingIntent this operation was sent through.
160 void onSendFinished(PendingIntent pendingIntent, Intent intent,
166 private final PendingIntent mPendingIntent;
173 FinishedDispatcher(PendingIntent pi, OnFinished who, Handler handler) {
197 * Retrieve a PendingIntent that will start a new activity, like calling
203 * @param context The Context in which this PendingIntent should start
214 * @return Returns an existing or new PendingIntent matching the given
218 public static PendingIntent getActivity(Context context, int requestCode,
224 * Retrieve a PendingIntent that will start a new activity, like calling
230 * @param context The Context in which this PendingIntent should start
243 * @return Returns an existing or new PendingIntent matching the given
247 public static PendingIntent getActivity(Context context, int requestCode,
260 return target != null ? new PendingIntent(target) : null;
271 public static PendingIntent getActivityAsUser(Context context, int requestCode,
284 return target != null ? new PendingIntent(target) : null;
293 * taken as the primary key for the PendingIntent, like the single Intent
295 * the resulting PendingIntent, all of the Intents are started in the same
308 * PendingIntent. In other words, it is the significant element for matching
316 * @param context The Context in which this PendingIntent should start
327 * @return Returns an existing or new PendingIntent matching the given
331 public static PendingIntent getActivities(Context context, int requestCode,
339 * taken as the primary key for the PendingIntent, like the single Intent
341 * the resulting PendingIntent, all of the Intents are started in the same
354 * PendingIntent. In other words, it is the significant element for matching
362 * @param context The Context in which this PendingIntent should start
373 * @return Returns an existing or new PendingIntent matching the given
377 public static PendingIntent getActivities(Context context, int requestCode,
391 return target != null ? new PendingIntent(target) : null;
402 public static PendingIntent getActivitiesAsUser(Context context, int requestCode,
416 return target != null ? new PendingIntent(target) : null;
423 * Retrieve a PendingIntent that will perform a broadcast, like calling
426 * @param context The Context in which this PendingIntent should perform
437 * @return Returns an existing or new PendingIntent matching the given
441 public static PendingIntent getBroadcast(Context context, int requestCode,
452 public static PendingIntent getBroadcastAsUser(Context context, int requestCode,
465 return target != null ? new PendingIntent(target) : null;
472 * Retrieve a PendingIntent that will start a service, like calling
476 * @param context The Context in which this PendingIntent should start
487 * @return Returns an existing or new PendingIntent matching the given
491 public static PendingIntent getService(Context context, int requestCode,
504 return target != null ? new PendingIntent(target) : null;
511 * Retrieve a IntentSender object that wraps the existing sender of the PendingIntent
513 * @return Returns a IntentSender object that wraps the sender of PendingIntent
521 * Cancel a currently active PendingIntent. Only the original application
522 * owning a PendingIntent can cancel it.
532 * Perform the operation associated with this PendingIntent.
534 * @see #send(Context, int, Intent, android.app.PendingIntent.OnFinished, Handler)
536 * @throws CanceledException Throws CanceledException if the PendingIntent
544 * Perform the operation associated with this PendingIntent.
546 * @param code Result code to supply back to the PendingIntent's target.
548 * @see #send(Context, int, Intent, android.app.PendingIntent.OnFinished, Handler)
550 * @throws CanceledException Throws CanceledException if the PendingIntent
558 * Perform the operation associated with this PendingIntent, allowing the
562 * @param code Result code to supply back to the PendingIntent's target.
567 * @see #send(Context, int, Intent, android.app.PendingIntent.OnFinished, Handler)
569 * @throws CanceledException Throws CanceledException if the PendingIntent
578 * Perform the operation associated with this PendingIntent, allowing the
581 * @param code Result code to supply back to the PendingIntent's target.
588 * @see #send(Context, int, Intent, android.app.PendingIntent.OnFinished, Handler)
590 * @throws CanceledException Throws CanceledException if the PendingIntent
599 * Perform the operation associated with this PendingIntent, allowing the
603 * <p>For the intent parameter, a PendingIntent
605 * how the PendingIntent was retrieved in {@link #getActivity},
610 * @param code Result code to supply back to the PendingIntent's target.
623 * @see #send(int, android.app.PendingIntent.OnFinished, Handler)
626 * @throws CanceledException Throws CanceledException if the PendingIntent
635 * Perform the operation associated with this PendingIntent, allowing the
639 * <p>For the intent parameter, a PendingIntent
641 * how the PendingIntent was retrieved in {@link #getActivity},
646 * @param code Result code to supply back to the PendingIntent's target.
655 * @param requiredPermission Name of permission that a recipient of the PendingIntent
664 * @see #send(int, android.app.PendingIntent.OnFinished, Handler)
667 * @throws CanceledException Throws CanceledException if the PendingIntent
706 * PendingIntent, that is the identity under which you will actually be
710 * @return The package name of the PendingIntent, or null if there is
725 * PendingIntent, that is the identity under which you will actually be
729 * @return The uid of the PendingIntent, or -1 if there is
744 * PendingIntent, that is the user under which you will actually be
750 * @return The user handle of the PendingIntent, or null if there is
766 * Check to verify that this PendingIntent targets a specific package.
780 * Check whether this PendingIntent will launch an Activity.
793 * Comparison operator on two PendingIntent objects, such that true
797 * across a process being killed), resulting in different PendingIntent
803 if (otherObj instanceof PendingIntent) {
804 return mTarget.asBinder().equals(((PendingIntent)otherObj)
818 sb.append("PendingIntent{");
834 public static final Parcelable.Creator<PendingIntent> CREATOR
835 = new Parcelable.Creator<PendingIntent>() {
836 public PendingIntent createFromParcel(Parcel in) {
838 return target != null ? new PendingIntent(target) : null;
841 public PendingIntent[] newArray(int size) {
842 return new PendingIntent[size];
847 * Convenience function for writing either a PendingIntent or null pointer to
851 * @param sender The PendingIntent to write, or null.
852 * @param out Where to write the PendingIntent.
854 public static void writePendingIntentOrNullToParcel(PendingIntent sender,
870 public static PendingIntent readPendingIntentOrNullFromParcel(Parcel in) {
872 return b != null ? new PendingIntent(b) : null;
875 /*package*/ PendingIntent(IIntentSender target) {
879 /*package*/ PendingIntent(IBinder target) {