Android Question Can you get raw NMEA sentences from GPS receiver?

Discussion in 'Android Questions' started by tmf, Jun 26, 2015.

  1. tmf

    tmf Member Licensed User

    In an Android device with GPS receiver can you get the raw NMEA sentences?

    Richard.
     
  2. Troberg

    Troberg Well-Known Member Licensed User

    Something like this:

    Code:
    Sub Class_Globals
        
    Private MyGPS As GPS
    End Sub

    Public Sub Initialize
        MyGPS.Initialize(
    "MyGPS")
        
    If MyGPS.GPSEnabled = False Then
            
    StartActivity(MyGPS.LocationSettingsIntent) 'Will open the relevant settings screen.
        Else
            MyGPS.Start(
    00)
        
    End If
    End Sub

    Public Sub Destroy()
        MyGPS.Stop
    End Sub

    Private Sub MyGPS_NMEA (TimeStamp As Long, Sentence As String)
       
    Log(Sentence)
    End Sub
    Edit: Note: Destroy is not called by default, you'll have to call it manually to dispose of the class when you don't need it anymore.
     
Loading...