I’ve read both Q and R books regarding MediaStore but can’t figure something out.
On Android 10 and 11, MediaStore and ContentResolver.insert work fine. My media is stored and 3rd parties like Youtube Music will show
my songs on my device. The location from ContentResolver is
content://media/external/audio/media/35 where 35 is the ID
On Android < 10, I can’t get them to show in the right place for 3rd parties.
When MediaScannConnection scanFile completes successfully, it gives me a uri of:
The contentResolver.update call using this uri is successful. But third parties don’t read this location and show my device’s library of songs.
I query MediaStore using MediaStore.Audio.Media.EXTERNAL_CONTENT_URI and the entry that was just successfully made and updated in MediaStore does not show in the results.
I am using context.getExternalFilesDir because the old way of using
is now deprecated.
How do I make my media show in the proper place in MediaStore for access by 3rd party apps?