Beta V0.90.03 is online

Erel

B4X founder
Staff member
Licensed User
Longtime User
A new update is available. I know that the updates are released pretty frequently. You can of course choose to skip a few.
This update fixes most of the bugs discussed in the forum as well as others.
The first version of the GPS library is also included.

An example is attached.
This is the code:
B4X:
Sub Process_Globals
    Dim GPS1 As GPS
End Sub

Sub Globals
    Dim lblLon As Label
    Dim lblLat As Label
    Dim lblSpeed As Label
End Sub

Sub Activity_Create(FirstTime As Boolean)
    If FirstTime Then
        GPS1.Initialize("GPS")
    End If
    Activity.LoadLayout("1")
End Sub

Sub Activity_Resume
    If GPS1.GPSEnabled = False Then
        ToastMessageShow("Please enable the GPS device.", True)
        StartActivity(GPS1.LocationSettingsIntent) 'Will open the relevant settings screen.
    Else
        GPS1.Start(0, 0) 'Listen to GPS with no filters.
    End If
End Sub
Sub Activity_Pause (UserClosed As Boolean)
    GPS1.Stop
End Sub
Sub GPS_LocationChanged (Location1 As Location)
    lblLat.Text = "Lat = " & Location1.ConvertToMinutes(Location1.Latitude)
    lblLon.Text = "Lon = " & Location1.ConvertToMinutes(Location1.Longitude)
    lblSpeed.Text = "Speed = " & Location1.Speed
End Sub
Sub GPS_UserEnabled (Enabled As Boolean)
    ToastMessageShow("GPS device enabled = " & Enabled, True)
End Sub
 

Attachments

  • GPS.zip
    5.7 KB · Views: 196

derez

Expert
Licensed User
Longtime User
Excelent, it works on the emulator with gps fix and nmea commands :)
 

Cor

Active Member
Licensed User
Longtime User
When running gps demo
and after loading another program in IDE which does not use the GPS lib
it stays checked at the Libraries

grCor

ps
are the libraries includes in the compiles version when checked?
I presume yes
 
Top