Reputation: 8818
I want to play the mediaplayer for just 10 sec. How to control it?
Upvotes: 0
Views: 3019
Reputation:
You can implement a CountDownTimer that will stop your MediaPlayer. so you will not have to implement a thread or something.
Upvotes: 3
Reputation: 8533
You could use TimerTask
to schedule a MediaPlayer.stop()
to run after 10 secs.
Upvotes: 1