Skip to content Skip to sidebar Skip to footer

How To Resume Video Where It Last Stopped Using Videoview On Android?

I'm trying to make a video player using VideoView. The video can play, but when I close the app and re-open it, the video doesn't resume from where it stopped and starts from the b

Solution 1:

You can get the current progress from the VideoView via videoView.getCurrentPosition();

So before pausing get the current position of the video

int seekPosition = videoView.getCurrentPosition();

while resuming the video you can call seekTo() method on VideoView and start it like below.

videoView.seekTo(seekPosition);
videoView.start();

Post a Comment for "How To Resume Video Where It Last Stopped Using Videoview On Android?"