public abstract class AppNotificationReceiver extends BroadcastReceiver
AppNotificationIntent.ACTION_APP_NOTIFICATION
intent.BroadcastReceiver.PendingResult
Constructor and Description |
---|
AppNotificationReceiver()
Create a new instance.
|
AppNotificationReceiver(Context context)
Create a new instance and register it with the given context.
|
Modifier and Type | Method and Description |
---|---|
abstract void |
onReceive(Context context,
AppNotification notification)
Implement this method to respond to notifications.
|
void |
onReceive(Context context,
Intent intent) |
void |
register(Context context)
Register this receiver with the given context.
|
void |
unregister()
Unregister this receiver.
|
abortBroadcast, clearAbortBroadcast, getAbortBroadcast, getDebugUnregister, getResultCode, getResultData, getResultExtras, goAsync, isInitialStickyBroadcast, isOrderedBroadcast, peekService, setDebugUnregister, setOrderedHint, setResult, setResultCode, setResultData, setResultExtras
public AppNotificationReceiver()
public AppNotificationReceiver(Context context)
register(android.content.Context)
public void register(Context context)
public void unregister()
Activity.onPause()
or Activity.onDestroy()
, to unregister the underlying BroadcastReceiver
.public final void onReceive(Context context, Intent intent)
onReceive
in class BroadcastReceiver
public abstract void onReceive(Context context, AppNotification notification)