I am very new to android programming. I am playing a video in VideoView, i want to switch to other activity when video play ends.code is below:
VideoView video = (VideoView) findViewById(R.id.myVideo);
Uri uri = Uri.parse("android.resource://com.example.samplevideo/"+R.raw.appvideo);
video.setVideoURI(uri);
video.start();
What to do to Switch on other Activity when video playing finished?
Register a
setOnCompletionListener(..).Update: added the missing return type.