Pause/Stop MediaPlayer Android at given time programmatically
问题 I researched a little bit, but couldn't find any solutions to this problem: I would like to play a MediaPlayer and pause/stop it at a given time.. (ie: play from second 6 to second 17). I know that I can set its starting point with seekTo() method, but can I pause/stop it from playing by setting an end point (of course, before reaching the file end limit)? 回答1: There are different ways you could do this, here's one: int startFrom = 6000; int endAt = 11000; MediaPlayer mp; Runnable