Reputation: 128
I am developing a GPS app in that, I used location manager and able get the longitude and Latitude ... But, I need the NMEA 0183 format sentence for sending to the server.. how can I get that sentence help me if any one knows that
Thanks for reading
Upvotes: 4
Views: 6995
Reputation: 142
Hi you may get nmea sentence by adding NmeaListener, here is how to get
LocationManager locationmanager;
locationManager = (LocationManager) getSystemService(LOCATION_SERVICE);
locationManager.addNmeaListener(new NmeaListener() {
public void onNmeaReceived(long timestamp, String nmea) {
Log.d(TAG,"Nmea Received :");
Log.d(TAG,"Timestamp is :" +timestamp+" nmea is :"+nmea);
}});
please note that you get all of nmea sentences like GPGGA..etc.,
Upvotes: 3