标签:android io os ar java sp 文件 on art
============问题描述============
public boolean playmusic(int listPosition) { //playBtn.setBackgroundResource(R.drawable.play_selector); Mp3Info mp3Info = mp3Infos.get(listPosition); //musicTitle.setText(mp3Info.getTitle()); /*Intent intent = new Intent(this.getActivity(),PlayerService.class); intent.setAction("com.wyj.media.MUSIC_SERVICE"); intent.putExtra("listPosition",listPosition); intent.putExtra("url", mp3Info.getUrl()); intent.putExtra("MSG", AppConstant.PlayerMsg.PLAY_MSG); this.getActivity().startService(intent);*/ path=mp3Info.getUrl(); try { //initLrc(); mediaPlayer.reset();// 把各项参数恢复到初始状态 mediaPlayer.setDataSource(path); mediaPlayer.prepare(); // 进行缓冲 mediaPlayer.start(); // 开始播放 } catch (Exception e) { e.printStackTrace(); } Log.d(TAG,"method playmusic()has been called!"); Log.d(TAG,"the path of this song is that:"+path); return true; }
============解决方案1============
============解决方案2============
============解决方案3============
============解决方案4============
标签:android io os ar java sp 文件 on art
原文地址:http://www.cnblogs.com/hugangyan86/p/4033832.html