Skip to content

Split application permissions and device permissions into seperate checksΒ #44

@DTCleanBrain

Description

@DTCleanBrain

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions