Event Transmission

A description of how data is transmitted from the application to the data collector and what configuration settings can affect behavior.

How Events are Sent

To preserve battery and network bandwidth, events are sent to the collection server in batches, rather than as they occur in real time. By default, batches of events will automatically transmit:

  • every 5 minutes (600000 milliseconds by default, configurable using the SEND_INTERVAL_MILLIS setting)
  • or when the allocated event storage has reached 80% (default) capacity (configured using MAX_PERSISTED_EVENTS and AUTO_SEND_THRESHOLD_PERCENT config settings, respectively).

Events will not transmit when:

  • Network is not present
  • Battery level is below the threshold (BATTERY_MIN_CHG_PERCENT config setting, 20% by default)

If the event storage has reached its configured capacity and the data collector is unable to transmit events, old events will be deleted as new events are collected. Once the network and battery state have been restored to normal, event transmission will continue normally.

scheduleSend() and scheduleSendAll()

The scheduleSend() method instructs the SDK to begin sending a batch of events, even if configured thresholds have not been exceeded. The scheduleSendAll() method will continue to send batches of events until the event store is completely emptied.

Syntax:

publicvoid scheduleSend();
publicvoid scheduleSendAll();