I am having an Activity in which there is
VideoView -- Streams a video from a webserver.
Button -- Takes the user to the next activit
As the buffer is lost when the video view goes to the background(change in visibility), you should try blocking this behavior by overriding the onWindowVisibilityChanged method of VideoView. Call super only if the video view is becoming visible. May have side-effects.
public class VideoTest extends VideoView {
public VideoTest(Context context, AttributeSet attrs) {
super(context, attrs);
}
@Override
protected void onWindowVisibilityChanged(int visibility) {
if (visibility == View.VISIBLE) {
super.onWindowVisibilityChanged(visibility);
}
}
}