Snowplow Android Tracker 1.7.0 and 1.7.1 released
We are pleased to announce Snowplow Android Tracker 1.7.0 and 1.7.1. Version 1.7.0 refactors the session management to make it more resilient. Version 1.7.1 fixes a bug where the
Emitter instances its own
OkHttpClient even when a different instance is passed as parameter in the builder.
Read on below for:
1. Updating session management
Sessions expire when no events have been tracked for the amount of time defined in the timeout. When a session expires, the session ID is updated and the session index is incremented. There are two possibilities for timeouts since a session can timeout in the foreground (while the app is visible) or in the background (when the app has been suspended, but not closed). Furthermore, when the app crashes or is killed by the user the session also always resets.
Before v1.7.x the session was configured using three parameters:
foregroundTimeout: number of seconds of inactivity needed to reset the session (while the app is visible)
backgroundTimeout: number of seconds of inactivity needed to reset the session (when the app has been suspended)
checkInterval: number of seconds between a session checking
However, there was an issue where a short session timeout could cause sessions to expire more than once. Version 1.7.0 updates the session management as follows:
- We have removed the
checkIntervalparameter as the session checking is no longer based on a timer.
- The session expiration is checked only when an event reaches the tracker. Doing that ensures new sessions are always caused by events being tracked, and they can’t be renewed without being associated to a specific event. Also, the events are always associated to the correct session as the session is checked event by event.
More information can be found in GitHub issue #366.
2. Updates and bug fixes
SQLITEbut it’s not (GitHub issue #347)
- Cannot provide
OkHttpClientwhen setting up Emitter (GitHub issue #414)
As always, information about how to use the tracker can be found in the Android Tracker documentation.
4. Getting help
For help on integrating the tracker please have a look at the setup guide. If you have any questions or run into any problems, please visit our Discourse forum. Please raise any bugs in the Android Tracker’s issues on GitHub.