Video is not displayed!
<p>I am trying to display video file bt it is not being displayed only audio is coming.Can anyone help me??</p>

<p>This is my code.</p>

<p>The Activity in which list is displayed:  </p>

<pre><code>public class AudioPlay extends ListActivity{

    private static final String MEDIA_PATH = new String("/sdcard/");

    private List&lt;String&gt; songs = new ArrayList&lt;String&gt;();

    private MediaPlayer mp = new MediaPlayer();

    private int currentPosition = 0;



    @Override

    public void onCreate(Bundle icicle) {

            super.onCreate(icicle);
      setContentView(R.layout.songlist);

            updateSongList();

    }

    public void updateSongList() {

            File home = new File(MEDIA_PATH);

            if (home.listFiles(new Mp3Filter()).length &gt; 0) {

                    for (File file : home.listFiles(new Mp3Filter())) {

                            songs.add(file.getName());

                    }
              ArrayAdapter&lt;String&gt; songList = new ArrayAdapter&lt;String&gt;(this,

                                    R.layout.song_item, songs);

                    setListAdapter(songList);

            }

    }

    class Mp3Filter implements FilenameFilter {

            public boolean accept(File dir, String name) {

                    return (name.endsWith(".mp3"));

            }

    }

    @Override

    protected void onListItemClick(ListView l, View v, int position, long id) {

            currentPosition = position;

            playSong(MEDIA_PATH + songs.get(position));

    }

    private void playSong(String songPath) {

            try {



                    mp.reset();

                    mp.setDataSource(songPath);

                    mp.prepare();

                    mp.start();



                    // Setup listener so next song starts automatically

                    mp.setOnCompletionListener(new OnCompletionListener() {



                            public void onCompletion(MediaPlayer arg0) {

                                    nextSong();

                            }

                    });

            } catch (IOException e) {

                    Log.v(getString(R.string.app_name), e.getMessage());

            }

    }

    private void nextSong() {

            if (++currentPosition &gt;= songs.size()) {

                    // Last song, just reset currentPosition

                    currentPosition = 0;

            } else {

                    // Play next song

                    playSong(MEDIA_PATH + songs.get(currentPosition));

            }

    }
}
</code></pre>

<p>The Activity in which videoview is used:</p>

<pre><code>public class videoshow extends Activity{
    public void onCreate(Bundle savedInstance)
    {
        super.onCreate(savedInstance);
        setContentView(R.layout.videoshow);
        //Intent intent = getIntent();
        //Bundle bundle = intent.getExtras();
        VideoView videoview = (VideoView)findViewById(R.id.videoView1);
        MediaController mediaController = new MediaController(this);
               mediaController.setAnchorView(videoview);
        //videoview.setVideoPath(bundle.getString("pos"));
        videoview.setMediaController(new MediaController(this));
        videoview.requestFocus();
        videoview.setVideoPath(MEDIA_PATH);

        videoview.start();
    }

}
</code></pre>

<p>Plz help me out</p>
