-
Notifications
You must be signed in to change notification settings - Fork 12
Description
Feature Request
Plugin
Geolocation
Description
In order to check whether a user has allowed the app permission to access location we have to have them first turn on the device geolocation permission. While both are needed to request an actual location (getCurrentPosition), there is no reason that a user needs to enable the device location in order to read the state of the app permission. This causes extra steps and confusion in order to display the current permissions and prompt for allowing permissions if needed.
Platform(s)
All
Preferred Solution
Split the Geolocation.checkPermissions() function into multiple functions:
Geolocation.checkAppPermissions() - Checks if the user has enabled accessing location to the application
Geolocation.checkDevicePermissions() - Checks if the user has turned on Location functionality for the whole device.
Possibly a backwards compatibility function, deprecated, as well as a helper that wraps the two in order to check if calls to getCurrentPosition and the other functions will succeed.
Alternatives
Additional Context
requestPermissions probably also needs to be split up in a similar fashion.