I want to play the mediaplayer for just 10 sec. How to control it?
You could use TimerTask to schedule a MediaPlayer.stop() to run after 10 secs.
TimerTask
MediaPlayer.stop()