Package com.clover.sdk.v1.app
Class AppNotificationReceiver
- java.lang.Object
-
- android.content.BroadcastReceiver
-
- com.clover.sdk.v1.app.AppNotificationReceiver
-
public abstract class AppNotificationReceiver extends BroadcastReceiver
Handles anAppNotificationIntent.ACTION_APP_NOTIFICATION
intent.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class android.content.BroadcastReceiver
BroadcastReceiver.PendingResult
-
-
Constructor Summary
Constructors Constructor Description AppNotificationReceiver()
Create a new instance.AppNotificationReceiver(Context context)
Create a new instance and register it with the given context.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
onReceive(Context context, Intent intent)
abstract void
onReceive(Context context, AppNotification notification)
Implement this method to respond to notifications.void
register(Context context)
Register this receiver with the given context.void
unregister()
Unregister this receiver.-
Methods inherited from class android.content.BroadcastReceiver
abortBroadcast, clearAbortBroadcast, getAbortBroadcast, getDebugUnregister, getResultCode, getResultData, getResultExtras, goAsync, isInitialStickyBroadcast, isOrderedBroadcast, peekService, setDebugUnregister, setOrderedHint, setResult, setResultCode, setResultData, setResultExtras
-
-
-
-
Constructor Detail
-
AppNotificationReceiver
public AppNotificationReceiver()
Create a new instance.
-
AppNotificationReceiver
public AppNotificationReceiver(Context context)
Create a new instance and register it with the given context.- See Also:
register(android.content.Context)
-
-
Method Detail
-
register
public void register(Context context)
Register this receiver with the given context.
-
unregister
public void unregister()
Unregister this receiver. This method must be called fromActivity.onPause()
orActivity.onDestroy()
, to unregister the underlyingBroadcastReceiver
.
-
onReceive
public final void onReceive(Context context, Intent intent)
- Specified by:
onReceive
in classBroadcastReceiver
-
onReceive
public abstract void onReceive(Context context, AppNotification notification)
Implement this method to respond to notifications.
-
-