Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在使用 android 应用程序,我想从书籍的当前位置(例如:0:04/6:35)播放有声读物,现在我想播放它并且应该从 0:05 开始而不是从 0:00 开始。我该怎么做实现这一点,请任何人帮助我获得解决方案。
如果您已暂停它:
Mediaplayer.pause(); length = Mediaplayer.getCurrentPosition(); Mediaplayer.seekTo(length); Mediaplayer.start();
或者,如果您想从一开始就直接开始:
length = 4 * 1000; //milliseconds, starts at 0:04 Mediaplayer.seekTo(length); Mediaplayer.start();