Seamless video Loop with VideoView

Solution 1:

Try this it will work 100%


VideoView videoView;<---write this in outside of method or else declare it as final variable.

videoView.setOnPreparedListener(new OnPreparedListener() {
    @Override
    public void onPrepared(MediaPlayer mp) {
        mp.setLooping(true);
    }
});

Solution 2:

In Kotlin simply use

videoView.setOnPreparedListener { it.isLooping = true }