Hi!
Can anyone tell me why this code doesn´t work. I try only to assign the actual Lat Value to an existing DB-field (txtGPS). But there is nothing assigned in txtGPS.
Can anyone tell me why this code doesn´t work. I try only to assign the actual Lat Value to an existing DB-field (txtGPS). But there is nothing assigned in txtGPS.
B4X:
Sub BPosition_Click
Dim Location1 As Location
ToastMessageShow("starte", True)
If GPS1.IsInitialized = False Then GPS1.Initialize("GPS")
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.
txtGPS.text = "Lat = " & Location1.ConvertToMinutes(Location1.Latitude)
End If
End Sub