开发者

Song picker for Android

开发者 https://www.devze.com 2023-01-06 06:08 出处:网络
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

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.


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

0

精彩评论

暂无评论...
验证码 换一张
取 消