Code example for VideoView

Methods: canSeekForwardgetDurationisPlayingseekTostart

       // Don't start until ready to play.  The arg of seekTo(arg) is the start point in 
       // milliseconds from the beginning. In this example we start playing 1/5 of 
       // the way through the video if the player can do forward seeks on the video. 
       if(videoPlayer.canSeekForward()) videoPlayer.seekTo(videoPlayer.getDuration()/5);
       Log.i("IS PLAYING", Boolean.toString(videoPlayer.isPlaying()));
    /** This callback will be invoked when the file is finished playing */ 
    public void onCompletion(MediaPlayer  mp) {
       // Statements to be executed when the video finishes. 
    /**  Use screen touches to toggle the video between playing and paused. */ 
    public boolean onTouchEvent (MotionEvent ev){