Jagan
Jagan

Reputation: 128

How To Get NMEA Sentence of GPRMC in my application?

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

Answers (2)

Janusz
Janusz

Reputation: 1

Probably you have to add android.permission.ACCESS_FINE_LOCATION

Upvotes: 0

Jaycee
Jaycee

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

Related Questions