我想製作簡單的音頻流應用程序,但我的代碼拋出異常。 任何人都可以告訴我什麼是錯的?AudioStreaming從網絡媒體文件
***public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
String url = "128.downloadming1.com/bollywood%20mp3/Ekk%20Deewana%20Tha%20(2012)/01%20-%20Kya%20Hai%20Mohabbat.mp3";
MediaPlayer mp = new MediaPlayer();
try {
mp.setDataSource(url);
mp.setAudioStreamType(AudioManager.STREAM_MUSIC);
mp.prepare();
mp.start();
} catch (Exception e){
Log.i("Exception", "Exception in streaming mediaplayer e = " + e);
}
}***
:-)。這件事讓我非常頭疼。謝謝 – WasimSafdar 2012-01-27 17:39:17