Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ContentResolver running on Emulator can't find mp3 Files

I use a contentResolver Query on my Android Studio Emulator. I put the mp3 files in the downloads folder, where I can see them int the android studio device file explorer and in den device exporer in the emulator. I can't fetch the files using contentResolver Query.

String sortOder = MediaStore.Audio.Media.TRACK + " ASC";
cur = getContentResolver().query(uri, null, null, null, sortOder);

The ContentResolver is searching for content://media/external/audio/media

I restarted the emulator, removed and installed the app after upload.

On real devices this resolver works, but not on the emulator. Why does the contentResolver on the emulator doesn't find the uploaded files.

Thanks GGKenter image description here

like image 704
GGK stands for Ukraine Avatar asked Oct 17 '25 14:10

GGK stands for Ukraine


1 Answers

You should reboot your devices if you just dragged your files into the sdcard in Android Studio. It's not updated immediately.

like image 56
Licat Julius Avatar answered Oct 19 '25 05:10

Licat Julius



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!