Class DisplayReceiptModule


  • public class DisplayReceiptModule
    extends BatchModule
    • Method Detail

      • getId

        public java.lang.String getId()
        Description copied from class: BatchModule
        ID of the module
        Specified by:
        getId in class BatchModule
        Returns:
      • getState

        public int getState()
        Description copied from class: BatchModule
        Should return the state of the module (usually 0 for deactivated, 1 for activated)
        Specified by:
        getState in class BatchModule
        Returns:
      • batchDidStart

        public void batchDidStart()
        Description copied from class: BatchModule
        Called by Batch right after batch start
        NB : Same context and activity that in willStart but with the new state State.READY set
        Overrides:
        batchDidStart in class BatchModule
      • scheduleDisplayReceipt

        public void scheduleDisplayReceipt​(android.content.Context context,
                                           @NonNull
                                           InternalPushData pushData)
        Save the new receipt and schedule the send of display receipts using a JobService If no delay or Android version is too low, we send without a job
      • sendReceipt

        public static void sendReceipt​(android.content.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 context
        replay - replay = true if request is at SDK start false otherwise
      • wipeData

        public void wipeData​(@NonNull
                             android.content.Context context)
        Delete all receipt still in cache
        Parameters:
        context -