This is strange. I mean, I have a strong network and GPS is turned on, but it asks for Wi-Fi!
I am using a new Api location with class FusedLocationProviderClient.
Here's how I check if location settings are enabled or not:
private void checkIfLocationSettingsAreEnabled() {
LocationRequest locationRequest = new LocationRequest();
locationRequest.setPriority(LocationRequest.PRIORITY_BALANCED_POWER_ACCURACY);
locationRequest.setInterval(10000);
locationRequest.setFastestInterval(5000);
LocationSettingsRequest.Builder builder = new LocationSettingsRequest.Builder();
builder.addLocationRequest(locationRequest);
builder.setAlwaysShow(true);
SettingsClient client = LocationServices.getSettingsClient(context);
Task<LocationSettingsResponse> locationSettingsResponseTask = client.checkLocationSettings(builder.build());
locationSettingsResponseTask.addOnSuccessListener(locationSettingsResponse -> {
getLastKnownLocation();
});
locationSettingsResponseTask.addOnFailureListener(e -> {
if (e instanceof ResolvableApiException) {
myLocationListener.onResolutionNeeded(e);
} else {
myLocationListener.onLocationFailure(e);
}
});
}
With the code above, I can get the image below:

But then, after clicking OK, I call again checkIfSettingsAreEnabled(), this shows another popup, as shown below:

I wonder why the inclusion of Wi-Fi is mandatory, even if I am in a desert safari, where there is no Wi-Fi to connect to it.
Is there a way to Skip this option Wifiand work as usual like Google Maps?
, Google Maps PRIORITY_HIGH_ACCURACY , , , Wi-Fi.