手机
当前位置:查字典教程网 >编程开发 >安卓软件开发 >Android中播放在线音乐代码
Android中播放在线音乐代码
摘要:复制代码代码如下:Intentintent=newIntent();Uriuri=Uri.parse("http://mul1.tximg....

复制代码 代码如下:

Intent intent = new Intent();

Uri uri = Uri.parse("http://mul1.tximg.cn/music/group/bbs/mp3/44/100715/1279159638887.mp3");

intent.setDataAndType(uri, "audio/*");

intent.setAction(Intent.ACTION_VIEW);

startActivity(intent);

intent.setDataAndType(uri, "audio/*");这里可以改成audio/mp3

【Android中播放在线音乐代码】相关文章:

Android Service中方法使用详细介绍

Android 情景模式的设置代码

Android使用Pull解析器解析xml文件的实现代码

Android View添加 Listener 实例代码

android webview 简单浏览器实现代码

android屏幕全屏的实现代码

Android双击退出Activity的类代码

Android日期时间格式国际化的实现代码

Android中利用App实现消息推送机制的代码

android panellistview 圆角实现代码

精品推荐
分类导航