GnssNavigationMessage.Callback


public static abstract class GnssNavigationMessage.Callback
extends Object

java.lang.Object
   ↳ android.location.GnssNavigationMessage.Callback


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

You can implement this interface and call LocationManager.registerGnssNavigationMessageCallback.

Summary

Constants

int STATUS_LOCATION_DISABLED

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

int STATUS_NOT_SUPPORTED

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

int STATUS_READY

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

Public constructors

Callback()

Public methods

void onGnssNavigationMessageReceived(GnssNavigationMessage event)

Returns the latest collected GNSS Navigation Message.

void onStatusChanged(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 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

Object clone()

Creates and returns a copy of this object.

boolean equals(Object obj)

Indicates whether some other object is "equal to" this one.

void finalize()

Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.

final Class<?> getClass()

Returns the runtime class of this Object.

int hashCode()

Returns a hash code value for the object.

final void notify()

Wakes up a single thread that is waiting on this object's monitor.

final void notifyAll()

Wakes up all threads that are waiting on this object's monitor.

String toString()

Returns a string representation of the object.

final void wait(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(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()

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
Deprecated in API level 31
public static final int STATUS_LOCATION_DISABLED

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.

Constant Value: 2 (0x00000002)

STATUS_NOT_SUPPORTED

Added in API level 24
Deprecated in API level 31
public static final int STATUS_NOT_SUPPORTED

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.

Constant Value: 0 (0x00000000)

STATUS_READY

Added in API level 24
Deprecated in API level 31
public static final int STATUS_READY

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.

Constant Value: 1 (0x00000001)

Public constructors

Callback

Added in API level 24
public Callback ()

Public methods

onGnssNavigationMessageReceived

Added in API level 24
public void onGnssNavigationMessageReceived (GnssNavigationMessage event)

Returns the latest collected GNSS Navigation Message.

Parameters
event GnssNavigationMessage

onStatusChanged

Added in API level 24
Deprecated in API level 31
public void onStatusChanged (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 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.

Parameters
status int: Value is STATUS_NOT_SUPPORTED, STATUS_READY, or STATUS_LOCATION_DISABLED