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

1

1 Answer

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]);

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.