Sub gpsActive(Tim As Long, Dis As Float) As Boolean
' If GPS1 = Null Then
GPS1.Initialize("GPS")
tl.Initialize
' End If
Try
If GPS1.GPSEnabled = False Then
ToastMessageShow("GPS disabilitato.", True)
StartActivity(GPS1.LocationSettingsIntent)
GPS1.Start(Tim,Dis)
Return True
Else
GPS1.Start(Tim,Dis)
Return True
End If
Catch
ToastMessageShow("Error GPS " & LastException.Message , True)
Return False
End Try
End Sub