I have activity with VideoView. After activity creation I starts video playback. And everything is ok before the moment, when I press Home button. When I return to the activity from home screen video buffer is empty and video playback starts from the very beginning. That is a problem because I think that video should be paused in Home button pressed moment and started again when we returned from home screen. In debugger I can see, that before Home button is pressed, VideoView has initialized mMediaPlayer field. But when I watch on this field in onStart() after returning from home screen this field is nulled. How can I achieve "right" behavior?
Asked
Active
Viewed 1,436 times
1
-
It is possible, check out my answer [here](http://stackoverflow.com/questions/9987042/videoview-onresume-loses-buffered-portion-of-the-video/10368107#10368107) for details. – yorkw May 03 '12 at 04:01
1 Answers
0
Try by overiding the onPause and onRestart method of the activity life cycle.
In onPause() just pause the video from playing and in onRestart() just play it again.

Shankar Agarwal
- 34,573
- 7
- 66
- 64