应用第一次播放正常,但是如果按了停止键,再次播放就会播放不了...不知为什么?
// method for play stream after stop it.
public void startradio(View v) {
try{
if(mp.isPlaying()){
return;
}
mp.start();
} catch(IllegalStateException ex){
ex.printStackTrace();
}
}
// method for stop stream.
public void stopradio(View v) {
if(mp.isPlaying()){
mp.stop();
}
mp.release();
}