I have an audio file in the folder path /storage/emulated/legcy/Download/play.mp3 Previously from getExternalStoragePublicDirectory I used to read the song but it doesn't work right now
Asked
Active
Viewed 362 times
1 Answers
1
You should avoid using getExternalStoragePyblicDirectory in Android Q, as such method has been deprecated.
In Android Q new restrictions are applied when accessing media. The recommended way is to use the MediaStore API or Storage Access Framework.
See the next link for more details about scoped storage in Android Q, and how to access files:
https://developer.android.com/training/data-storage/files/external-scoped

PerracoLabs
- 16,449
- 15
- 74
- 127