Lines Matching refs:PendingIntent
39 * <p>By giving a PendingIntent to another application,
42 * identity). As such, you should be careful about how you build the PendingIntent:
47 * <p>A PendingIntent itself is simply a reference to a token maintained by
50 * PendingIntent itself will remain usable from other processes that
52 * same kind of PendingIntent (same operation, same Intent action, data,
53 * categories, and components, and same flags), it will receive a PendingIntent
57 public final class PendingIntent implements Parcelable {
63 * PendingIntent can only be used once. If set, after
70 * {@link #getService}: if the described PendingIntent does not already
76 * {@link #getService}: if the described PendingIntent already exists,
78 * this to retrieve a new PendingIntent when you are only changing the
87 * {@link #getService}: if the described PendingIntent already exists,
91 * previous PendingIntent will be able to launch it with your new
97 * Exception thrown when trying to send through a PendingIntent that
115 * completed. Primarily for use with a PendingIntent that is
125 * @param pendingIntent The PendingIntent this operation was sent through.
131 void onSendFinished(PendingIntent pendingIntent, Intent intent,
137 private final PendingIntent mPendingIntent;
144 FinishedDispatcher(PendingIntent pi, OnFinished who, Handler handler) {
168 * Retrieve a PendingIntent that will start a new activity, like calling
174 * @param context The Context in which this PendingIntent should start
185 * @return Returns an existing or new PendingIntent matching the given
189 public static PendingIntent getActivity(Context context, int requestCode,
201 return target != null ? new PendingIntent(target) : null;
210 * taken as the primary key for the PendingIntent, like the single Intent
212 * the resulting PendingIntent, all of the Intents are started in the same
225 * PendingIntent. In other words, it is the significant element for matching
233 * @param context The Context in which this PendingIntent should start
244 * @return Returns an existing or new PendingIntent matching the given
248 public static PendingIntent getActivities(Context context, int requestCode,
261 return target != null ? new PendingIntent(target) : null;
268 * Retrieve a PendingIntent that will perform a broadcast, like calling
271 * @param context The Context in which this PendingIntent should perform
282 * @return Returns an existing or new PendingIntent matching the given
286 public static PendingIntent getBroadcast(Context context, int requestCode,
298 return target != null ? new PendingIntent(target) : null;
305 * Retrieve a PendingIntent that will start a service, like calling
309 * @param context The Context in which this PendingIntent should start
320 * @return Returns an existing or new PendingIntent matching the given
324 public static PendingIntent getService(Context context, int requestCode,
336 return target != null ? new PendingIntent(target) : null;
343 * Retrieve a IntentSender object that wraps the existing sender of the PendingIntent
345 * @return Returns a IntentSender object that wraps the sender of PendingIntent
353 * Cancel a currently active PendingIntent. Only the original application
354 * owning an PendingIntent can cancel it.
364 * Perform the operation associated with this PendingIntent.
366 * @see #send(Context, int, Intent, android.app.PendingIntent.OnFinished, Handler)
368 * @throws CanceledException Throws CanceledException if the PendingIntent
376 * Perform the operation associated with this PendingIntent.
378 * @param code Result code to supply back to the PendingIntent's target.
380 * @see #send(Context, int, Intent, android.app.PendingIntent.OnFinished, Handler)
382 * @throws CanceledException Throws CanceledException if the PendingIntent
390 * Perform the operation associated with this PendingIntent, allowing the
394 * @param code Result code to supply back to the PendingIntent's target.
399 * @see #send(Context, int, Intent, android.app.PendingIntent.OnFinished, Handler)
401 * @throws CanceledException Throws CanceledException if the PendingIntent
410 * Perform the operation associated with this PendingIntent, allowing the
413 * @param code Result code to supply back to the PendingIntent's target.
420 * @see #send(Context, int, Intent, android.app.PendingIntent.OnFinished, Handler)
422 * @throws CanceledException Throws CanceledException if the PendingIntent
431 * Perform the operation associated with this PendingIntent, allowing the
435 * <p>For the intent parameter, a PendingIntent
437 * how the PendingIntent was retrieved in {@link #getActivity},
442 * @param code Result code to supply back to the PendingIntent's target.
455 * @see #send(int, android.app.PendingIntent.OnFinished, Handler)
458 * @throws CanceledException Throws CanceledException if the PendingIntent
467 * Perform the operation associated with this PendingIntent, allowing the
471 * <p>For the intent parameter, a PendingIntent
473 * how the PendingIntent was retrieved in {@link #getActivity},
478 * @param code Result code to supply back to the PendingIntent's target.
487 * @param requiredPermission Name of permission that a recipient of the PendingIntent
496 * @see #send(int, android.app.PendingIntent.OnFinished, Handler)
499 * @throws CanceledException Throws CanceledException if the PendingIntent
524 * PendingIntent, that is the identity under which you will actually be
528 * @return The package name of the PendingIntent, or null if there is
543 * Check to verify that this PendingIntent targets a specific package.
556 * Comparison operator on two PendingIntent objects, such that true
560 * across a process being killed), resulting in different PendingIntent
566 if (otherObj instanceof PendingIntent) {
567 return mTarget.asBinder().equals(((PendingIntent)otherObj)
581 sb.append("PendingIntent{");
597 public static final Parcelable.Creator<PendingIntent> CREATOR
598 = new Parcelable.Creator<PendingIntent>() {
599 public PendingIntent createFromParcel(Parcel in) {
601 return target != null ? new PendingIntent(target) : null;
604 public PendingIntent[] newArray(int size) {
605 return new PendingIntent[size];
610 * Convenience function for writing either a PendingIntent or null pointer to
614 * @param sender The PendingIntent to write, or null.
615 * @param out Where to write the PendingIntent.
617 public static void writePendingIntentOrNullToParcel(PendingIntent sender,
633 public static PendingIntent readPendingIntentOrNullFromParcel(Parcel in) {
635 return b != null ? new PendingIntent(b) : null;
638 /*package*/ PendingIntent(IIntentSender target) {
642 /*package*/ PendingIntent(IBinder target) {