Hi,
I've created an android app that uses media player to stream playlist(.m3u) from web server. It works very well in most of the android phone devices, and I've set the minimum sdk level to 3. The same app, when installed Samsung Galaxy emulator or the real tablet device, it fails to work. When I used samsung galaxy emulator, I see the error "server gone..." and some error codes. I tried both in wifi and 3g. In wifi the streaming stops after 5 or 6 secs. Any help is really appreciated. I've pasted code below:
......
.......
String path = urlparser.parse(url);
mMediaPlayer = new MediaPlayer();
try {
mMediaPlayer.setAudioStreamType(AudioManager.STREAM_MUSIC);
mMediaPlayer.setDataSource(path);
//mMediaPlayer.prepare();
mMediaPlayer.setOnPreparedListener(this);
mMediaPlayer.prepareAsync();
}
catch (Exception e) {
Log.e("MediaPlayer", "Failed to play", e);
}[
I've created an android app that uses media player to stream playlist(.m3u) from web server. It works very well in most of the android phone devices, and I've set the minimum sdk level to 3. The same app, when installed Samsung Galaxy emulator or the real tablet device, it fails to work. When I used samsung galaxy emulator, I see the error "server gone..." and some error codes. I tried both in wifi and 3g. In wifi the streaming stops after 5 or 6 secs. Any help is really appreciated. I've pasted code below:
......
.......
String path = urlparser.parse(url);
mMediaPlayer = new MediaPlayer();
try {
mMediaPlayer.setAudioStreamType(AudioManager.STREAM_MUSIC);
mMediaPlayer.setDataSource(path);
//mMediaPlayer.prepare();
mMediaPlayer.setOnPreparedListener(this);
mMediaPlayer.prepareAsync();
}
catch (Exception e) {
Log.e("MediaPlayer", "Failed to play", e);
}[