title: [Java]Android Videoview works only with local files
body: <p>I tried to play a video from a url, but only local videos works in my code. If I try to open a video from a url my nexus 7 displays
  Can not play this video. Here is the code for the playback of a local file, it works fine (both are the same videos)</p>
  
  <pre><code>package com.sample.prog;
  
  import java.io.File;
  
  import android.app.Activity;
  import android.os.Bundle;
  import android.os.Environment;
  import android.widget.VideoView;
  import android.net.Uri;
  
  public class MainActivity extends Activity {
  
      static private final String pathToFile = "bigbuck.mp4";
      private VideoView videoPlayer;
  
      @Override
      public void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_main);
  
          File root = Environment.getExternalStorageDirectory(); 
  
          videoPlayer = (VideoView) findViewById(R.id.videoPlayer);   
          videoPlayer.setKeepScreenOn(true);    
          videoPlayer.setVideoPath(root + "/" + pathToFile);
          videoPlayer.start();
      }
  }
  </code></pre>
  
  <p>and here is the code for the playback of video from a url, but it don't work</p>
  
  <pre><code>package com.sample.prog;
  
  import java.io.File;
  
  import android.app.Activity;
  import android.os.Bundle;
  import android.os.Environment;
  import android.widget.VideoView;
  import android.net.Uri;
  
  public class MainActivity extends Activity {
  
      static private final String pathToFile = "http://www.myanimesource.de/bigbuck.mp4";
      private VideoView videoPlayer;
  
      @Override
      public void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_main);
  
          //File root = Environment.getExternalStorageDirectory(); 
  
          videoPlayer = (VideoView) findViewById(R.id.videoPlayer);   
          videoPlayer.setKeepScreenOn(true);    
          videoPlayer.setVideoPath(URI.parse(pathToFile));
          videoPlayer.start();
      }
  }
  </code></pre>
  
  <p>hope you can help me to solve my problem,</p>
  
  <p>regards
  christian</p>