我正在尝试使用将提供有关歌曲的元信息的活动来选择歌曲。我想这样做而不是简单的文件浏览器。我有以下代码,但不幸的是,一旦点击它也会播放歌曲。我只是希望用户能够从他们的歌曲中选择一首歌曲,MediaStore
然后在不播放的情况下对其进行操作。
public class Main extends Activity {
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
Intent intent = new Intent();
intent.setAction(android.content.Intent.ACTION_PICK);
intent.setData(MediaStore.Audio.Media.EXTERNAL_CONTENT_URI);
startActivity(intent);
}
}