google / accompanist

A collection of extension libraries for Jetpack Compose
https://google.github.io/accompanist
Apache License 2.0
7.38k stars 596 forks source link

[Permissions] multiple permission sample does not work on API Level >= 33 due to obsolete permission constant #1679

Closed atsushieno closed 1 year ago

atsushieno commented 1 year ago

Description

I was investigating permissions feature and running the sample app, I noticed that the existing RequestMultiplePermissionsSample would not work as expected, because READ_EXTERNAL_STORAGE does not exist since API Level 33. I never got "Camera and Read storage permissions Granted! Thank you!" state because this permission is not going to be regarded as approved at rememberMultiplePermissionsState() whereas it will never be asked at launchMultiplePermissionRequest().

Steps to reproduce

Launch the existing "Permissions: Request multiple permissions" sample, and approve ALL the requested permissions.

Expected behavior

It should result in the "Thank you!" message above.

Additional context

I have a fix that simply replaces READ_EXTERNAL_STORAGE with RECORD_AUDIO, will be sent .