Hello,
Welcome to our Microsoft Q&A platform!
You no longer have access by default to arbitrary locations on external storage or removable storage on Android 10 or later.
For Android 10 and 11, you can add android:requestLegacyExternalStorage="true"
to your <application>
element in the manifest. This opts you into the legacy storage model, and your existing external storage code will work.
I recommend you to use following path, you can store image files into your own application's external storage (here is path :"/storage/emulated/0/Android/data/com.companyname.xxx/filesfilename.png")
Or you can grand the android.permission.MANAGE_EXTERNAL_STORAGE
to give access to all files on external storage, except the Android/data and Android/obb directories. To learn more about related Google Play guidelines, read the updated policy from the Policy Help Center.
And here is link about how to request MANAGE_EXTERNAL_STORAGE permission.
Best Regards,
Leon Lu
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.