Hi! Do I need to use a MediaStore + permission REA...
# android
m
Hi! Do I need to use a MediaStore + permission READ_EXTERNAL_STORAGE to read a file from disk?
Copy code
val fixedPath = "/storage/emulated/0/AnkiDroid/collection.media/主人_B_zh.mp3"
val myURI = Uri.fromFile(File(fixedPath)
I'm trying to load a file to my mediaPlayer directly using this URI, bit I get permission denied Reference here: https://developer.android.com/preview/privacy/scoped-storage#opt-out-of-filtered-view
google 1
stackoverflow 3
AnkiDroid is an external app. Is that path even allowed anymore, or will external storage be somewhere else? I get the following error when trying my URI with the MediaStore
The authority of the uri file:///storage/emulated/0/AnkiDroid/collection.media/%E4%B8%BB%E4%BA%BA_B_zh.mp3 does not match the one of the contentProvider: media