react-native-blob-util icon indicating copy to clipboard operation
react-native-blob-util copied to clipboard

Android 13: Granular Media Permission - no more READ_EXTERNAL_STORAGE

Open fabiendem opened this issue 2 years ago • 1 comments

Hi,

In Android 13, when the app targets Android 13 (targetSdkVersion 33), we must use a new set of permission instead of READ_EXTERNAL_STORAGE. See details at https://developer.android.com/about/versions/13/behavior-changes-13#granular-media-permissions

The library requests for READ_EXTERNAL_STORAGE at https://github.com/RonRadtke/react-native-blob-util/blob/88466b52617af6590b599acc99997a82ab6c819c/android/src/main/AndroidManifest.xml#L21-L22

I don't fully grasp all the use cases of the library, but is it necessary to have this systematically declared here? This will be problematic once we bump the targetSdkVersion. (I know that we can always remove it in our app via the manifest tools, but I am wondering if there won't regression with the lib here).

Thanks

fabiendem avatar Jul 14 '22 13:07 fabiendem

Hey, I had it removed / limited to certain SDK in the past but that caused problems for some migrating over from the old lib so I added it again. It is only needed for devices < Android 10 or Android 10 with legacy storage enabled. So yes, we might consider removing it in a future version since setting the maxSDK might lead to collisions during manifest emrging.

RonRadtke avatar Aug 12 '22 08:08 RonRadtke