1 year ago
#316754
Sami
Android 11 and File API support
The following article mentions that Android 11 allows for usage of the File
API (under the title Access files using direct file paths and native libraries
).
https://developer.android.com/about/versions/11/privacy/storage
I would like more information on this. Does this refer to MANAGE_EXTERNAL_STORAGE
permission or does it speak in general. If it does not mean MANAGE_EXTERNAL_STORAGE
permission then what does it mean exactly?
- If I use Storage Access Framework to persist a path. After persistence, can I use the
File
class to create and save a file in that persistent path using theFile
class? For example:
File file = new File(filePath);
FileOutputStream os = new FileOutputStream(file, false);
OutputStreamWriter out = new OutputStreamWriter(os);
out.write(downloadedSubtitles);
out.close();
- Can I use the
File
class to read a file within the persisted path? - Can I use
file://
paths?
I also have different related question. Can I use the File
class with the code above to write files into the app's folder?
Thank you.
java
android
storage-access-framework
scoped-storage
0 Answers
Your Answer