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.
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.