First, your code should be surrounded in try-catch. So you might want to do an update such as
MediaPlayer mPlayer = new MediaPlayer();
String url = "http://149.13.0.80:80/radio1.ogg";
mPlayer.setAudioStreamType(AudioManager.STREAM_MUSIC);
try {
mPlayer.setDataSource(url);
mPlayer.prepare();
mPlayer.start();
} catch (IllegalArgumentException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (SecurityException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IllegalStateException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
Secondly, if your prepare() is stalling you might consider using prepare() wrapped in a thread instead of prepareAsync(). That device might be doing some behaviors that are hanging, and trying to stop the MP. Adding an actionCancel might be useful.
private void actionCancel(){
try {
mp.setDataSource(new String());
} catch (Exception e) {
e.printStackTrace();
android.util.Log.d(TAG,"actionCancel(): mp.setDataSource() exception");
mp.reset();
}
}