Avoiding reloading the video with a change in orientation to make the video resume from the same.
I tried below but it fails
vd = (VideoView) findViewById(R.id.vplayer); ....... public void onSaveInstanceState(Bundle savedInstanceState) { super.onSaveInstanceState(savedInstanceState); savedInstanceState.putInt("Position",vd.getCurrentPosition()); } public void onRestoreInstanceState(Bundle savedInstanceState) { super.onRestoreInstanceState(savedInstanceState); int position= savedInstanceState.getInt("Position"); vd.seekTo(position); }
source share