Search code examples
androidreact-nativecapacitorionic-native

No WRITE_EXTERNAL_STORAGE permission with ionic7 and capacitor 5 in Andorid 11/11+


I am developing an Ionic App for Android. I have ionic 7 and capacitor 5. I have installed @awesome-cordova-plugins/android-permissions and cordova-plugin-android-permissions

In AndroidManifest.xml, i have mentioned:

<uses-permission android:name="android.permission.READ_MEDIA_IMAGES" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />

as well as included android:requestLegacyExternalStorage="true"

In App.vue i am performing

AndroidPermissions.requestPermissions([AndroidPermissions.PERMISSION.WRITE_EXTERNAL_STORAGE, AndroidPermissions.PERMISSION.READ_EXTERNAL_STORAGE]);

But still not able to donwload any file and native-storage is also not workign in Adroid 11 and 12. Although, in older android version it works absolutely fine.

Can any please help me?

Update Even added

Still permission to WRITE_EXTERNAL_STORAGE is not working


Solution

  • No need request WRITE permission and no need to check for WRITE permission for Android 11+ this pluign will no more provie perimission.

    All the write file operations are working fine even without this permission request or check

    AndroidPermissions.requestPermissions([AndroidPermissions.PERMISSION.WRITE_EXTERNAL_STORAGE, AndroidPermissions.PERMISSION.READ_EXTERNAL_STORAGE]);