1. Check out our app, Forums for Android! Download and leave feedback here!

How to show Activity when video is completed?

Discussion in 'Android Apps & Games' started by Ankit2502, Feb 11, 2010.

  1. Ankit2502

    Ankit2502 Member
    Thread Starter
    15

    Jan 6, 2010
    13
    0
    15
    Android Developer
    Indore
    Hello Friends,
    I am new in Android development & i am developing one application in which first activity play the video and when video is completed i want to show another acitviy. For this i have implemented OnCompletionListener and write this piece of code into VideoActivity which is responsible for playing video and after completion of video i want to launch MainActivity.
    Code (Text):
    1.  
    2. public void onCompletion(MediaPlayer media) {
    3.        
    4.      if (media != null) {
    5.      media.stop();
    6.      media.release();
    7.      }
    8.      Intent intent = new Intent(VideoActivity.this,MainActivity.class);
    9.      startActivity(intent);
    10. }
    11.  
    but i am getting Source Not Found error when i am debugging it...can you tell me what can i do for it.
     

    Advertisement

Share This Page

Loading...