I want to play the mediaplayer for just 10 sec. How to control it?
Asked
Active
Viewed 2,951 times
0
-
http://developer.android.com/reference/android/media/MediaPlayer.html can give a list of properties that you can use to control your media player – reggie Feb 10 '11 at 14:07
2 Answers
3
You can implement a CountDownTimer that will stop your MediaPlayer. so you will not have to implement a thread or something.
1
You could use TimerTask
to schedule a MediaPlayer.stop()
to run after 10 secs.

techi.services
- 8,473
- 4
- 39
- 42