subscribeTo

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.