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

*** ** * ** ***


```
public final class LocationAvailability implements Availability
```

<br />

*** ** * ** ***

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

## Summary

| ### Public fields |
|---|---|
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/health/services/client/data/LocationAvailability` | `https://developer.android.com/reference/androidx/health/services/client/data/LocationAvailability#ACQUIRED_TETHERED()` Acquired location through connected phone. |
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/health/services/client/data/LocationAvailability` | `https://developer.android.com/reference/androidx/health/services/client/data/LocationAvailability#ACQUIRED_UNTETHERED()` Acquired location through watch. |
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/health/services/client/data/LocationAvailability` | `https://developer.android.com/reference/androidx/health/services/client/data/LocationAvailability#ACQUIRING()` Acquiring location. |
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/health/services/client/data/LocationAvailability` | `https://developer.android.com/reference/androidx/health/services/client/data/LocationAvailability#NO_GNSS()` The on-device location service is disabled, so location cannot be acquired. |
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/health/services/client/data/LocationAvailability` | `https://developer.android.com/reference/androidx/health/services/client/data/LocationAvailability#UNAVAILABLE()` Location is not available. |
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/health/services/client/data/LocationAvailability` | `https://developer.android.com/reference/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 methods |
|---|---|
| `boolean` | `https://developer.android.com/reference/androidx/health/services/client/data/LocationAvailability#equals(kotlin.Any)(https://developer.android.com/reference/java/lang/Object.html other)` |
| `static final https://developer.android.com/reference/androidx/health/services/client/data/LocationAvailability` | `https://developer.android.com/reference/androidx/health/services/client/data/LocationAvailability#fromId(kotlin.Int)(int id)` |
| `int` | `https://developer.android.com/reference/androidx/health/services/client/data/LocationAvailability#getId()()` |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/health/services/client/data/LocationAvailability#getName()()` |
| `int` | `https://developer.android.com/reference/androidx/health/services/client/data/LocationAvailability#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/services/client/data/LocationAvailability#toString()()` |

## Public fields

### ACQUIRED_TETHERED

```
public static final @NonNull LocationAvailability ACQUIRED_TETHERED
```

Acquired location through connected phone.

### ACQUIRED_UNTETHERED

```
public static final @NonNull LocationAvailability ACQUIRED_UNTETHERED
```

Acquired location through watch.

### ACQUIRING

```
public static final @NonNull LocationAvailability ACQUIRING
```

Acquiring location.

### NO_GNSS

```
public static final @NonNull LocationAvailability NO_GNSS
```

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

### UNAVAILABLE

```
public static final @NonNull LocationAvailability UNAVAILABLE
```

Location is not available.

### UNKNOWN

```
public static final @NonNull LocationAvailability UNKNOWN
```

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

## Public methods

### equals

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

### fromId

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

```
public static final LocationAvailability fromId(int id)
```

### getId

```
public int getId()
```

### getName

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

```
public final @NonNull String getName()
```

### hashCode

```
public int hashCode()
```

### toString

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