Batched and Real time Events

The developer can configure the SDK to send events real-time or batched using the Blueshift Bulk Events API.

There are certain events (for eg. app_open) that pre-configured by the SDK. These events are always sent in batches. You can learn more about these events (here)

The SDK allows you to specify if an event needs to be sent real-time or in a batch. Events are sent to Blueshift by calling the SDK methods here. The last argument in each method controls whether an event needs to be send real-time or in batch.

Batched events are sent using the Blueshift Bulk Event API along with other events. The events are added to a persistent queue which ensures that they are not lost if the user force quits the app. Batches of 100 events are created from the queue every 30 min (or the time interval configured during SDK set-up) and sent to Blueshift using the Bulk Events API called from non UI blocking background thread.

To optimize battery and network we recommend using a time interval that in sync with the Android Alarm Manager. This would ensure that your application doesn't wake-up the radio.

Your application may prefer sending certain events (for eg. Purchase) real-time to Blueshift. The SDK may store these events in a queue if no network is available. In this situation, the events are sent as a part of the next batch of events, as soon as network is available.

Was this article helpful?
0 out of 0 found this helpful