-
public class DisplayReceiptModule extends BatchModule
-
-
Method Summary
Modifier and Type Method Description static DisplayReceiptModuleprovide()StringgetId()ID of the module intgetState()Should return the state of the module (usually 0 for deactivated, 1 for activated) voidbatchDidStart()Called by Batch right after batch startNB : Same context and activity that in willStart but with the new state READY set voidscheduleDisplayReceipt(Context context, @NonNull() InternalPushData pushData)Save the new receipt and schedule the send of display receipts using a JobServiceIf no delay or Android version is too low, we send without a job static synchronized voidsendReceipt(Context context, boolean replay)Send up to CacheHelper. voidwipeData(@NonNull() Context context)Delete all receipt still in cache -
-
Method Detail
-
provide
static DisplayReceiptModule provide()
-
getState
int getState()
Should return the state of the module (usually 0 for deactivated, 1 for activated)
-
batchDidStart
void batchDidStart()
Called by Batch right after batch startNB : Same context and activity that in willStart but with the new state READY set
-
scheduleDisplayReceipt
void scheduleDisplayReceipt(Context context, @NonNull() InternalPushData pushData)
Save the new receipt and schedule the send of display receipts using a JobServiceIf no delay or Android version is too low, we send without a job
-
sendReceipt
static synchronized void sendReceipt(Context context, boolean replay)
Send up to CacheHelper.MAX_READ_RECEIPT_FROM_CACHE display receipt to the ws.
Update send attempts and replay in cached files.Delete cached file if send is successful.
- Parameters:
context- app contextreplay- replay = true if request is at SDK start false otherwise
-
-
-
-