Hi I am new to android development and I’m working on a game. Right now I have a cutsceen right now which is a videoview that is called after hitting the start button of the game. I want to be able to be able to end the cutsceen activity immediately after the video ends, but I’m not sure how to do that. At first I tried putting a timer for 25 seconds in onCreate, but that failed since onCreate only happens once. As it is now I have a button to end to the cutsceen, but my question is how do I get the cutsceen activity to end and call the game activity after the video directly ends?
Share
First off, I’m not really familiar with game development, but I guess it would work the same way. Anyway, is the video in a
VideoView? If so, you can call setOnCompletionListener to it so you will be notified that the video is done playing.You can then call finish() on the activity in the callback method.