Salta ai contenuti
Seleziona lingua:Italiano
Questa pagina è disponibile solo in inglese.

MDK 3.7.3

This class provides a mechanism for tracking data (such as location and events) and deferring its transmission to a server. It offers configurable options for when and how the data is sent, ensuring efficient use of resources and network connectivity.

The tracker stores data locally in chunks and manages the sending process based on the defined Options. It also handles retries in case of transmission failures.

Types

@Serializable
class Options(val address: String, val apiKey: String? = null, val secret: String? = null, val policy: PacketPolicy = PacketPolicy.ALWAYS, val beginDay: Int = 0, val endDay: Int = Int.MAX_VALUE, val maxSpace: Int = 64, val minDist: Float = 0.2f, val minInterval: Int = 500, val chunkMaxTime: Int = 300, val chunkMaxSize: Int = 1024, val geofencing: Boolean = false, val sendOnlyExisting: Boolean = false, val filterByBuildings: List<String>? = null, val filterInsidePolygons: List<DoubleArray>? = null, val filterOutsidePolygons: List<DoubleArray>? = null)

Options for configuring the tracking process.

Functions

fun appendEvent(key: String, value: String? = null)

Appends an event to the tracking data.

fun clear()

Clears the tracking data.

fun disable()

Disables the tracking process.

Enables the tracking process with the provided options.

fun forceSynchronization(progress: (count: Int, total: Int) -> Unit)

Forces the sending of the data.

Sets the external ID for the tracking data.