apache / cordova-plugin-camera

Apache Cordova Plugin camera
https://cordova.apache.org/
Apache License 2.0
960 stars 1.52k forks source link

[Android] Still request gallery access permission after granted #861

Open hieunguyen2211 opened 7 months ago

hieunguyen2211 commented 7 months ago

Bug Report

Problem

What is expected to happen?

After granted gallery access permission, when trying to access gallery again, there is no popup to ask users to allow gallery access permission.

What does actually happen?

After granted gallery access permission, when trying to access gallery again, there is a popup to ask users to allow gallery access permission

Information

As I checked at CameraLauncher.java#L244, READ_EXTERNAL_STORAGE is added into a list of permissions, which will be verified later. However, in plugin.xml#L58, there is no READ_EXTERNAL_STORAGE here.

I try to add READ_EXTERNAL_STORAGE to my project by: <uses-permission android:maxSdkVersion="32" android:name="android.permission.READ_EXTERNAL_STORAGE" /> And the problem is gone.

Environment, Platform, Device

Android 11, 12 with targetSDK 33

Version information

cordova 12, cordova-plugin-camera 7.0.0