Closed rarenatoe closed 1 year ago
@rarenatoe Hi, this is unfortunately not a place to get help, but to declare issues with the library. For that, please be sure that it always occurs (by providing a minimal reproduction repository).
You can also check the example
app: if it doesn't occur with, that's mean the issue might came from something else.
PS: ACCESS_BACKGROUND_LOCATION
MUST be requested with ACCESS_COARSE_LOCATION
or ACCESS_FINE_LOCATION
(documentation)
Replace your sample code with:
const requestLocation = async () => {
const status = await requestMultiple([
PERMISSIONS.ANDROID.ACCESS_BACKGROUND_LOCATION,
PERMISSIONS.ANDROID.ACCESS_FINE_LOCATION, // or ACCESS_COARSE_LOCATION
]);
console.log({ status });
return status;
};
Should do the trick.
@zoontek what you proposed just doesn't show the popup. Seems like starting on API Level 30, foreground/background requests have to be made distinctly.
Still, seems like ACCESS_FINE_LOCATION
and ACCESS_COARCE_LOCATION
return blocked
.
Bug summary
In my app I run the following code
If by the third time the user denies the permission, it doesn't show the popup anymore (which is expected behavior), but it always returns
denied
, neverblocked
.I am handling this by locally counting the number of attemps, but it would be nice if this were fixed or something told me what I did wrong. 🙏
Library version
3.7.2
Environment info
Steps to reproduce
denied
.denied
.Reproducible sample code