Android VideoView plays from SDCard but not from URL
<p>I have a problem with a android VideoView. It cannot play the video from the given uri.
Here is my code:
        mVideoView=(VideoView) findViewById(R.id.VideoView);</p>

<pre><code>        Uri videoUri=Uri.parse(extra.getString(VIDEO_URL));
        MediaController mc=new MediaController(this);
        mc.setAnchorView(mVideoView);
        mVideoView.setMediaController(mc);
        mVideoView.setVideoURI(videoUri);
        mc.setMediaPlayer(mVideoView);
        mVideoView.requestFocus();
        mVideoView.start();
</code></pre>

<p>I get the message "Sorry, this video cannot be played".</p>

<p>However if I download the video and store it on my SDCard and </p>

<pre><code>   mVideoView.setVideoPath(Environment.getExternalStorageDirectory()+"/folder/myfile.mp4");
</code></pre>

<p>it works.</p>

<p>It is bugging me for a day or two and I couldn't find any solution. Any help is greatly appreciated. Thanks.</p>
