Мы получаем ошибку при получении местоположения в некоторых телефонах VIVO.
DEVELOPER_ERROR (statusCode = 10)
в классе LocationSettingsResult callback
Ниже приведен код.
if (locationSettingsResult != null) {
locationSettingsResult.setResultCallback(locationSettingsResult1 -> {
final Status status = locationSettingsResult1.getStatus();
switch (status.getStatusCode()) {
case LocationSettingsStatusCodes.SUCCESS:
showRemarksDialogIfRequired();
break;
case LocationSettingsStatusCodes.RESOLUTION_REQUIRED:
try {
if (status.hasResolution()) {
status.startResolutionForResult(parentActivity, 333);
}
} catch (IntentSender.SendIntentException e) {
// Ignore the error.
e.printStackTrace();
}
break;
case LocationSettingsStatusCodes.SETTINGS_CHANGE_UNAVAILABLE:
Toast.makeText(parentActivity, "Can not set GPS settings for location!!!", Toast.LENGTH_SHORT).show();
break;
}
});
}