checkStatus returns true even if GPS is in battery saving or device only (sensors only) mode and not in high accuracy
When calling checkStatus, locationServicesEnabled is true even if GPS is in battery saving or device only mode. Ideally it should return respective value so that one can show prompt accordingly.
I tried the same with Google Maps on Android and it prompts me to turn on GPS if my GPS is not in high accuracy mode i.e. battery saving or device only.
Your Environment
- Plugin version: 0.5.0-alpha.42
- Platform: Android
- OS version: 9
- Device manufacturer and model: Xiaomi Mi 5 running Syberia Custom ROM
- React Native version: 0.56.0
- React version: 16.5.2
- Plugin configuration options:
- Link to your project:
Context
I use this option to show prompt to user to enable location services. But I am unable to do so if user GPS is in battery saving state
Expected Behavior
Just like Google Maps, I should be able to see if GPS is not in High Accuracy mode and act accordingly.
Actual Behavior
checkStatus returns true even if GPS is in battery saving state, which makes it impossible to know if high accuracy is enabled.
Possible Fix
Steps to Reproduce
1. 2. 3. 4.
Context
Debug logs
Plugin will use best enabled location provider. In case of battery saving mode, it could be either network, bluetooth or wifi.
You can check what provider was used from location event - provider prop.
Currently there is no other way to check what providers are enabled/disabled. Maybe checkStatus method can be extended to provide such a information.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This issue has been automatically closed, because it has not had recent activity. If you believe this issue shouldn't be closed, please reopen or write down a comment requesting issue reopening with explanation why you think it's important. Thank you for your contributions.