I am implementing a media player that plays a stream from a remote machine. Via my app I can control the remote machine (e.g. seek to second). Works like charm, but: The Android
Try this. this will definatly help to you ::
private class TouchandshowTask extends AsyncTask {
@Override
protected Void doInBackground(Void... arg0) {
try {
player.setAudioStreamType(AudioManager.STREAM_MUSIC);
player.setDataSource("URL");
player.prepare();
} catch (Exception e) {
// TODO: handle exception
}
return null;
}
protected void onPostExecute(final Void unused) {
}
}
OnCreate()
new TouchandshowTask().execute();