Skip to content

Android location access: User cannot choose "Allow all the time" #688

@speckro

Description

@speckro

First I want to thank you for providing this plugin!

Environment

Android API level 29

Context

When the user is asked how the device is allowed to access the location, no option "Allow all the time" is shown.

Expected Behavior

The following location access options should be shown to the user:

  • Allow all the time
  • Allow only while using the app
  • Deny & don't ask again

Actual Behavior

The following location access options are currently shown to the user:

  • Allow only while using the app
  • Deny
  • Deny & don't ask again

Possible Fix

Update array PERMISSIONS inside file BackgroundGeolocationFacade.java

public static final String[] PERMISSIONS = {
        Manifest.permission.ACCESS_COARSE_LOCATION,
        Manifest.permission.ACCESS_FINE_LOCATION,
        Manifest.permission.ACCESS_BACKGROUND_LOCATION
        
};

Also see Android docs. "If your app targets Android 10 or higher, you must declare the ACCESS_BACKGROUND_LOCATION permission ...".

Steps to Reproduce

Use plugin with Android API level 29 and check location access dialog.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions