What’s new in shared storage (Google I/O'19)
Why Stack Overflow recommends it
Stack Overflow users link it when answering questions about writing to or reading from external and shared storage on Android 10 and later, where MediaStore and scoped storage replace direct file access.
Recommended by 1 people across 1 different months, 2019 to 2023.
What it is
A Google I/O 2019 session by Android engineers Jeff Sharkey and Seb Grubb explaining the storage permission model introduced in Android Q. It covers how apps get access to media on the device and how scoped storage affects things like sharing files between apps.
What people said
Recommends kimwii · 2019-08 · Stack Overflow · on “How to save file to public (external) storage on Android Q (API 29)?”
You need to use MediaStore to work with external storage from Android Q. This talk will give you some ideas of how to use it: [this video]
Cites Max · 2019-07 · Stack Overflow · on “Media scanner for secondary storage on Android Q”
I'm also currently struggling with that. I think what you want to do you cannot do any longer once you are on Android Q, because you are not allowed to access the Music directory on Q . You are only allowed to create and access files in directories you created. You did not create the music directory. Now every change to the Media has to happen threw the MediaStore. So you insert your Music file beforehand and then get an outputstream from the MediaStore to write to it. All the changes on Q on Media should be done threw the MediaStore hence you informing the MediaStore of changes cannot even occur anymore, because you never directly access the File. This has one giant caviat in that all the n
Cites Matheus Mesquita · 2020-02 · Stack Overflow · on “How to create a PDF document from ResponseBody into a Intent Android API 29”
As of Android 10 (Q) Storage Access Framework deprecated the way we originally saved documents to external Download folder, I'm trying to create a PDF document without asking Android Writing Storage permissions, prompting the user every time he needs to download it. But I can't figure out how to bring the PDF (in memory) directly to the creation Intent, without creating a File object (Uri), and missing the main point of not creating a file. Here's my code: private fun requestPDF() { val retrofit = Retrofit.Builder().baseUrl("foo") .build() val service = retrofit.create(PDFDownloadService::class.java) val call = service.get("bar") call.enqueue(object : Callback<ResponseBody> { override fun on
Cites Morrison Chang · 2023-06 · Stack Overflow · on “Read/Write to external storage and persist after uninstallation”
Related video: Everything about storage on Android [LINK] Realize that older versions of Android allowed for unannounced files to persist after uninstall which would result in clutter and tracking cookies, see old Google IO video on What’s new in shared storage (Google I/O'19) [this video] Do realize that unless the user deletes cache/app storage or uninstalls, user app data (local storage) can persist during app upgrade.