@Implements(android.app.PendingIntent.class) public class ShadowPendingIntent extends Object
Constructor | Description |
---|---|
ShadowPendingIntent() |
Modifier and Type | Method | Description |
---|---|---|
protected void |
cancel() |
|
boolean |
equals(Object o) |
|
protected static PendingIntent |
getActivities(Context context,
int requestCode,
Intent[] intents,
int flags) |
|
protected static PendingIntent |
getActivities(Context context,
int requestCode,
Intent[] intents,
int flags,
Bundle options) |
|
protected static PendingIntent |
getActivity(Context context,
int requestCode,
Intent intent,
int flags) |
|
protected static PendingIntent |
getActivity(Context context,
int requestCode,
Intent intent,
int flags,
Bundle options) |
|
protected static PendingIntent |
getBroadcast(Context context,
int requestCode,
Intent intent,
int flags) |
|
protected String |
getCreatorPackage() |
|
int |
getFlags() |
|
protected static PendingIntent |
getForegroundService(Context context,
int requestCode,
Intent intent,
int flags) |
|
protected IntentSender |
getIntentSender() |
|
int |
getRequestCode() |
|
Context |
getSavedContext() |
|
Intent |
getSavedIntent() |
This returns the last Intent in the Intent[] to be delivered when the PendingIntent is sent.
|
Intent[] |
getSavedIntents() |
This method is particularly useful for PendingIntents created with multiple Intents:
getActivities(Context, int, Intent[], int)
getActivities(Context, int, Intent[], int, Bundle)
|
protected static PendingIntent |
getService(Context context,
int requestCode,
Intent intent,
int flags) |
|
protected String |
getTargetPackage() |
|
int |
hashCode() |
|
boolean |
isActivityIntent() |
|
boolean |
isBroadcastIntent() |
|
boolean |
isCanceled() |
|
boolean |
isForegroundServiceIntent() |
|
boolean |
isServiceIntent() |
|
static PendingIntent |
readPendingIntentOrNullFromParcel(Parcel in) |
|
static void |
reset() |
|
protected void |
send() |
|
protected void |
send(int code) |
|
protected void |
send(int code,
PendingIntent.OnFinished onFinished,
Handler handler) |
|
protected void |
send(Context context,
int code,
Intent intent) |
|
protected void |
send(Context context,
int code,
Intent intent,
PendingIntent.OnFinished onFinished,
Handler handler) |
|
protected void |
send(Context context,
int code,
Intent intent,
PendingIntent.OnFinished onFinished,
Handler handler,
String requiredPermission) |
|
protected void |
send(Context context,
int code,
Intent intent,
PendingIntent.OnFinished onFinished,
Handler handler,
String requiredPermission,
Bundle options) |
|
void |
setCreatorPackage(String creatorPackage) |
|
static void |
writePendingIntentOrNullToParcel(PendingIntent sender,
Parcel out) |
@Implementation protected static PendingIntent getActivity(Context context, int requestCode, Intent intent, int flags)
@Implementation protected static PendingIntent getActivity(Context context, int requestCode, Intent intent, int flags, Bundle options)
@Implementation protected static PendingIntent getActivities(Context context, int requestCode, Intent[] intents, int flags)
@Implementation protected static PendingIntent getActivities(Context context, int requestCode, Intent[] intents, int flags, Bundle options)
@Implementation protected static PendingIntent getBroadcast(Context context, int requestCode, Intent intent, int flags)
@Implementation protected static PendingIntent getService(Context context, int requestCode, Intent intent, int flags)
@Implementation(minSdk=26) protected static PendingIntent getForegroundService(Context context, int requestCode, Intent intent, int flags)
@Implementation protected void cancel()
@Implementation protected void send() throws PendingIntent.CanceledException
PendingIntent.CanceledException
@Implementation protected void send(int code) throws PendingIntent.CanceledException
PendingIntent.CanceledException
@Implementation protected void send(int code, PendingIntent.OnFinished onFinished, Handler handler) throws PendingIntent.CanceledException
PendingIntent.CanceledException
@Implementation protected void send(Context context, int code, Intent intent) throws PendingIntent.CanceledException
PendingIntent.CanceledException
@Implementation protected void send(Context context, int code, Intent intent, PendingIntent.OnFinished onFinished, Handler handler) throws PendingIntent.CanceledException
PendingIntent.CanceledException
@Implementation protected void send(Context context, int code, Intent intent, PendingIntent.OnFinished onFinished, Handler handler, String requiredPermission) throws PendingIntent.CanceledException
PendingIntent.CanceledException
@Implementation(minSdk=23) protected void send(Context context, int code, Intent intent, PendingIntent.OnFinished onFinished, Handler handler, String requiredPermission, Bundle options) throws PendingIntent.CanceledException
PendingIntent.CanceledException
@Implementation protected IntentSender getIntentSender()
public boolean isActivityIntent()
true
iff sending this PendingIntent will start an activitypublic boolean isBroadcastIntent()
true
iff sending this PendingIntent will broadcast an Intentpublic boolean isServiceIntent()
true
iff sending this PendingIntent will start a servicepublic boolean isForegroundServiceIntent()
true
iff sending this PendingIntent will start a foreground servicepublic Context getSavedContext()
public Intent getSavedIntent()
public Intent[] getSavedIntents()
public boolean isCanceled()
public int getRequestCode()
public int getFlags()
@Implementation protected String getTargetPackage()
@Implementation(minSdk=17) protected String getCreatorPackage()
public void setCreatorPackage(String creatorPackage)
@Implementation public boolean equals(Object o)
@Implementation public int hashCode()
@Implementation @Nullable public static PendingIntent readPendingIntentOrNullFromParcel(Parcel in)
@Implementation public static void writePendingIntentOrNullToParcel(@Nullable PendingIntent sender, Parcel out)
@Resetter public static void reset()