Stay organized with collections
Save and categorize content based on your preferences.
OnNmeaMessageListener
interface 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 Unit |
Called when an NMEA message is received.
|
Public methods
onNmeaMessage
abstract fun onNmeaMessage(
message: String!,
timestamp: Long
): Unit
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](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nOnNmeaMessageListener\n=====================\n\n*** ** * ** ***\n\nKotlin \\|[Java](/reference/android/location/OnNmeaMessageListener \"View this page in Java\") \n\n```\ninterface OnNmeaMessageListener\n```\n\n|---------------------------------------------|\n| [android.location.OnNmeaMessageListener](#) |\n\nUsed 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](http://en.wikipedia.org/wiki/NMEA_0183) for more details. You can implement this interface and call [LocationManager.addNmeaListener(Executor, OnNmeaMessageListener)](/reference/kotlin/android/location/LocationManager#addNmeaListener(java.util.concurrent.Executor,%20android.location.OnNmeaMessageListener)) to receive NMEA data from the GNSS engine.\n\nSummary\n-------\n\n| Public methods ||\n|---------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| abstract [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [onNmeaMessage](#onNmeaMessage(kotlin.String,%20kotlin.Long))`(`message:` `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)!`, `timestamp:` `[Long](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html)`)` Called when an NMEA message is received. |\n\nPublic methods\n--------------\n\n### onNmeaMessage\n\nAdded in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nabstract fun onNmeaMessage(\n message: String!, \n timestamp: Long\n): Unit\n```\n\nCalled when an NMEA message is received.\n\n| Parameters ||\n|-------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `message` | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)!: NMEA message |\n| `timestamp` | [Long](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html): 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 |"]]