summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--api/current.xml49
-rw-r--r--location/java/android/location/GpsStatus.java9
-rw-r--r--location/java/android/location/LocationManager.java8
3 files changed, 57 insertions, 9 deletions
diff --git a/api/current.xml b/api/current.xml
index 04b7c9a..9a635f6 100644
--- a/api/current.xml
+++ b/api/current.xml
@@ -72101,6 +72101,29 @@
</parameter>
</method>
</interface>
+<interface name="GpsStatus.NmeaListener"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="onNmeaReceived"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="timestamp" type="long">
+</parameter>
+<parameter name="nmea" type="java.lang.String">
+</parameter>
+</method>
+</interface>
<class name="Location"
extends="java.lang.Object"
abstract="false"
@@ -72704,6 +72727,19 @@
<parameter name="listener" type="android.location.GpsStatus.Listener">
</parameter>
</method>
+<method name="addNmeaListener"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="listener" type="android.location.GpsStatus.NmeaListener">
+</parameter>
+</method>
<method name="addProximityAlert"
return="void"
abstract="false"
@@ -72914,6 +72950,19 @@
<parameter name="listener" type="android.location.GpsStatus.Listener">
</parameter>
</method>
+<method name="removeNmeaListener"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="listener" type="android.location.GpsStatus.NmeaListener">
+</parameter>
+</method>
<method name="removeProximityAlert"
return="void"
abstract="false"
diff --git a/location/java/android/location/GpsStatus.java b/location/java/android/location/GpsStatus.java
index 883ee4f..ce69ac1 100644
--- a/location/java/android/location/GpsStatus.java
+++ b/location/java/android/location/GpsStatus.java
@@ -116,9 +116,12 @@ public final class GpsStatus {
}
/**
- * Used for receiving NMEA data from the GPS.
- *
- * {@hide}
+ * Used for receiving NMEA sentences from the GPS.
+ * NMEA 0183 is a standard for communicating with marine electronic devices
+ * and is a common method for receiving data from a GPS, typically over a serial port.
+ * See <a href="http://en.wikipedia.org/wiki/NMEA_0183">NMEA 0183</a> for more details.
+ * You can implement this interface and call {@link LocationManager#addNmeaListener}
+ * to receive NMEA data from the GPS engine.
*/
public interface NmeaListener {
void onNmeaReceived(long timestamp, String nmea);
diff --git a/location/java/android/location/LocationManager.java b/location/java/android/location/LocationManager.java
index 8f17e78..8f0352d 100644
--- a/location/java/android/location/LocationManager.java
+++ b/location/java/android/location/LocationManager.java
@@ -1276,13 +1276,11 @@ public class LocationManager {
/**
* Adds an NMEA listener.
*
- * @param listener NMEA listener object to register
+ * @param listener a {#link GpsStatus.NmeaListener} object to register
*
* @return true if the listener was successfully added
*
* @throws SecurityException if the ACCESS_FINE_LOCATION permission is not present
- *
- * {@hide}
*/
public boolean addNmeaListener(GpsStatus.NmeaListener listener) {
boolean result;
@@ -1308,9 +1306,7 @@ public class LocationManager {
/**
* Removes an NMEA listener.
*
- * @param listener NMEA listener object to remove
- *
- * {@hide}
+ * @param listener a {#link GpsStatus.NmeaListener} object to remove
*/
public void removeNmeaListener(GpsStatus.NmeaListener listener) {
try {