Package 

Class TrackerModule

    • Field Summary

      Fields 
      Modifier and Type Field Description
      public final static String TAG
    • Method Summary

      Modifier and Type Method Description
      static TrackerModule provide()
      String getId() ID of the module
      int getState() Should return the state of the module (usually 0 for deactivated, 1 for activated)
      void batchWillStart() Called by Batch before batch startNB : Context & activity are already available from the runtimeManager
      void batchDidStart() Called by Batch right after batch startNB : Same context and activity that in willStart but with the new state READY set
      void batchDidStop() Called by Batch right after batch stopNB : No context or activity are available
      void track(String name) Track an event by its name
      void track(String name, JSONObject parameters) Track an event by its name with additional parameters
      void track(String name, long timestamp, JSONObject parameters) Track en event by its name, timestamp and with additional parameters
      void trackCollapsible(String name, long timestamp, JSONObject parameters) Track a collapsible event by its name, timestamp and with additional parameters
      void track(String name, long timestamp) Track an event by its name and timestamp
      void trackCampaignView(@NonNull() String campaignID, @NonNull() JSONObject eventData) Track local campaign vien
      void onEventsSendSuccess(List<Event> events) Called when events has been sent to server
      void onEventsSendFailure(List<Event> events) Called when events has failed to be sent to server
      List<Event> getEventsToSend() Datasource method that should provide a list of events to send
      void wipeData(Context context)
      • Methods inherited from class com.batch.android.module.BatchModule

        batchContextBecameAvailable, batchIsFinishing, batchWillStop
      • Methods inherited from class com.batch.android.event.EventSender.EventSenderListener

        onEventsSendFailure, onEventsSendSuccess
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • getState

         int getState()

        Should return the state of the module (usually 0 for deactivated, 1 for activated)

      • batchWillStart

         void batchWillStart()

        Called by Batch before batch startNB : Context & activity are already available from the runtimeManager

      • batchDidStart

         void batchDidStart()

        Called by Batch right after batch startNB : Same context and activity that in willStart but with the new state READY set

      • batchDidStop

         void batchDidStop()

        Called by Batch right after batch stopNB : No context or activity are available

      • track

         void track(String name)

        Track an event by its name

      • track

         void track(String name, JSONObject parameters)

        Track an event by its name with additional parameters

      • track

         void track(String name, long timestamp, JSONObject parameters)

        Track en event by its name, timestamp and with additional parameters

      • trackCollapsible

         void trackCollapsible(String name, long timestamp, JSONObject parameters)

        Track a collapsible event by its name, timestamp and with additional parameters

      • track

         void track(String name, long timestamp)

        Track an event by its name and timestamp

      • onEventsSendSuccess

         void onEventsSendSuccess(List<Event> events)

        Called when events has been sent to server

        Parameters:
        events - sent events
      • onEventsSendFailure

         void onEventsSendFailure(List<Event> events)

        Called when events has failed to be sent to server

        Parameters:
        events - events not sent