Tracking event and session data when a device is offline with Android SDK

Last Updated: Jan 17, 2016 10:29PM PST

When a user’s device is connected to the Internet, the session and event data is sent as it occurs to Apsalar using a background thread. In the case where the device is offline, this timestamped data is buffered until that time when the device is back online, at which time the buffer is flushed and the data is sent to Apsalar.

The buffering occurs in a SQLite database file named Apsalar.sqlite_XXXX. The file is stored in the /data/data/YYYY/databases/ where YYYY is the application’s package name. An example of this file would be:


The Apsalar SDK will only record up to 1000 sessions and events. If the buffer is full, any subsequent sessions and events will not be recorded.

To minimize wear and tear on the device’s NAND flash memory, we only write to the database when an Internet connection is unavailable.
seconds ago
a minute ago
minutes ago
an hour ago
hours ago
a day ago
days ago
Invalid characters found