breautek commented on PR #814: URL: https://github.com/apache/cordova-plugin-camera/pull/814#issuecomment-1324022495
> °) At compilation time Element uses-permission#android.permission.WRITE_EXTERNAL_STORAGE at AndroidManifest.xml:59:5-108 duplicated with element declared at AndroidManifest.xml:51:5-81 It seems that manifest merger fail to merge <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" android:maxSdkVersion="32" /> with <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> from my other plugins. => removing android:maxSdkVersion="32" solved the compilation issue. Removing `android:maxSdkVersion` is probably not the solution. You're getting the issue because of a conflict with other plugins, and those plugins if they use `WRITE_EXTERNAL_STORAGE` will need to be refactored to use the newer permission model introduced in API 33, and only use `WRITE_EXTERNAL_STORAGE` on older API devices. Similar to how this PR is handling this. In other words, I think this PR has the right path moving forward, and the other plugins requires updates. > 2°) At runtime when trying to capture photo (either from camera or library), on Android 13, I always get permission refused. After adding some logs in onRequestPermissionResult, I saw that the only permission requested is READ_MEDIA_IMAGES and the result is [-1] (PackageManager.PERMISSION_DENIED). It seems that READ_MEDIA_IMAGES permission does not have to be requested. => Removing Manifest.permission.READ_MEDIA_IMAGES from requested permissions in CameraLauncher:129-130 solve the issue The [Andoid Docs](https://developer.android.com/reference/android/Manifest.permission#READ_MEDIA_IMAGES) states that `READ_MEDIA_IMAGES` is required when reading from the external storage. I would think this would include the gallery/library as they are typically stored inside external storage. So we may need to figure out the nuances surrounding `READ_MEDIA_IMAGES` if it isn't working for you so that we can understanding the context of where `READ_MEDIA_IMAGES` is truly required. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
