启动所有音乐应用程序的意图 [英] Launch all music apps intent

查看:169
本文介绍了启动所有音乐应用程序的意图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在那里发动的意图,如Spotify的,所有的Rhapsody音乐应用的方式,节拍音乐等使用

 意图int​​ent3 =新意图(MediaStore.INTENT_ACTION_MUSIC_PLAYER);
                    intent3.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
                    startActivity(intent3);

只有打开系统的音乐应用。我希望看到所有的音乐应用程序。


解决方案

 意图int​​ent3 =新意图(Intent.ACTION_PICK,android.provider.MediaStore.Audio。
                        Media.EXTERNAL_CONTENT_URI);
                        intent3.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
                        startActivity(intent3);

is there a way to launch all music apps in an intent such as spotify, rhapsody, beats music, etc. Using

Intent intent3 = new Intent(MediaStore.INTENT_ACTION_MUSIC_PLAYER);
                    intent3.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
                    startActivity(intent3);

Only opens the system music apps. I want to see all music apps.

解决方案

    Intent intent3 = new Intent(Intent.ACTION_PICK, android.provider.MediaStore.Audio.
                        Media.EXTERNAL_CONTENT_URI);
                        intent3.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
                        startActivity(intent3);

这篇关于启动所有音乐应用程序的意图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆