ru.dgis.sdk.navigation.ActivityTracker | Android SDK | 2GIS Documentation

ActivityTracker

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

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

Context.

model
Model

Model of the navigator which status is being monitored.

speedBound
Double

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
Duration

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 below the set threshold, or there is no location and speed data, the Navigator is considered inactive.

Returns

Object of the navigator user activity tracker.

Properties

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

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