I believe that by the debugger there is no pre-defined function for such a thing, but you can create a if
and force her to be false
, for example your code should be something like:
if (locationManager.isProviderEnabled(LocationManager.GPS_PROVIDER)){
//Código com GPS
} else {
//Código sem GPS
}
If you want to pretend that the GPS is not active do something like (apply the false
):
if (false && locationManager.isProviderEnabled(LocationManager.GPS_PROVIDER)){
//Código com GPS
} else {
//Código sem GPS
}
Or you can simply comment on this line in the manifest:
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
And leave it at that:
<!-- uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" / -->
Thanks, I ended up forgetting that could deny the existence of the GPS in the device, thanks.
– Giancarlo Abel Giulian