How to open music picker?

Viewed 13481

In my application, I want to make a picker that offers the user the choice to pick a music. I want to use the native android picker. I used the following code to open the native android music picker:

final Intent intent2 = new Intent(Intent.ACTION_PICK);
intent2.setType("audio/*");
startActivityForResult(intent2, 1);

But when I execute it, I get an ActivityNotFoundException and this error message:

"Your phone has no music gallery that can be used to select a file. Please try sending a different type of files"

Am I doing something wrong there ?

3 Answers
Related