# LocationManagerCompat

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

*** ** * ** ***


```
public final class LocationManagerCompat
```

<br />

*** ** * ** ***

Helper for accessing features in `https://developer.android.com/reference/android/location/LocationManager.html`.

## Summary

| ### Public methods |
|---|---|
| `static void` | `@https://developer.android.com/reference/androidx/annotation/RequiresPermission(anyOf = ) https://developer.android.com/reference/androidx/core/location/LocationManagerCompat#getCurrentLocation(android.location.LocationManager,java.lang.String,android.os.CancellationSignal,java.util.concurrent.Executor,androidx.core.util.Consumer<android.location.Location>)( @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/location/LocationManager.html locationManager, @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/lang/String.html provider, @https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/android/os/CancellationSignal.html cancellationSignal, @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/util/concurrent/Executor.html executor, @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/core/util/Consumer<https://developer.android.com/reference/android/location/Location.html> consumer )` Asynchronously returns a single current location fix from the given provider. |
| `static void` | `@https://developer.android.com/reference/androidx/annotation/RequiresPermission(anyOf = ) [getCurrentLocation](https://developer.android.com/reference/androidx/core/location/LocationManagerCompat#getCurrentLocation(android.location.LocationManager,java.lang.String,androidx.core.os.CancellationSignal,java.util.concurrent.Executor,androidx.core.util.Consumer<android.location.Location>))( @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/location/LocationManager.html locationManager, @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/lang/String.html provider, @https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/androidx/core/os/CancellationSignal cancellationSignal, @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/util/concurrent/Executor.html executor, @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/core/util/Consumer<https://developer.android.com/reference/android/location/Location.html> consumer )` **This method is deprecated.** Use `https://developer.android.com/reference/androidx/core/location/LocationManagerCompat#getCurrentLocation(android.location.LocationManager,java.lang.String,android.os.CancellationSignal,java.util.concurrent.Executor,androidx.core.util.Consumer<android.location.Location>)` <br /> |
| `static @https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/core/location/LocationManagerCompat#getGnssHardwareModelName(android.location.LocationManager)(@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/location/LocationManager.html locationManager)` Returns the model name (including vendor and hardware/software version) of the GNSS hardware driver, or null if this information is not available. |
| `static int` | `https://developer.android.com/reference/androidx/core/location/LocationManagerCompat#getGnssYearOfHardware(android.location.LocationManager)(@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/location/LocationManager.html locationManager)` Returns the model year of the GNSS hardware and software build, or 0 if the model year is before 2016. |
| `static boolean` | `https://developer.android.com/reference/androidx/core/location/LocationManagerCompat#hasProvider(android.location.LocationManager,java.lang.String)( @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/location/LocationManager.html locationManager, @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/lang/String.html provider )` Returns true if the given location provider exists on this device, irrespective of whether it is currently enabled or not. |
| `static boolean` | `https://developer.android.com/reference/androidx/core/location/LocationManagerCompat#isLocationEnabled(android.location.LocationManager)(@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/location/LocationManager.html locationManager)` Returns the current enabled/disabled state of location. |
| `static boolean` | `@https://developer.android.com/reference/androidx/annotation/RequiresApi(value = https://developer.android.com/reference/android/os/VERSION_CODES.html#N) @https://developer.android.com/reference/androidx/annotation/RequiresPermission(value = "android.permission.ACCESS_FINE_LOCATION") https://developer.android.com/reference/androidx/core/location/LocationManagerCompat#registerGnssMeasurementsCallback(android.location.LocationManager,android.location.GnssMeasurementsEvent.Callback,android.os.Handler)( @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/location/LocationManager.html locationManager, @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/location/GnssMeasurementsEvent.Callback.html callback, @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/os/Handler.html handler )` Registers a GNSS measurement callback. |
| `static boolean` | `@https://developer.android.com/reference/androidx/annotation/RequiresApi(value = https://developer.android.com/reference/android/os/VERSION_CODES.html#N) @https://developer.android.com/reference/androidx/annotation/RequiresPermission(value = "android.permission.ACCESS_FINE_LOCATION") https://developer.android.com/reference/androidx/core/location/LocationManagerCompat#registerGnssMeasurementsCallback(android.location.LocationManager,java.util.concurrent.Executor,android.location.GnssMeasurementsEvent.Callback)( @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/location/LocationManager.html locationManager, @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/util/concurrent/Executor.html executor, @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/location/GnssMeasurementsEvent.Callback.html callback )` Registers a GNSS measurement callback. |
| `static boolean` | `@https://developer.android.com/reference/androidx/annotation/RequiresPermission(value = "android.permission.ACCESS_FINE_LOCATION") https://developer.android.com/reference/androidx/core/location/LocationManagerCompat#registerGnssStatusCallback(android.location.LocationManager,androidx.core.location.GnssStatusCompat.Callback,android.os.Handler)( @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/location/LocationManager.html locationManager, @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/core/location/GnssStatusCompat.Callback callback, @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/os/Handler.html handler )` Registers a platform agnostic `https://developer.android.com/reference/androidx/core/location/GnssStatusCompat.Callback`. |
| `static boolean` | `@https://developer.android.com/reference/androidx/annotation/RequiresPermission(value = "android.permission.ACCESS_FINE_LOCATION") https://developer.android.com/reference/androidx/core/location/LocationManagerCompat#registerGnssStatusCallback(android.location.LocationManager,java.util.concurrent.Executor,androidx.core.location.GnssStatusCompat.Callback)( @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/location/LocationManager.html locationManager, @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/util/concurrent/Executor.html executor, @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/core/location/GnssStatusCompat.Callback callback )` Registers a platform agnostic `https://developer.android.com/reference/androidx/core/location/GnssStatusCompat.Callback`. |
| `static void` | `@https://developer.android.com/reference/androidx/annotation/RequiresPermission(anyOf = ) https://developer.android.com/reference/androidx/core/location/LocationManagerCompat#removeUpdates(android.location.LocationManager,androidx.core.location.LocationListenerCompat)( @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/location/LocationManager.html locationManager, @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/core/location/LocationListenerCompat listener )` Removes all location updates for the specified `https://developer.android.com/reference/android/location/LocationListener.html`. |
| `static void` | `@https://developer.android.com/reference/androidx/annotation/RequiresPermission(anyOf = ) https://developer.android.com/reference/androidx/core/location/LocationManagerCompat#requestLocationUpdates(android.location.LocationManager,java.lang.String,androidx.core.location.LocationRequestCompat,java.util.concurrent.Executor,androidx.core.location.LocationListenerCompat)( @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/location/LocationManager.html locationManager, @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/lang/String.html provider, @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/core/location/LocationRequestCompat locationRequest, @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/util/concurrent/Executor.html executor, @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/core/location/LocationListenerCompat listener )` Register for location updates from the specified provider, using a `https://developer.android.com/reference/androidx/core/location/LocationRequestCompat`, and a callback on the specified `https://developer.android.com/reference/java/util/concurrent/Executor.html`. |
| `static void` | `@https://developer.android.com/reference/androidx/annotation/RequiresPermission(anyOf = ) https://developer.android.com/reference/androidx/core/location/LocationManagerCompat#requestLocationUpdates(android.location.LocationManager,java.lang.String,androidx.core.location.LocationRequestCompat,androidx.core.location.LocationListenerCompat,android.os.Looper)( @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/location/LocationManager.html locationManager, @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/lang/String.html provider, @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/core/location/LocationRequestCompat locationRequest, @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/core/location/LocationListenerCompat listener, @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/os/Looper.html looper )` Register for location updates from the specified provider, using a `https://developer.android.com/reference/androidx/core/location/LocationRequestCompat`, and a callback on the specified `https://developer.android.com/reference/android/os/Looper.html`. |
| `static void` | `@https://developer.android.com/reference/androidx/annotation/RequiresApi(value = https://developer.android.com/reference/android/os/VERSION_CODES.html#N) https://developer.android.com/reference/androidx/core/location/LocationManagerCompat#unregisterGnssMeasurementsCallback(android.location.LocationManager,android.location.GnssMeasurementsEvent.Callback)( @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/location/LocationManager.html locationManager, @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/location/GnssMeasurementsEvent.Callback.html callback )` Unregisters a GNSS measurement callback. |
| `static void` | `https://developer.android.com/reference/androidx/core/location/LocationManagerCompat#unregisterGnssStatusCallback(android.location.LocationManager,androidx.core.location.GnssStatusCompat.Callback)( @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/location/LocationManager.html locationManager, @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/core/location/GnssStatusCompat.Callback callback )` Unregisters a platform agnostic `https://developer.android.com/reference/androidx/core/location/GnssStatusCompat.Callback`. |

## Public methods

### getCurrentLocation

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

```
@RequiresPermission(anyOf = )
public static void getCurrentLocation(
    @NonNull LocationManager locationManager,
    @NonNull String provider,
    @Nullable CancellationSignal cancellationSignal,
    @NonNull Executor executor,
    @NonNull Consumer<Location> consumer
)
```

Asynchronously returns a single current location fix from the given provider. This may activate sensors in order to compute a new location. The given callback will be invoked once and only once, either with a valid location or with a null location if the provider was unable to generate a valid location.

A client may supply an optional `https://developer.android.com/reference/android/os/CancellationSignal.html`. If this is used to cancel the operation, no callback should be expected after the cancellation.

This method may return locations from the very recent past (on the order of several seconds), but will never return older locations (for example, several minutes old or older). Clients may rely upon the guarantee that if this method returns a location, it will represent the best estimation of the location of the device in the present moment.

Clients calling this method from the background may notice that the method fails to determine a valid location fix more often than while in the foreground. Background applications may be throttled in their location accesses to some degree.

### getCurrentLocation

Added in [1.6.0](https://developer.android.com/jetpack/androidx/releases/core#1.6.0) Deprecated in [1.13.0](https://developer.android.com/jetpack/androidx/releases/core#1.13.0)

```
@RequiresPermission(anyOf = )
public static void [getCurrentLocation](https://developer.android.com/reference/androidx/core/location/LocationManagerCompat#getCurrentLocation(android.location.LocationManager,java.lang.String,androidx.core.os.CancellationSignal,java.util.concurrent.Executor,androidx.core.util.Consumer<android.location.Location>))(
    @NonNull LocationManager locationManager,
    @NonNull String provider,
    @Nullable CancellationSignal cancellationSignal,
    @NonNull Executor executor,
    @NonNull Consumer<Location> consumer
)
```

> [!CAUTION]
> **This method is deprecated.**   
>
> Use `https://developer.android.com/reference/androidx/core/location/LocationManagerCompat#getCurrentLocation(android.location.LocationManager,java.lang.String,android.os.CancellationSignal,java.util.concurrent.Executor,androidx.core.util.Consumer<android.location.Location>)`

Asynchronously returns a single current location fix from the given provider. This may activate sensors in order to compute a new location. The given callback will be invoked once and only once, either with a valid location or with a null location if the provider was unable to generate a valid location.

A client may supply an optional `https://developer.android.com/reference/android/os/CancellationSignal.html`. If this is used to cancel the operation, no callback should be expected after the cancellation.

This method may return locations from the very recent past (on the order of several seconds), but will never return older locations (for example, several minutes old or older). Clients may rely upon the guarantee that if this method returns a location, it will represent the best estimation of the location of the device in the present moment.

Clients calling this method from the background may notice that the method fails to determine a valid location fix more often than while in the foreground. Background applications may be throttled in their location accesses to some degree.

### getGnssHardwareModelName

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

```
public static @Nullable String getGnssHardwareModelName(@NonNull LocationManager locationManager)
```

Returns the model name (including vendor and hardware/software version) of the GNSS hardware driver, or null if this information is not available.

No device-specific serial number or ID is returned from this API.

### getGnssYearOfHardware

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

```
public static int getGnssYearOfHardware(@NonNull LocationManager locationManager)
```

Returns the model year of the GNSS hardware and software build, or 0 if the model year is before 2016.

### hasProvider

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

```
public static boolean hasProvider(
    @NonNull LocationManager locationManager,
    @NonNull String provider
)
```

Returns true if the given location provider exists on this device, irrespective of whether it is currently enabled or not. If called on Android Q and below for the `https://developer.android.com/reference/android/location/LocationManager.html#FUSED_PROVIDER`, this method may return incorrect results if the client does not hold at least the `https://developer.android.com/reference/android/Manifest.permission.html#ACCESS_COARSE_LOCATION` permission.

### isLocationEnabled

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

```
public static boolean isLocationEnabled(@NonNull LocationManager locationManager)
```

Returns the current enabled/disabled state of location.

| Returns |
|---|---|
| `boolean` | `true` if location is enabled or `false` if location is disabled |

### registerGnssMeasurementsCallback

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

```
@RequiresApi(value = VERSION_CODES.N)
@RequiresPermission(value = "android.permission.ACCESS_FINE_LOCATION")
public static boolean registerGnssMeasurementsCallback(
    @NonNull LocationManager locationManager,
    @NonNull GnssMeasurementsEvent.Callback callback,
    @NonNull Handler handler
)
```

Registers a GNSS measurement callback. See `https://developer.android.com/reference/android/location/LocationManager.html#registerGnssMeasurementsCallback(android.location.GnssMeasurementsEvent.Callback, android.os.Handler)`.

The primary purpose for this compatibility method is to help avoid crashes when delivering GNSS measurements to client on Android R. This bug was fixed in Android R QPR1, but since it's possible not all Android R devices have upgraded to QPR1, this compatibility method is provided to ensure GNSS measurements can be delivered successfully on all platforms.

### registerGnssMeasurementsCallback

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

```
@RequiresApi(value = VERSION_CODES.N)
@RequiresPermission(value = "android.permission.ACCESS_FINE_LOCATION")
public static boolean registerGnssMeasurementsCallback(
    @NonNull LocationManager locationManager,
    @NonNull Executor executor,
    @NonNull GnssMeasurementsEvent.Callback callback
)
```

Registers a GNSS measurement callback. See `https://developer.android.com/reference/android/location/LocationManager.html#registerGnssMeasurementsCallback(java.util.concurrent.Executor, android.location.GnssMeasurementsEvent.Callback)`.

In addition to allowing the use of Executors on older platforms, this compatibility method also helps avoid crashes when delivering GNSS measurements to clients on Android R. This bug was fixed in Android R QPR1, but since it's possible not all Android R devices have upgraded to QPR1, this compatibility method is provided to ensure GNSS measurements can be delivered successfully on all platforms.

### registerGnssStatusCallback

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

```
@RequiresPermission(value = "android.permission.ACCESS_FINE_LOCATION")
public static boolean registerGnssStatusCallback(
    @NonNull LocationManager locationManager,
    @NonNull GnssStatusCompat.Callback callback,
    @NonNull Handler handler
)
```

Registers a platform agnostic `https://developer.android.com/reference/androidx/core/location/GnssStatusCompat.Callback`. See `https://developer.android.com/reference/android/location/LocationManager.html#addGpsStatusListener(android.location.GpsStatus.Listener)` and `https://developer.android.com/reference/android/location/LocationManager.html#registerGnssStatusCallback(android.location.GnssStatus.Callback, android.os.Handler)`.

| See also |
|---|---|
| `https://developer.android.com/reference/androidx/core/location/LocationManagerCompat#registerGnssStatusCallback(android.location.LocationManager,java.util.concurrent.Executor,androidx.core.location.GnssStatusCompat.Callback)` |   |

### registerGnssStatusCallback

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

```
@RequiresPermission(value = "android.permission.ACCESS_FINE_LOCATION")
public static boolean registerGnssStatusCallback(
    @NonNull LocationManager locationManager,
    @NonNull Executor executor,
    @NonNull GnssStatusCompat.Callback callback
)
```

Registers a platform agnostic `https://developer.android.com/reference/androidx/core/location/GnssStatusCompat.Callback`. See `https://developer.android.com/reference/android/location/LocationManager.html#addGpsStatusListener(android.location.GpsStatus.Listener)` and `https://developer.android.com/reference/android/location/LocationManager.html#registerGnssStatusCallback(java.util.concurrent.Executor, android.location.GnssStatus.Callback)`.

Internally, this API will always utilize GnssStatus APIs and instances on Android N and above, and will always utilize GpsStatus APIs and instances below Android N. Callbacks will always occur on the given executor.

If invoked on Android M or below, this will result in GpsStatus registration being run on either the current Looper or main Looper. If the thread this function is invoked on is different from that Looper, the caller must ensure that the Looper thread cannot be blocked by the thread this function is invoked on. The easiest way to avoid this is to ensure this function is invoked on a Looper thread.

| Throws |
|---|---|
| `https://developer.android.com/reference/java/lang/IllegalStateException.html` | on Android M or below, if the current Looper or main Looper is blocked by the thread this function is invoked on |

### removeUpdates

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

```
@RequiresPermission(anyOf = )
public static void removeUpdates(
    @NonNull LocationManager locationManager,
    @NonNull LocationListenerCompat listener
)
```

Removes all location updates for the specified `https://developer.android.com/reference/android/location/LocationListener.html`.

See `https://developer.android.com/reference/android/location/LocationManager.html#removeUpdates(android.location.LocationListener)` for more information.

### requestLocationUpdates

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

```
@RequiresPermission(anyOf = )
public static void requestLocationUpdates(
    @NonNull LocationManager locationManager,
    @NonNull String provider,
    @NonNull LocationRequestCompat locationRequest,
    @NonNull Executor executor,
    @NonNull LocationListenerCompat listener
)
```

Register for location updates from the specified provider, using a `https://developer.android.com/reference/androidx/core/location/LocationRequestCompat`, and a callback on the specified `https://developer.android.com/reference/java/util/concurrent/Executor.html`.

See `https://developer.android.com/reference/android/location/LocationManager.html#requestLocationUpdates(java.lang.String, android.location.LocationRequest, java.util.concurrent.Executor, android.location.LocationListener)` for more information.

### requestLocationUpdates

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

```
@RequiresPermission(anyOf = )
public static void requestLocationUpdates(
    @NonNull LocationManager locationManager,
    @NonNull String provider,
    @NonNull LocationRequestCompat locationRequest,
    @NonNull LocationListenerCompat listener,
    @NonNull Looper looper
)
```

Register for location updates from the specified provider, using a `https://developer.android.com/reference/androidx/core/location/LocationRequestCompat`, and a callback on the specified `https://developer.android.com/reference/android/os/Looper.html`.

See `https://developer.android.com/reference/android/location/LocationManager.html#requestLocationUpdates(java.lang.String, android.location.LocationRequest, java.util.concurrent.Executor, android.location.LocationListener)` for more information.

### unregisterGnssMeasurementsCallback

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

```
@RequiresApi(value = VERSION_CODES.N)
public static void unregisterGnssMeasurementsCallback(
    @NonNull LocationManager locationManager,
    @NonNull GnssMeasurementsEvent.Callback callback
)
```

Unregisters a GNSS measurement callback. See `https://developer.android.com/reference/android/location/LocationManager.html#unregisterGnssMeasurementsCallback(android.location.GnssMeasurementsEvent.Callback)`.

### unregisterGnssStatusCallback

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

```
public static void unregisterGnssStatusCallback(
    @NonNull LocationManager locationManager,
    @NonNull GnssStatusCompat.Callback callback
)
```

Unregisters a platform agnostic `https://developer.android.com/reference/androidx/core/location/GnssStatusCompat.Callback`. See `https://developer.android.com/reference/android/location/LocationManager.html#removeGpsStatusListener(android.location.GpsStatus.Listener)` and `https://developer.android.com/reference/android/location/LocationManager.html#unregisterGnssStatusCallback(android.location.GnssStatus.Callback)`.