sdk-common / com.tomtom.online.sdk.location / LocationRequestsFactory

LocationRequestsFactory

@DeprecatedSince(2020, 12) open class LocationRequestsFactory
Deprecated: Deprecated in Java

Factory to create various location request, that differs with location update time and accuracy to save the user battery. In some cases, the user may not need too frequent updates.

Functions

create

open static fun create(): LocationRequestsFactory!

Static method used for creating new instance of location request factory.

createDrivingLocationRequest

open fun createDrivingLocationRequest(): LocationRequest

Driving location request provides updates with the highest available accuracy. The update time is set to 2 seconds.

createMapLocationRequest

open fun createMapLocationRequest(): LocationRequest

Map location request provides updates with the highest available accuracy. The update time is set to 5 seconds.

createSearchLocationRequest

open fun createSearchLocationRequest(): LocationRequest

Search location request provides updates with less accuracy, taking power consumption into account. The location update time is set to 5 seconds. Using this, you got less frequent updates, but the battery consumption is relatively low.