Skip to content

Commit

Permalink
Alter use of READ_EXTERNAL_STORAGE permission from permissions samples.
Browse files Browse the repository at this point in the history
fixes #1679.

RequestMultiplePermissionsSample was using READ_EXTERNAL_STORAGE, but
this permission was removed at API Level 33 for more detailed items.
It leads to the state where rememberMultiplePermissionsState() never
count it as approved whereas launchMultiplePermissionRequest() will
never ask the user for it as a valid permission, and the entire sample
never gets to the "both approved" state.

Use another permission entry which is still valid at any API level.
  • Loading branch information
atsushieno committed Jul 16, 2023
1 parent 0817567 commit 4336309
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion sample/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<!-- Used for the permissions sample -->
<uses-permission android:name="android.permission.CAMERA" />
<uses-feature android:name="android.hardware.camera" android:required="false"/>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class RequestMultiplePermissionsSample : ComponentActivity() {
AccompanistSampleTheme {
val multiplePermissionsState = rememberMultiplePermissionsState(
listOf(
android.Manifest.permission.READ_EXTERNAL_STORAGE,
android.Manifest.permission.RECORD_AUDIO,
android.Manifest.permission.CAMERA,
)
)
Expand Down

0 comments on commit 4336309

Please sign in to comment.