For Android 11+ a new location permission was added: "ACCESS_BACKGROUND_LOCATION"
In order to work in the background (e.g from a background service) you have to add that permission to the manifest.
Additionaly it is necessary to ask the user to grant the permission to run in background, so user has to grant "Allow all the time"!
But this grant is not visible in the plugin.
Additionally when checking
geolocation.isEnabled() I assume it is necessary to distinguish between the different types of location grants.
Currently my app checks if it is enabled and returns TRUE, but then getCurrentLocation freezes as it does not have the correct grant ("Allow all the time")
Which platform(s) does your issue occur on?
-Android version 11+ -emulator / device
For Android 11+ a new location permission was added: "ACCESS_BACKGROUND_LOCATION"
In order to work in the background (e.g from a background service) you have to add that permission to the manifest. Additionaly it is necessary to ask the user to grant the permission to run in background, so user has to grant "Allow all the time"! But this grant is not visible in the plugin.
https://developer.android.com/training/location/permissions#request-background-location says you can get this label by processing: getBackgroundPermissionOptionLabel()
Is it possible to do that with this plugin?
Additionally when checking geolocation.isEnabled() I assume it is necessary to distinguish between the different types of location grants. Currently my app checks if it is enabled and returns TRUE, but then getCurrentLocation freezes as it does not have the correct grant ("Allow all the time")
KR Klaus