Added in API level 34

Builder


class Builder
kotlin.Any
   ↳ android.health.connect.datatypes.ExerciseRoute.Location.Builder

Builder class for Location

Summary

Public constructors
Builder(time: Instant, latitude: Double, longitude: Double)

Sets time, longitude and latitude to the point.

Public methods
ExerciseRoute.Location

Builds Location

ExerciseRoute.Location.Builder
setAltitude(altitude: Length)

Sets altitude to the point.

ExerciseRoute.Location.Builder
setHorizontalAccuracy(horizontalAccuracy: Length)

Sets horizontal accuracy to the point.

ExerciseRoute.Location.Builder
setVerticalAccuracy(verticalAccuracy: Length)

Sets vertical accuracy to the point.

Public constructors

Builder

Added in API level 34
Builder(
    time: Instant,
    latitude: Double,
    longitude: Double)

Sets time, longitude and latitude to the point.

Parameters
time Instant: This value cannot be null.
latitude Double: Value is between -90.0 and 90.0 inclusive
longitude Double: Value is between -180.0 and 180.0 inclusive

Public methods

build

Added in API level 34
fun build(): ExerciseRoute.Location

Builds Location

Return
ExerciseRoute.Location This value cannot be null.

setAltitude

Added in API level 34
fun setAltitude(altitude: Length): ExerciseRoute.Location.Builder

Sets altitude to the point.

Parameters
altitude Length: This value cannot be null.
Return
ExerciseRoute.Location.Builder This value cannot be null.

setHorizontalAccuracy

Added in API level 34
fun setHorizontalAccuracy(horizontalAccuracy: Length): ExerciseRoute.Location.Builder

Sets horizontal accuracy to the point.

Parameters
horizontalAccuracy Length: This value cannot be null.
Return
ExerciseRoute.Location.Builder This value cannot be null.

setVerticalAccuracy

Added in API level 34
fun setVerticalAccuracy(verticalAccuracy: Length): ExerciseRoute.Location.Builder

Sets vertical accuracy to the point.

Parameters
verticalAccuracy Length: This value cannot be null.
Return
ExerciseRoute.Location.Builder This value cannot be null.