简体   繁体   中英

Storage so my media/non media files are accessible by other apps

I am confused with the new app storage system in Android. I am not sure where my use case falls under and I need your help in telling me the right approach for this

My app captures images and generates pdf documents. Prior to Android 10, I used to store them in an app directory where the user can easily navigate to them through other files browsing app (like Files app on Samsung). In addition, these files can be accessed from within my app (so essentially read and write).

With the new storage, I am not sure how to accomplish the same thing. If I use the internal storage then user can't see them. If I use the media approach, well it seems it is only for Audio/video plus they will not be organized in a folder like I have them organized.

Am I missing something? How would I solve this problem?

Thank you

On an Android 11 device you can store your files in a subdirectory of the public Documents directory.

You can do that using classic File means or the media store or SAF.

Other apps can see them using SAF or the media store. Or with classic file means when requested all files access.

The user can see them using the default Files app on the device.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM