3

I am using android's Media store to list all the Audio file which is stored in the device.

String[] proj = {MediaStore.Audio.Media._ID,MediaStore.Audio.Media.DATA,MediaStore.Audio.Media.DISPLAY_NAME,MediaStore.Audio.Media.SIZE };
audiocursor = managedQuery(MediaStore.Audio.Media.EXTERNAL_CONTENT_URI,proj, null, null, null);
count = audiocursor.getCount();
audiolist = (ListView) findViewById(R.id.List_files);
audiolist.setAdapter(new AudioAdapter(getApplicationContext()));
audiolist.setOnItemClickListener(audiogridlistener);

On listitem click i can play the selected song.

While playing the song suppose i need to play the next/previous song in the list,Is there any way to achieve this.

John
  • 8,846
  • 8
  • 50
  • 85

2 Answers2

4

I solved it. You just need to Unmount and remount the Sdcard from Setting -> Storage .Then all your media file will be Updated.

John
  • 8,846
  • 8
  • 50
  • 85
1

Here's a suggestion, which accesses the MediaStore database directly. I think it's your only option:

Android's Media Scanner: How do I remove files?

Community
  • 1
  • 1
dhaag23
  • 6,106
  • 37
  • 35