Sunday, October 17, 2010

Playing Media in Android

Today I 'm gonna tell you how much easy it is to play media in Android from a URL and your function is here.

public void playMedia(){
MediaPlayer mp = new MediaPlayer();

// here could be the video url too
mp.setDataSource(this,Uri.parse("http://blab..balal.mp3"));

mp.prepare();

mp.start();

}


MediaPlayer object contains start, pause , and stop and still requires a bit of research by you.. So enjoy the research !!!!!