1

in my application, I want to be able to select an audio file which is on the device to be used. The standard audio player in Android 2.3 "Music" offers everything I need to fullfill the requirements. Is it possible to send an Intent to open the Music app, select a song and give back the audio file id as result to my application?

thanks in advance!

greets, Andi

andreas
  • 1,483
  • 1
  • 15
  • 36

1 Answers1

2

Have you tried using the INTENT_ACTION_MEDIA_SEARCH? It seems to do what you are looking for..

bluefalcon
  • 4,225
  • 1
  • 32
  • 41
  • Thanks! This is what I was looking for. Actually, instead of playing the file on selection, I would like to retrieve the MediaStore.Audio.Media.DATA information and store it somewhere for later use. Is there a way to achieve this? – andreas Aug 25 '11 at 07:13
  • what does the above intent do? play the song? If it does then you might have to query the database and get a list of songs and present the songs to the user in a list by yourself.. – bluefalcon Aug 25 '11 at 07:27
  • Exactly. It offers a list with all Audio files and playes the selected one. I guess I have to query the database and build an own selection dialog. But thanks anyway! – andreas Aug 29 '11 at 06:50