# androidx.core.location

*** ** * ** ***

## Interfaces

|---|---|
| `https://developer.android.com/reference/kotlin/androidx/core/location/LocationListenerCompat` | A version of `https://developer.android.com/reference/android/location/LocationListener.html` suitable for use on all API levels. |

## Classes

|---|---|
| `https://developer.android.com/reference/kotlin/androidx/core/location/GnssStatusCompat` | GnssStatus representation that works across all Android versions. |
| `https://developer.android.com/reference/kotlin/androidx/core/location/GnssStatusCompat.Callback` | See `https://developer.android.com/reference/android/location/GnssStatus.Callback.html`. |
| `https://developer.android.com/reference/kotlin/androidx/core/location/LocationCompat` | Helper for accessing features in `https://developer.android.com/reference/android/location/Location.html`. |
| `https://developer.android.com/reference/kotlin/androidx/core/location/LocationManagerCompat` | Helper for accessing features in `https://developer.android.com/reference/android/location/LocationManager.html`. |
| `https://developer.android.com/reference/kotlin/androidx/core/location/LocationRequestCompat` | Compatibility version of `https://developer.android.com/reference/android/location/LocationRequest.html`. |
| `https://developer.android.com/reference/kotlin/androidx/core/location/LocationRequestCompat.Builder` | A builder class for `https://developer.android.com/reference/kotlin/androidx/core/location/LocationRequestCompat`. |

## Extension functions summary

|---|---|
| `inline operator https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-double/index.html` | `https://developer.android.com/reference/android/location/Location.html.https://developer.android.com/reference/kotlin/androidx/core/location/package-summary#(android.location.Location).component1()()` Returns the latitude of this `https://developer.android.com/reference/android/location/Location.html`. |
| `inline operator https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-double/index.html` | `https://developer.android.com/reference/android/location/Location.html.https://developer.android.com/reference/kotlin/androidx/core/location/package-summary#(android.location.Location).component2()()` Returns the longitude of this `https://developer.android.com/reference/android/location/Location.html`. |

## Extension functions

### Location.component1

Artifact: [androidx.core:core](https://developer.android.com/jetpack/androidx/releases/core) [View Source](https://cs.android.com/search?q=file:androidx/core/location/Location.kt+function:component1) Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)

```
inline operator fun Location.component1(): Double
```

Returns the latitude of this `https://developer.android.com/reference/android/location/Location.html`.

This method allows to use destructuring declarations when working with `https://developer.android.com/reference/android/location/Location.html`, for example:

```kotlin
val (lat, lon) = myLocation
```

### Location.component2

Artifact: [androidx.core:core](https://developer.android.com/jetpack/androidx/releases/core) [View Source](https://cs.android.com/search?q=file:androidx/core/location/Location.kt+function:component2) Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)

```
inline operator fun Location.component2(): Double
```

Returns the longitude of this `https://developer.android.com/reference/android/location/Location.html`.

This method allows to use destructuring declarations when working with `https://developer.android.com/reference/android/location/Location.html`, for example:

```kotlin
val (lat, lon) = myLocation
```