# LocationAvailability

# LocationAvailability

Artifact:[androidx.health:health-services-client](https://developer.android.com/jetpack/androidx/releases/health)  
[View Source](https://cs.android.com/search?q=file:androidx/health/services/client/data/LocationAvailability.kt+class:androidx.health.services.client.data.LocationAvailability)  
Added in[1.0.0](https://developer.android.com/jetpack/androidx/releases/health#1.0.0)

*** ** * ** ***

Kotlin\|[Java](https://developer.android.com/reference/androidx/health/services/client/data/LocationAvailability "View this page in Java")

<br />

```
class LocationAvailability : Availability
```

<br />

*** ** * ** ***

Availability of a[DataType.LOCATION](https://developer.android.com/reference/kotlin/androidx/health/services/client/data/DataType#LOCATION())data type.

## Summary

|                                                   ### Public companion functions                                                    |
|-------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [LocationAvailability](https://developer.android.com/reference/kotlin/androidx/health/services/client/data/LocationAvailability)`?` | [fromId](https://developer.android.com/reference/kotlin/androidx/health/services/client/data/LocationAvailability#fromId(kotlin.Int))`(id: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`)` |

|                                                 ### Public companion properties                                                  |
|----------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [LocationAvailability](https://developer.android.com/reference/kotlin/androidx/health/services/client/data/LocationAvailability) | [ACQUIRED_TETHERED](https://developer.android.com/reference/kotlin/androidx/health/services/client/data/LocationAvailability#ACQUIRED_TETHERED()) Acquired location through connected phone.                                       |
| [LocationAvailability](https://developer.android.com/reference/kotlin/androidx/health/services/client/data/LocationAvailability) | [ACQUIRED_UNTETHERED](https://developer.android.com/reference/kotlin/androidx/health/services/client/data/LocationAvailability#ACQUIRED_UNTETHERED()) Acquired location through watch.                                             |
| [LocationAvailability](https://developer.android.com/reference/kotlin/androidx/health/services/client/data/LocationAvailability) | [ACQUIRING](https://developer.android.com/reference/kotlin/androidx/health/services/client/data/LocationAvailability#ACQUIRING()) Acquiring location.                                                                              |
| [LocationAvailability](https://developer.android.com/reference/kotlin/androidx/health/services/client/data/LocationAvailability) | [NO_GNSS](https://developer.android.com/reference/kotlin/androidx/health/services/client/data/LocationAvailability#NO_GNSS()) The on-device location service is disabled, so location cannot be acquired.                          |
| [LocationAvailability](https://developer.android.com/reference/kotlin/androidx/health/services/client/data/LocationAvailability) | [UNAVAILABLE](https://developer.android.com/reference/kotlin/androidx/health/services/client/data/LocationAvailability#UNAVAILABLE()) Location is not available.                                                                   |
| [LocationAvailability](https://developer.android.com/reference/kotlin/androidx/health/services/client/data/LocationAvailability) | [UNKNOWN](https://developer.android.com/reference/kotlin/androidx/health/services/client/data/LocationAvailability#UNKNOWN()) The availability is unknown, or is represented by a value too new for this library version to parse. |

|                                        ### 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/services/client/data/LocationAvailability#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/services/client/data/LocationAvailability#hashCode())`()`                                                                                            |
| `open `[String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)            | [toString](https://developer.android.com/reference/kotlin/androidx/health/services/client/data/LocationAvailability#toString())`()`                                                                                            |

|                               ### Public properties                                |
|------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------|
| `open `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html) | [id](https://developer.android.com/reference/kotlin/androidx/health/services/client/data/LocationAvailability#id())     |
| [String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)  | [name](https://developer.android.com/reference/kotlin/androidx/health/services/client/data/LocationAvailability#name()) |

## Public companion functions

### fromId

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

```
fun fromId(id: Int): LocationAvailability?
```  

## Public companion properties

### ACQUIRED_TETHERED

```
val ACQUIRED_TETHERED: LocationAvailability
```

Acquired location through connected phone.  

### ACQUIRED_UNTETHERED

```
val ACQUIRED_UNTETHERED: LocationAvailability
```

Acquired location through watch.  

### ACQUIRING

```
val ACQUIRING: LocationAvailability
```

Acquiring location.  

### NO_GNSS

```
val NO_GNSS: LocationAvailability
```

The on-device location service is disabled, so location cannot be acquired.  

### UNAVAILABLE

```
val UNAVAILABLE: LocationAvailability
```

Location is not available.  

### UNKNOWN

```
val UNKNOWN: LocationAvailability
```

The availability is unknown, or is represented by a value too new for this library version to parse.  

## Public functions

### equals

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

### hashCode

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

### toString

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

## Public properties

### id

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

```
open val id: Int
```  

### name

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

```
val name: String
```