Hi Zarah
I really appreciate you getting back to me. I did put a finsh(); in
the code but the
code  is in error and won't compile

Here is the code before adding, this works but obviously hangs at the
end of the video

import android.app.Activity;
import android.os.Bundle;
import android.widget.VideoView;

public class Videos extends Activity {

        @Override
        protected void onCreate( Bundle savedInstanceState ){
                // recover the name of the video to play
                Bundle bundle = getIntent().getExtras();
                String video_to_play = bundle.getString("Value");
                // set the screen up
                super.onCreate(savedInstanceState);
                setContentView( R.layout.videos );
                // set up to play the video
                VideoView video = (VideoView) findViewById( R.id.vidview);
                video.setVideoPath( video_to_play );
                video.start();
        }
}

When I try an add a video setonComplettionListener( video ) I get
The method set or onCompletionListener() is undefined for the type
VideoView

Any further advice would be very much appreciated

Perhaps the couple of luines from your code showing how to set the
listener up and the listener.

One thought is do i have to change to a MediaPlayer reather than
VideoView to get this to work?

Thank you and best regards

Viv

On Dec 14, 8:09 am, Zarah <[email protected]> wrote:
> I am not a guru, but I have tried using VideoView.
>
> I am using onCompletionListener() without any problems.  Did you call
> finish() in your onCompletionListener()?
>
> - Zarah.
>
> On Dec 14, 12:11 am, vtb <[email protected]> wrote:
>
> > Hi Guru's
> > New to Android.
> > I am developing an app that plays videos based on a touch map that is
> > read from the local disk, this map defines areas of the screen that
> > relate to a particular video to play. This is all working very nicely
> > now. However, when the video completes I have to hit the button on the
> > front of the table to return to the calling screen for any subsequent
> > selection(s).
>
> > I have tried implementing an onCompleteListener() for VideoView
> > without any success. Do you have any ideas or can you point me to any
> > reference code that would possibly help.
>
> > Thanking you in advance for any help you can give.
>
> > Seasons greetings
>
> > Viv

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to