有没有可以通过程序调用的Android歌曲选择器?
我正在寻找类似于iPhone的MPMediaPickerController的东西,它会显示一个视图,用户可以从中选择歌曲。
有没有可以通过程序调用的Android歌曲选择器?
我正在寻找类似于iPhone的MPMediaPickerController的东西,它会显示一个视图,用户可以从中选择歌曲。
您可以发送一个类型为 "ACTION_PICK" 或 "ACTION_GET_CONTENT" 的意图。例如:
Intent i = new Intent(Intent.ACTION_GET_CONTENT);
i.setType("audio/*");
Intent c = Intent.createChooser(i, "Select soundfile");
startActivityForResult(c,1);
请点击这里了解更多信息:
http://developer.android.com/reference/android/content/Intent.html#ACTION_GET_CONTENT