How to make the video display from sdcard in android?
<p>Hi I need to display the videos from sd card. I kept my video in sd card and tried with following code. But the video is not displaying....Please help me where I went wrong....  </p>

<p>My Code:</p>

<pre><code>package com.videoapp;

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

public class NewvideoappActivity extends Activity
{
    private VideoView vView;

    @Override
    public void onCreate(Bundle savedInstanceState) 
    { 
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        vView = (VideoView)findViewById(R.id.myvideoview);
        vView.requestFocus();
        vView.setVideoPath("/sdcard/watch.3gp");
      vView.setMediaController(new MediaController(this));
        vView.start();
    }
}
</code></pre>

<p>main.xml</p>

<pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
   android:orientation="vertical"
   android:layout_width="fill_parent"
   android:layout_height="fill_parent"
   &gt;
&lt;TextView
   android:layout_width="fill_parent"
   android:layout_height="wrap_content"
   android:text="@string/hello"
   /&gt;
&lt;LinearLayout
   android:orientation="vertical"
   android:layout_width="fill_parent"
   android:layout_height="wrap_content"&gt;
&lt;VideoView
   android:id="@+id/myvideoview"
   android:layout_width="fill_parent"
   android:layout_height="wrap_content" /&gt;
&lt;/LinearLayout&gt;
&lt;/LinearLayout&gt;
</code></pre>

<p>logcat:</p>

<p><img src="http://i.stack.imgur.com/gEDG5.png" alt="enter image description here"></p>

<p>Thanks in advance...</p>
