# GnssNavigationMessage.Callback

Added in[API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  
Summary:[Constants](https://developer.android.com/reference/android/location/GnssNavigationMessage.Callback#constants)\|[Ctors](https://developer.android.com/reference/android/location/GnssNavigationMessage.Callback#pubctors)\|[Methods](https://developer.android.com/reference/android/location/GnssNavigationMessage.Callback#pubmethods)\|[Inherited Methods](https://developer.android.com/reference/android/location/GnssNavigationMessage.Callback#inhmethods)  

# GnssNavigationMessage.Callback

*** ** * ** ***

[Kotlin](https://developer.android.com/reference/kotlin/android/location/GnssNavigationMessage.Callback "View this page in Kotlin")\|Java

`
public
static

abstract
class
GnssNavigationMessage.Callback
`  
`

extends `[Object](https://developer.android.com/reference/java/lang/Object)`


``


`

|---|-------------------------------------------------|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object) ||
| ↳ | android.location.GnssNavigationMessage.Callback |

<br />

*** ** * ** ***

Used for receiving GNSS satellite Navigation Messages from the GNSS engine.

You can implement this interface and call[LocationManager.registerGnssNavigationMessageCallback](https://developer.android.com/reference/android/location/LocationManager#registerGnssNavigationMessageCallback(android.location.GnssNavigationMessage.Callback)).

## Summary

|                                                                                                  ### Constants                                                                                                  ||
|-------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `int` | [STATUS_LOCATION_DISABLED](https://developer.android.com/reference/android/location/GnssNavigationMessage.Callback#STATUS_LOCATION_DISABLED) *This constant was deprecated in API level 31. Do not use.* |
| `int` | [STATUS_NOT_SUPPORTED](https://developer.android.com/reference/android/location/GnssNavigationMessage.Callback#STATUS_NOT_SUPPORTED) *This constant was deprecated in API level 31. Do not use.*         |
| `int` | [STATUS_READY](https://developer.android.com/reference/android/location/GnssNavigationMessage.Callback#STATUS_READY) *This constant was deprecated in API level 31. Do not use.*                         |

|                                                  ### Public constructors                                                  ||
|------------------------------------------------------------------------------------------------------------------------|---|
| ` `[Callback](https://developer.android.com/reference/android/location/GnssNavigationMessage.Callback#Callback())`() ` |

|                                                                                                                                                                                                                                                                                                     ### Public methods                                                                                                                                                                                                                                                                                                     ||
|---------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` void` | ` `[onGnssNavigationMessageReceived](https://developer.android.com/reference/android/location/GnssNavigationMessage.Callback#onGnssNavigationMessageReceived(android.location.GnssNavigationMessage))`(`[GnssNavigationMessage](https://developer.android.com/reference/android/location/GnssNavigationMessage)` event) ` Returns the latest collected GNSS Navigation Message.                                                                                                                                                                                                                                   |
| ` void` | ` `[onStatusChanged](https://developer.android.com/reference/android/location/GnssNavigationMessage.Callback#onStatusChanged(int))`(int status) ` *This method was deprecated in API level 31. Do not rely on this callback. From Android S onwards this callback will be invoked once with[STATUS_READY](https://developer.android.com/reference/android/location/GnssNavigationMessage.Callback#STATUS_READY)in all cases for backwards compatibility, and then never invoked again. Use LocationManager APIs if you need to determine if GNSS navigation messages are supported or if location is off, etc...* |

| ### Inherited methods |
|-----------------------|---|
| From class` `[java.lang.Object](https://developer.android.com/reference/java/lang/Object)` ` |--------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ` `[Object](https://developer.android.com/reference/java/lang/Object)          | ` `[clone](https://developer.android.com/reference/java/lang/Object#clone())`() ` Creates and returns a copy of this object.                                                                                                                                                      | | ` boolean`                                                                     | ` `[equals](https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object))`(`[Object](https://developer.android.com/reference/java/lang/Object)` obj) ` Indicates whether some other object is "equal to" this one.                                           | | ` void`                                                                        | ` `[finalize](https://developer.android.com/reference/java/lang/Object#finalize())`() ` Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.                                                          | | ` final `[Class](https://developer.android.com/reference/java/lang/Class)`<?>` | ` `[getClass](https://developer.android.com/reference/java/lang/Object#getClass())`() ` Returns the runtime class of this`Object`.                                                                                                                                                | | ` int`                                                                         | ` `[hashCode](https://developer.android.com/reference/java/lang/Object#hashCode())`() ` Returns a hash code value for the object.                                                                                                                                                 | | ` final void`                                                                  | ` `[notify](https://developer.android.com/reference/java/lang/Object#notify())`() ` Wakes up a single thread that is waiting on this object's monitor.                                                                                                                            | | ` final void`                                                                  | ` `[notifyAll](https://developer.android.com/reference/java/lang/Object#notifyAll())`() ` Wakes up all threads that are waiting on this object's monitor.                                                                                                                         | | ` `[String](https://developer.android.com/reference/java/lang/String)          | ` `[toString](https://developer.android.com/reference/java/lang/Object#toString())`() ` Returns a string representation of the object.                                                                                                                                            | | ` final void`                                                                  | ` `[wait](https://developer.android.com/reference/java/lang/Object#wait(long,%20int))`(long timeoutMillis, int nanos) ` Causes the current thread to wait until it is awakened, typically by being*notified* or*interrupted*, or until a certain amount of real time has elapsed. | | ` final void`                                                                  | ` `[wait](https://developer.android.com/reference/java/lang/Object#wait(long))`(long timeoutMillis) ` Causes the current thread to wait until it is awakened, typically by being*notified* or*interrupted*, or until a certain amount of real time has elapsed.                   | | ` final void`                                                                  | ` `[wait](https://developer.android.com/reference/java/lang/Object#wait())`() ` Causes the current thread to wait until it is awakened, typically by being*notified* or*interrupted*.                                                                                             | ||

## Constants

### STATUS_LOCATION_DISABLED

Added in[API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  
Deprecated in[API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public static final int STATUS_LOCATION_DISABLED
```

<br />

**This constant was deprecated in API level 31.**   
Do not use.

GNSS provider or Location is disabled, updated will not be received until they are enabled.

<br />

Constant Value: 2 (0x00000002)  

### STATUS_NOT_SUPPORTED

Added in[API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  
Deprecated in[API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public static final int STATUS_NOT_SUPPORTED
```

<br />

**This constant was deprecated in API level 31.**   
Do not use.

The system does not support tracking of GNSS Navigation Messages. This status will not change in the future.

<br />

Constant Value: 0 (0x00000000)  

### STATUS_READY

Added in[API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  
Deprecated in[API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public static final int STATUS_READY
```

<br />

**This constant was deprecated in API level 31.**   
Do not use.

GNSS Navigation Messages are successfully being tracked, it will receive updates once they are available.

<br />

Constant Value: 1 (0x00000001)

## Public constructors

### Callback

Added in[API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public Callback ()
```

<br />

<br />

## Public methods

### onGnssNavigationMessageReceived

Added in[API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public void onGnssNavigationMessageReceived (GnssNavigationMessage event)
```

Returns the latest collected GNSS Navigation Message.

<br />

|               Parameters                ||
|---------|--------------------------------|
| `event` | `GnssNavigationMessage` <br /> |

### onStatusChanged

Added in[API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  
Deprecated in[API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public void onStatusChanged (int status)
```

<br />

**This method was deprecated in API level 31.**   
Do not rely on this callback. From Android S onwards this callback will be invoked once with[STATUS_READY](https://developer.android.com/reference/android/location/GnssNavigationMessage.Callback#STATUS_READY)in all cases for backwards compatibility, and then never invoked again. Use LocationManager APIs if you need to determine if GNSS navigation messages are supported or if location is off, etc...

Returns the latest status of the GNSS Navigation Messages sub-system.

<br />

|                                                                                                                                                                                                                Parameters                                                                                                                                                                                                                 ||
|----------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `status` | `int`: Value is[STATUS_NOT_SUPPORTED](https://developer.android.com/reference/android/location/GnssNavigationMessage.Callback#STATUS_NOT_SUPPORTED),[STATUS_READY](https://developer.android.com/reference/android/location/GnssNavigationMessage.Callback#STATUS_READY), or[STATUS_LOCATION_DISABLED](https://developer.android.com/reference/android/location/GnssNavigationMessage.Callback#STATUS_LOCATION_DISABLED) <br /> |