Open rameshkec85 opened 5 years ago
anyone help this issue ? i also get this issue on my devices
Having same issue, also reported on stack overflow as, https://stackoverflow.com/q/55550481/4856761
Reproduced on Redmi 4X Nougat and Droid Turbo Marshmallow
Anyone who got the solution? Why this official sample is having problems? Anyone?
Hello guys,
We faced the same issue this week and here are our conclusions on this subject :
There is a problem with the Google popup from ResolvableApiException called by this :
final int REQUEST_CHECK_SETTINGS = 1026;
ResolvableApiException resolvable = (ResolvableApiException) exception;
resolvable.startResolutionForResult(this, REQUEST_CHECK_SETTINGS);
So, before Android 9.0 Pie there were 3 levels of localisation accuracy that the user can define in his own settings of the device :
In the case that you need PRIORITY_HIGH_ACCURACY settings:
It seems fixed on Android 9.0 since the modes were deleted from the settings and the system handle everything correctly.
The main issue is that the Google popup can't switch to HIGH accuracy mode when location is ON. Even worse, if you ask PRIORITY_BALANCED_POWER_ACCURACY for instance and the location service is OFF, the popup will turn on the location service in the ONLY GPS mode even if the user did select HIGH_ACCURACY previously. In this case if other apps ask for PRIORITY_HIGH_ACCURACY it will fail. Only the user can switch on the HIGH accuracy mode again in the settings.
That's why we don't use this popup on Android < 9.0 Pie instead, we ask the user to turn ON the HIGH accuracy mode by himself.
I don't know if it can be fix otherwise, if someone has another workaround please let me know.
I have implemented Location settings popup to set High Accuracy. But it always toggles between Battery Saving mode and Phone Only mode, not set to High Accuracy mode forever. \
Device : Samsung Galaxy S9,One plus 3T OS: 8.0.0