Video from Url in Videoview
<p>I want to play a video from a url in a VideoView:</p>

<pre><code>@Override
protected void onCreate(Bundle savedInstanceState) {
    // TODO Auto-generated method stub
    super.onCreate(savedInstanceState);

    String path1="http://commonsware.com/misc/test2.3gp";
    Uri uri=Uri.parse(path1);

    VideoView video=(VideoView)findViewById(R.id.videoView1);
    video.setVideoURI(uri);
    video.start();
}
</code></pre>

<p>But I'm getting a NullPointerException when I try to run the app.</p>

<p>The logcat says that the problem is in: <code>video.setVideoURI(uri);</code></p>

<p>Can someone help me please?</p>

<p>Thanks.</p>
