Riscrivo così:
B4X:Sub gpsActive(Tim As Long, Dis As Float) If GPS1 = Null Then GPS1.Initialize("GPS") tl.Initialize else If GPS1.GPSEnabled = False Then ToastMessageShow("GPS disabilitato.", True) StartActivity(GPS1.LocationSettingsIntent) GPS1.Start(Tim,Dis) End If end sub
fatto ma la bomba persiste qui
B4X:
If GPS1.GPSEnabled = False Then