1. Introducing Channels - a new way to chat with other Android users!
    Dismiss Notice

How to show Activity when video is completed?


Last Updated:

  1. Ankit2502

    Ankit2502 Member This Topic's Starter

    Joined:
    Jan 6, 2010
    Messages:
    13
    Likes Received:
    0
    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...