Skip to main content

class

ActivityTracker​

ActivityTracker(
platformContext: Context,
model: Model,
speedBound: Double = 4.2,
timeThreshold: Duration = Duration.ofMilliseconds(20000)
)

A navigator extension that monitors user activity and emits a signal when the user has stopped using the navigator and can be turned off.

Parameters

platformContext

Context.

model

Model of the navigator the status of which is being monitored.

speedBound

Upper speed limit in m/s, above which in the Finished state of the navigator it is considered that the navigator is active, i.e. the movement continues.

timeThreshold

The amount of time the Navigator's Finished state monitors movement below the threshold to determine if the Navigator is inactive. If during this time the movement rate is less than the set threshold, or there is no location and speed data, the Navigator is considered inactive.

Properties

val stopChannel​

An active state of this flag indicates that the navigator needs to be stopped. If navigation stops in the Finished state, i.e. the movement stops or its speed falls below the threshold, and if this state persists for some time, then the flag is set is set to true, otherwise it is set to false.

val stop​

An active state of this flag indicates that the navigator needs to be stopped. If navigation stops in the Finished state, i.e. the movement stops or its speed falls below the threshold, and if this state persists for some time, then the flag is set is set to true, otherwise it is set to false.

AddEventResult​

Result of adding event (event object or error).