public static class Notifications.NotificationReceiver
extends android.content.BroadcastReceiver
BroadcastReceiver
to handle notification actionsConstructor and Description |
---|
NotificationReceiver() |
Modifier and Type | Method and Description |
---|---|
private void |
cancelNotification(android.content.Context ctxt,
int notificationId)
Remove the given notification
|
static android.app.PendingIntent |
getPIntent(android.content.Context ctxt,
java.lang.String action,
int noteId,
Clip clip)
Get a pending intent for this receiver
|
static android.app.PendingIntent |
getPIntent(android.content.Context ctxt,
java.lang.String action,
int noteId,
java.lang.String emailSubject,
java.lang.String emailBody)
Get a pending intent for this receiver
|
void |
onReceive(android.content.Context ctxt,
android.content.Intent intent) |
abortBroadcast, clearAbortBroadcast, getAbortBroadcast, getDebugUnregister, getResultCode, getResultData, getResultExtras, goAsync, isInitialStickyBroadcast, isOrderedBroadcast, peekService, setDebugUnregister, setOrderedHint, setResult, setResultCode, setResultData, setResultExtras
public static android.app.PendingIntent getPIntent(android.content.Context ctxt, java.lang.String action, int noteId, Clip clip)
ctxt
- A Contextaction
- An action we know aboutnoteId
- The id of the source notificationclip
- The Clip
PendingIntent
public static android.app.PendingIntent getPIntent(android.content.Context ctxt, java.lang.String action, int noteId, java.lang.String emailSubject, java.lang.String emailBody)
ctxt
- A Contextaction
- An action we know aboutnoteId
- The id of the source notificationemailSubject
- subject of emailemailBody
- body of emailPendingIntent
private void cancelNotification(android.content.Context ctxt, int notificationId)
ctxt
- A ContextnotificationId
- notification id to removepublic void onReceive(android.content.Context ctxt, android.content.Intent intent)
onReceive
in class android.content.BroadcastReceiver