# ExerciseRoute.Location

# ExerciseRoute.Location

Artifact:[androidx.health.connect:connect-client](https://developer.android.com/jetpack/androidx/releases/health-connect)  
[View Source](https://cs.android.com/search?q=file:androidx/health/connect/client/records/ExerciseRoute.kt+class:androidx.health.connect.client.records.ExerciseRoute.Location)  
Added in[1.1.0](https://developer.android.com/jetpack/androidx/releases/health-connect#1.1.0)

*** ** * ** ***

Kotlin\|[Java](https://developer.android.com/reference/androidx/health/connect/client/records/ExerciseRoute.Location "View this page in Java")

<br />

```
class ExerciseRoute.Location
```

<br />

*** ** * ** ***

Represents a single location point recorded during an exercise.  

|                                                             See also                                                             |
|----------------------------------------------------------------------------------------------------------------------------------|---|
| [ExerciseRouteResult](https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseRouteResult) |   |

## Summary

|                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          ### Public constructors                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Location](https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseRoute.Location#Location(java.time.Instant,kotlin.Double,kotlin.Double,androidx.health.connect.client.units.Length,androidx.health.connect.client.units.Length,androidx.health.connect.client.units.Length))`(` ` time: `[Instant](https://developer.android.com/reference/java/time/Instant.html)`,` ` latitude: `[Double](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-double/index.html)`,` ` longitude: `[Double](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-double/index.html)`,` ` horizontalAccuracy: `[Length](https://developer.android.com/reference/kotlin/androidx/health/connect/client/units/Length)`?,` ` verticalAccuracy: `[Length](https://developer.android.com/reference/kotlin/androidx/health/connect/client/units/Length)`?,` ` altitude: `[Length](https://developer.android.com/reference/kotlin/androidx/health/connect/client/units/Length)`?` `)` |

|                                        ### Public functions                                         |
|-----------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `open operator `[Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html) | [equals](https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseRoute.Location#equals(kotlin.Any))`(other: `[Any](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html)`?)` |
| `open `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)                  | [hashCode](https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseRoute.Location#hashCode())`()`                                                                                            |
| `open `[String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)            | [toString](https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseRoute.Location#toString())`()`                                                                                            |

|                                          ### Public properties                                          |
|---------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Length](https://developer.android.com/reference/kotlin/androidx/health/connect/client/units/Length)`?` | [altitude](https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseRoute.Location#altitude()) in[Length](https://developer.android.com/reference/kotlin/androidx/health/connect/client/units/Length)unit.                     |
| [Length](https://developer.android.com/reference/kotlin/androidx/health/connect/client/units/Length)`?` | [horizontalAccuracy](https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseRoute.Location#horizontalAccuracy()) in[Length](https://developer.android.com/reference/kotlin/androidx/health/connect/client/units/Length)unit. |
| [Double](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-double/index.html)                       | [latitude](https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseRoute.Location#latitude()) Latitude of the location point; Required field; Valid range -90; 90                                                             |
| [Double](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-double/index.html)                       | [longitude](https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseRoute.Location#longitude()) Longitude of the location point; Required field; Valid range -180; 180                                                        |
| [Instant](https://developer.android.com/reference/java/time/Instant.html)                               | [time](https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseRoute.Location#time()) The point in time when the location was recorded; Required field.                                                                       |
| [Length](https://developer.android.com/reference/kotlin/androidx/health/connect/client/units/Length)`?` | [verticalAccuracy](https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseRoute.Location#verticalAccuracy()) in[Length](https://developer.android.com/reference/kotlin/androidx/health/connect/client/units/Length)unit.     |

## Public constructors

### Location

Added in[1.1.0](https://developer.android.com/jetpack/androidx/releases/health-connect#1.1.0)  

```
Location(
    time: Instant,
    latitude: Double,
    longitude: Double,
    horizontalAccuracy: Length? = null,
    verticalAccuracy: Length? = null,
    altitude: Length? = null
)
```  

|                                                              Parameters                                                              |
|--------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `time: `[Instant](https://developer.android.com/reference/java/time/Instant.html)                                                    | The point in time when the location was recorded; Required field.                                                                                              |
| `latitude: `[Double](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-double/index.html)                                        | Latitude of the location point; Required field; Valid range -90; 90                                                                                            |
| `longitude: `[Double](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-double/index.html)                                       | Longitude of the location point; Required field; Valid range -180; 180                                                                                         |
| `horizontalAccuracy: `[Length](https://developer.android.com/reference/kotlin/androidx/health/connect/client/units/Length)`? = null` | in[Length](https://developer.android.com/reference/kotlin/androidx/health/connect/client/units/Length)unit. Optional field. Valid range: non-negative numbers. |
| `verticalAccuracy: `[Length](https://developer.android.com/reference/kotlin/androidx/health/connect/client/units/Length)`? = null`   | in[Length](https://developer.android.com/reference/kotlin/androidx/health/connect/client/units/Length)unit. Optional field. Valid range: non-negative numbers. |
| `altitude: `[Length](https://developer.android.com/reference/kotlin/androidx/health/connect/client/units/Length)`? = null`           | in[Length](https://developer.android.com/reference/kotlin/androidx/health/connect/client/units/Length)unit. Optional field.                                    |

## Public functions

### equals

```
open operator fun equals(other: Any?): Boolean
```  

### hashCode

```
open fun hashCode(): Int
```  

### toString

```
open fun toString(): String
```  

## Public properties

### altitude

Added in[1.1.0](https://developer.android.com/jetpack/androidx/releases/health-connect#1.1.0)  

```
val altitude: Length?
```

in[Length](https://developer.android.com/reference/kotlin/androidx/health/connect/client/units/Length)unit. Optional field.  

### horizontalAccuracy

Added in[1.1.0](https://developer.android.com/jetpack/androidx/releases/health-connect#1.1.0)  

```
val horizontalAccuracy: Length?
```

in[Length](https://developer.android.com/reference/kotlin/androidx/health/connect/client/units/Length)unit. Optional field. Valid range: non-negative numbers.  

### latitude

Added in[1.1.0](https://developer.android.com/jetpack/androidx/releases/health-connect#1.1.0)  

```
val latitude: Double
```

Latitude of the location point; Required field; Valid range -90; 90  

### longitude

Added in[1.1.0](https://developer.android.com/jetpack/androidx/releases/health-connect#1.1.0)  

```
val longitude: Double
```

Longitude of the location point; Required field; Valid range -180; 180  

### time

Added in[1.1.0](https://developer.android.com/jetpack/androidx/releases/health-connect#1.1.0)  

```
val time: Instant
```

The point in time when the location was recorded; Required field.  

### verticalAccuracy

Added in[1.1.0](https://developer.android.com/jetpack/androidx/releases/health-connect#1.1.0)  

```
val verticalAccuracy: Length?
```

in[Length](https://developer.android.com/reference/kotlin/androidx/health/connect/client/units/Length)unit. Optional field. Valid range: non-negative numbers.