SessionConfiguration

open class SessionConfiguration(var foregroundTimeout: TimeMeasure, var backgroundTimeout: TimeMeasure) : SessionConfigurationInterface, Configuration

This class represents the configuration of the applications session. The SessionConfiguration can be used to setup the behaviour of sessions.

A session is a context which is appended to each event sent. The values it brings can change based on:

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

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

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.

Constructors

Link copied to clipboard
Link copied to clipboard
fun SessionConfiguration(foregroundTimeout: TimeMeasure, backgroundTimeout: TimeMeasure)

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
open override var onSessionUpdate: Consumer<SessionState>? = null

The callback called everytime the session is updated.

Inheritors

Link copied to clipboard