0

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

Piyush aggarwal
  • 750
  • 2
  • 14
  • 25
  • Be aware of: [Android 13 - How to request WRITE_EXTERNAL_STORAGE](https://stackoverflow.com/q/73620790/295004) Also you may want to provide details of your specific use case and plugins used. Review the plugins to see if they have been updated for Android's additional changes to storage. – Morrison Chang Aug 01 '23 at 05:35

1 Answers1

1

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

Piyush aggarwal
  • 750
  • 2
  • 14
  • 25