SessionConfiguration

open class SessionConfiguration : SessionConfigurationInterface, Configuration

The SessionConfiguration is used to configure session behaviour. Session data is stored as SessionState, and is appended to every event as an entity (client_session), by default.

Session data is maintained for the life of the application being installed on a device. A new session will be created if the session information is not accessed within a configurable timeout.

A new session will be created based on:

  • the timeout set for the inactivity of app when in foreground;

  • the timeout set for the inactivity of app when in background.

See also

Constructors

Link copied to clipboard
constructor(foregroundTimeout: TimeMeasure? = null, backgroundTimeout: TimeMeasure? = null)

This will set up the session behaviour of the tracker.

constructor(jsonObject: JSONObject)

This constructor is used in remote configuration.

Functions

Link copied to clipboard
open override fun copy(): Configuration
Link copied to clipboard

Properties

Link copied to clipboard
open override var backgroundTimeout: TimeMeasure

The amount of time that can elapse before the session id is updated while the app is in the background.

Link copied to clipboard
open override var foregroundTimeout: TimeMeasure

The amount of time that can elapse before the session id is updated while the app is in the foreground.

Link copied to clipboard

The callback called every time the session is updated.