TurnGPS
This will cause the user to see the setup screen to turn on the GPS. Apparently, after version 2.2, you can not use the TurnOn lib. If you are developing for pre-version 2.2, you can put TurnOn.TurnGPSOn above the ToastMessageShow below.
'Global
Dim GPSIsAvailable as boolean : GPSIsAvailable = True 'assume it is there
If GPS1.GPSEnabled = False AND GPSIsAvailable Then
ToastMessageShow("Please enable the GPS device.", True)
StartActivity(GPS1.LocationSettingsIntent) 'Will open the relevant settings screen.
If GPS1.GPSEnabled Then
GPSIsAvailable = True
Else
GPSIsAvailable = False 'don't try again.
End If
Else
GPS1.Start(0, 0) 'Listen to GPS with no filters.
End If