Cannot access local files on Android SDK target 30


I have updated my Android target SDK from 28 to 30 by setting the preference tag <preference name="android-targetSdkVersion" value="30" /> in config.xml file.

Now I am not able to access local images which get downloaded on app start. I checked the folder, the file exists. But when I set it as src of image tag I am getting the below error in console:

GET file:///storage/emulated/0/Android/data/io.myorg.myproject/files/tourListHeaderImage5cc694308ab7a958af00017f1645549885376 net::ERR_ACCESS_DENIED

I had accepted file access permission.

I checked the Permissions for Files and Media. It has Allow access to media only selected.

If I set the target to 28, then things work as expected. Also for target 28, in Permissions, I am getting Allow management of all files while in target 30 it is showing ‘Allow access to media only’.

Do I have to do any setup for this? Like adding new permission or something?

Thank you :slightly_smiling_face: