How many events can be stored in the Countly local store when device is offline?
Platform: Android
Countly SDK release: 22.06.2
The question background is:
1. Application can run long period of time in the offline mode and events recorded via method
Countly.sharedInstance().events().recordEvent
should be stored without loss and to be sent to the Countly server when device be online.
2. Analysis of class CountlyStore where:
private static final int MAX_EVENTS = 100;
void addEvent(final Event event) {
final List<Event> events = getEventList();
if (events.size() < MAX_EVENTS) {
events.add(event);
setEventData(joinEvents(events, DELIMITER));
}
}
Looks like some events can be skipped when events queue already contains 100 events ...
Comments
There are 2 queues in the SDK: request queue and event queue. There are some internal triggers that would create a requests out of all events in the event queue at that moment.
By default the request queue has a limit of 1000 requests. This limit can be changed during initialization. Once the limit is reached, the oldest request is thrown out.
Hi Arturs!
Thank you!
Please sign in to leave a comment.