# 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)

*** ** * ** ***


```
public final class ExerciseRoute.Location
```

<br />

*** ** * ** ***

Represents a single location point recorded during an exercise.

| See also |
|---|---|
| `https://developer.android.com/reference/androidx/health/connect/client/records/ExerciseRouteResult` |   |

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/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)( @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/time/Instant.html time, double latitude, double longitude, https://developer.android.com/reference/androidx/health/connect/client/units/Length horizontalAccuracy, https://developer.android.com/reference/androidx/health/connect/client/units/Length verticalAccuracy, https://developer.android.com/reference/androidx/health/connect/client/units/Length altitude )` |

| ### Public methods |
|---|---|
| `boolean` | `https://developer.android.com/reference/androidx/health/connect/client/records/ExerciseRoute.Location#equals(kotlin.Any)(https://developer.android.com/reference/java/lang/Object.html other)` |
| `final https://developer.android.com/reference/androidx/health/connect/client/units/Length` | `https://developer.android.com/reference/androidx/health/connect/client/records/ExerciseRoute.Location#getAltitude()()` in `https://developer.android.com/reference/androidx/health/connect/client/units/Length` unit. |
| `final https://developer.android.com/reference/androidx/health/connect/client/units/Length` | `https://developer.android.com/reference/androidx/health/connect/client/records/ExerciseRoute.Location#getHorizontalAccuracy()()` in `https://developer.android.com/reference/androidx/health/connect/client/units/Length` unit. |
| `final double` | `https://developer.android.com/reference/androidx/health/connect/client/records/ExerciseRoute.Location#getLatitude()()` Latitude of the location point; Required field; Valid range -90; 90 |
| `final double` | `https://developer.android.com/reference/androidx/health/connect/client/records/ExerciseRoute.Location#getLongitude()()` Longitude of the location point; Required field; Valid range -180; 180 |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/time/Instant.html` | `https://developer.android.com/reference/androidx/health/connect/client/records/ExerciseRoute.Location#getTime()()` The point in time when the location was recorded; Required field. |
| `final https://developer.android.com/reference/androidx/health/connect/client/units/Length` | `https://developer.android.com/reference/androidx/health/connect/client/records/ExerciseRoute.Location#getVerticalAccuracy()()` in `https://developer.android.com/reference/androidx/health/connect/client/units/Length` unit. |
| `int` | `https://developer.android.com/reference/androidx/health/connect/client/records/ExerciseRoute.Location#hashCode()()` |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/health/connect/client/records/ExerciseRoute.Location#toString()()` |

## Public constructors

### Location

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

```
public Location(
    @NonNull Instant time,
    double latitude,
    double longitude,
    Length horizontalAccuracy,
    Length verticalAccuracy,
    Length altitude
)
```

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/time/Instant.html time` | The point in time when the location was recorded; Required field. |
| `double latitude` | Latitude of the location point; Required field; Valid range -90; 90 |
| `double longitude` | Longitude of the location point; Required field; Valid range -180; 180 |
| `https://developer.android.com/reference/androidx/health/connect/client/units/Length horizontalAccuracy` | in `https://developer.android.com/reference/androidx/health/connect/client/units/Length` unit. Optional field. Valid range: non-negative numbers. |
| `https://developer.android.com/reference/androidx/health/connect/client/units/Length verticalAccuracy` | in `https://developer.android.com/reference/androidx/health/connect/client/units/Length` unit. Optional field. Valid range: non-negative numbers. |
| `https://developer.android.com/reference/androidx/health/connect/client/units/Length altitude` | in `https://developer.android.com/reference/androidx/health/connect/client/units/Length` unit. Optional field. |

## Public methods

### equals

```
public boolean equals(Object other)
```

### getAltitude

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

```
public final Length getAltitude()
```

in `https://developer.android.com/reference/androidx/health/connect/client/units/Length` unit. Optional field.

### getHorizontalAccuracy

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

```
public final Length getHorizontalAccuracy()
```

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

### getLatitude

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

```
public final double getLatitude()
```

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

### getLongitude

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

```
public final double getLongitude()
```

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

### getTime

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

```
public final @NonNull Instant getTime()
```

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

### getVerticalAccuracy

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

```
public final Length getVerticalAccuracy()
```

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

### hashCode

```
public int hashCode()
```

### toString

```
public @NonNull String toString()
```