Package com.batch.android
Class BatchPushMessageDismissReceiver
java.lang.Object
android.content.BroadcastReceiver
com.batch.android.BatchPushMessageDismissReceiver
Batch's implementation of dismiss intent of push notification
-
Nested Class Summary
Nested classes/interfaces inherited from class android.content.BroadcastReceiver
BroadcastReceiver.PendingResult -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleancompleteWakefulIntent(Intent intent) Finish the execution from a previousstartWakefulService(android.content.Context, android.content.Intent).voidstatic ComponentNamestartWakefulService(Context context, Intent intent) Do aContext.startService, but holding a wake lock while the service starts.Methods inherited from class android.content.BroadcastReceiver
abortBroadcast, clearAbortBroadcast, getAbortBroadcast, getDebugUnregister, getResultCode, getResultData, getResultExtras, getSentFromPackage, getSentFromUid, goAsync, isInitialStickyBroadcast, isOrderedBroadcast, peekService, setDebugUnregister, setOrderedHint, setResult, setResultCode, setResultData, setResultExtras
-
Constructor Details
-
BatchPushMessageDismissReceiver
public BatchPushMessageDismissReceiver()
-
-
Method Details
-
onReceive
- Specified by:
onReceivein classBroadcastReceiver
-
startWakefulService
Do aContext.startService, but holding a wake lock while the service starts. This will modify the Intent to hold an extra identifying the wake lock; when the service receives it inService.onStartCommand, it should pass back the Intent it receives there tocompleteWakefulIntent(android.content.Intent)in order to release the wake lock.- Parameters:
context- The Context in which it operate.intent- The Intent with which to start the service, as perContext.startService.
-
completeWakefulIntent
Finish the execution from a previousstartWakefulService(android.content.Context, android.content.Intent). Any wake lock that was being held will now be released.- Parameters:
intent- The Intent as originally generated bystartWakefulService(android.content.Context, android.content.Intent).- Returns:
- Returns true if the intent is associated with a wake lock that is now released; returns false if there was no wake lock specified for it.
-