Stay organized with collections
Save and categorize content based on your preferences.
OnNmeaMessageListener
public
interface
OnNmeaMessageListener
android.location.OnNmeaMessageListener
|
Used for receiving NMEA sentences from the GNSS.
NMEA 0183 is a standard for communicating with marine electronic devices
and is a common method for receiving data from a GNSS, typically over a serial port.
See NMEA 0183 for more details.
You can implement this interface and call
LocationManager.addNmeaListener(Executor, OnNmeaMessageListener)
to receive NMEA data
from the GNSS engine.
Summary
Public methods |
abstract
void
|
onNmeaMessage(String message, long timestamp)
Called when an NMEA message is received.
|
Public methods
onNmeaMessage
public abstract void onNmeaMessage (String message,
long timestamp)
Called when an NMEA message is received.
Parameters |
message |
String : NMEA message |
timestamp |
long : Timestamp of the location fix, as reported by the GNSS chipset. The value
is specified in Unix time milliseconds since 1st January 1970, 00:00:00 UTC |
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-10 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-02-10 UTC."],[],[],null,["# OnNmeaMessageListener\n\nAdded in [API level 24](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\nOnNmeaMessageListener\n=====================\n\n*** ** * ** ***\n\n[Kotlin](/reference/kotlin/android/location/OnNmeaMessageListener \"View this page in Kotlin\") \\|Java\n\n\n`\npublic\n\n\ninterface\nOnNmeaMessageListener\n`\n\n\n`\n\n\n`\n\n|----------------------------------------|\n| android.location.OnNmeaMessageListener |\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\nUsed for receiving NMEA sentences from the GNSS.\nNMEA 0183 is a standard for communicating with marine electronic devices\nand is a common method for receiving data from a GNSS, typically over a serial port.\nSee [NMEA 0183](http://en.wikipedia.org/wiki/NMEA_0183) for more details.\nYou can implement this interface and call\n[LocationManager.addNmeaListener(Executor, OnNmeaMessageListener)](/reference/android/location/LocationManager#addNmeaListener(java.util.concurrent.Executor,%20android.location.OnNmeaMessageListener)) to receive NMEA data\nfrom the GNSS engine.\n\nSummary\n-------\n\n| ### Public methods ||\n|------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ` abstract void` | ` `[onNmeaMessage](/reference/android/location/OnNmeaMessageListener#onNmeaMessage(java.lang.String,%20long))`(`[String](/reference/java/lang/String)` message, long timestamp) ` Called when an NMEA message is received. |\n\nPublic methods\n--------------\n\n### onNmeaMessage\n\nAdded in [API level 24](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\n```\npublic abstract void onNmeaMessage (String message, \n long timestamp)\n```\n\nCalled when an NMEA message is received.\n\n\u003cbr /\u003e\n\n| Parameters ||\n|-------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `message` | `String`: NMEA message \u003cbr /\u003e |\n| `timestamp` | `long`: Timestamp of the location fix, as reported by the GNSS chipset. The value is specified in Unix time milliseconds since 1st January 1970, 00:00:00 UTC \u003cbr /\u003e |"]]