使用Android的意图启动音乐播放器播放器、意图、音乐、Android

由网友(專制各種不服)分享简介:是否有可能在Android开放,从我的应用程序的音乐应用程序,或者是它最好写我的里面一个全新的音乐应用程序。我宁愿使用他们,因为用户已经熟悉了。Is it possible to open the music app from my app in android, or is it best to write a w...

是否有可能在Android开放,从我的应用程序的音乐应用程序,或者是它最好写我的里面一个全新的音乐应用程序。我宁愿使用他们,因为用户已经熟悉了。

Is it possible to open the music app from my app in android, or is it best to write a whole new music app inside of mine. I would rather use theirs since the user will already be comfortable with it.

推荐答案

我发现做到这一点的方法之一。

I found one way to do this.

Intent intent = new Intent();  
intent.setAction(android.content.Intent.ACTION_VIEW);  
File file = new File(YOUR_SONG_URI);  
intent.setDataAndType(Uri.fromFile(file), "audio/*");  
startActivity(intent);
阅读全文

相关推荐

最新文章