PlatformContext

class PlatformContext(platformDictUpdateFrequency: Long, networkDictUpdateFrequency: Long, deviceInfoMonitor: DeviceInfoMonitor, context: Context)

PlatformContext manages device information that is sent as context along with events. Some information is created during initialization and some ephemeral info is updated in predefined intervals as it is accessed.

Parameters

platformDictUpdateFrequency

Minimal gap between subsequent updates of mobile platform information in milliseconds

networkDictUpdateFrequency

Minimal gap between subsequent updates of network platform information in milliseconds

deviceInfoMonitor

Device monitor for fetching platform information

Constructors

Link copied to clipboard
fun PlatformContext(context: Context)

Initializes PlatformContext with default update intervals – 0.1s for updating platform information and 10s for updating network information.

Link copied to clipboard
fun PlatformContext(platformDictUpdateFrequency: Long, networkDictUpdateFrequency: Long, deviceInfoMonitor: DeviceInfoMonitor, context: Context)

Functions

Link copied to clipboard
fun getMobileContext(userAnonymisation: Boolean): SelfDescribingJson?