android 调用本地音乐播放器
16lz
2021-12-20
Intent intent_music = new Intent(Intent.ACTION_PICK); intent_music.setDataAndType(Uri.EMPTY,"vnd.android.cursor.dir/playlist"); intent_music.putExtra("withtabs", true); // 显示tab选项卡 intent_music.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); Intent j =Intent.createChooser(intent_music, "Choose an application to open with:");if (j == intent_music) {startActivity(j); } else {Intent intent = new Intent("android.intent.action.MUSIC_PLAYER"); startActivity(intent);}
更多相关文章
- Android(安卓)Studio学习:简单控件:滚动显示文本
- smartq7 android 内核显示启动信息
- Android(安卓)动态隐藏显示导航栏,状态栏
- Android(安卓)使用decodeFile方法加载手机磁盘中的图片文件
- MpAndroidChart简单用法 属性总结
- AndroidStudio使用NDK报错显示mips64el-linux-android-strip''
- Android快速显示4G
- Android(安卓)EditText显示光标 不弹出键盘
- android上方显示进度的进度条