diff --git a/modules/pictures/src/main/native/android/dalvik/DalvikPicturesService.java b/modules/pictures/src/main/native/android/dalvik/DalvikPicturesService.java index e1672a32..fa87be18 100644 --- a/modules/pictures/src/main/native/android/dalvik/DalvikPicturesService.java +++ b/modules/pictures/src/main/native/android/dalvik/DalvikPicturesService.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, Gluon + * Copyright (c) 2020, 2024, Gluon * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -73,8 +73,16 @@ public DalvikPicturesService(Activity activity) { private boolean verifyPermissions() { if (!verified) { - verified = Util.verifyPermissions(Manifest.permission.CAMERA, - Manifest.permission.READ_EXTERNAL_STORAGE, Manifest.permission.WRITE_EXTERNAL_STORAGE); + if (Build.VERSION.SDK_INT >= 33) { + verified = Util.verifyPermissions(Manifest.permission.CAMERA, + Manifest.permission.READ_MEDIA_AUDIO, + Manifest.permission.READ_MEDIA_IMAGES, + Manifest.permission.READ_MEDIA_VIDEO); + } else { + verified = Util.verifyPermissions(Manifest.permission.CAMERA, + Manifest.permission.READ_EXTERNAL_STORAGE, + Manifest.permission.WRITE_EXTERNAL_STORAGE); + } } return verified; } diff --git a/modules/pictures/src/main/resources/META-INF/substrate/dalvik/AndroidManifest.xml b/modules/pictures/src/main/resources/META-INF/substrate/dalvik/AndroidManifest.xml index a309b366..1031ba2b 100644 --- a/modules/pictures/src/main/resources/META-INF/substrate/dalvik/AndroidManifest.xml +++ b/modules/pictures/src/main/resources/META-INF/substrate/dalvik/AndroidManifest.xml @@ -2,6 +2,9 @@ + + +