Input

interface Input

Defines the current device Location model that is available to be read from by the processor.

Types

Link copied to clipboard
class TrackingRequirements(val updateInterval: Long, val updateIntervalTimeUnit: TimeUnit)

Defines a set of requirements that LocationProcessor expects to be satisfied by Location tracking implementation.

Functions

Link copied to clipboard
abstract fun subscribeTo(trackingRequirements: LocationProcessor.Input.TrackingRequirements, onLocationAvailable: Consumer<Location>): Closeable

Subscribes to the provided onLocationAvailable to be notified when a new Location is available for this input. The subscriber provides its TrackingRequirements that must be taken into account when configuring location tracking implementation to make sure that subscriber receives Location data as expected. The returned Closeable must be closed when done working with this input otherwise underlying resources will be leaked.