9

Is there a song picker for Android that can be invoked programatically?

I'm looking for something similar to iPhone's MPMediaPickerController, which shows a view from where the user can select songs.

Jeff Mercado
  • 129,526
  • 32
  • 251
  • 272
hpique
  • 119,096
  • 131
  • 338
  • 476
  • Mayebe this is something for you: http://code.google.com/p/eyes-free/source/browse/trunk/RockLock/src/com/marvin/rocklock/SongPicker.java?r=609 – RoflcoptrException Jul 05 '10 at 13:39

1 Answers1

15

You can send an intent of type "ACTION_PICK" or "ACTION_GET_CONTENT". For example:

    Intent i = new Intent(Intent.ACTION_GET_CONTENT);
    i.setType("audio/*");
    Intent c = Intent.createChooser(i, "Select soundfile");
    startActivityForResult(c,1);

see here for more info:

http://developer.android.com/reference/android/content/Intent.html#ACTION_GET_CONTENT

Bob McCormick
  • 643
  • 4
  • 8
  • 2
    Beware, not every application has a picker. I just got a crittercism report that the activity wasn't found on a customer device. – schlingel Jun 18 '12 at 10:56