title: Android videoview doesn´t play rtsp
body: <p>I have the following simple Android application.</p>
  
  <pre><code>package com.example.videotest;
  
  public class MainActivity extends Activity {
  
  private Button playButton;
  private Button clearButton;
  private Button stopButton;
  private Button defaultButton;
  private VideoView mVideoView;
  private EditText editText;
  private String videoAddress;
  private static final String TAG = "videoTest"; 
  private String keyValue = "videoAddress";
  private String defaultAddress = "rtsp://v6.cache7.c.youtube.com/CjYLENy73wIaLQlpqssvHCj9nxMYDSANFEIJbXYtZ29vZ2xlSARSBXdhdGNoYLXw9ZeX2OLcUAw=/0/0/0/video.3gp";
  
  
  @Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_main);
      this.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
  
      SharedPreferences prefs = this.getSharedPreferences(TAG, 0);
  
      videoAddress = prefs.getString(keyValue, defaultAddress);
  
      playButton = (Button)findViewById(R.id.button1);
      clearButton = (Button)findViewById(R.id.button2);
      stopButton = (Button)findViewById(R.id.button3);
      defaultButton = (Button)findViewById(R.id.button4);
  
      mVideoView = (VideoView) findViewById(R.id.videoView1);
      editText = (EditText)findViewById(R.id.editText1);
      editText.setText(videoAddress);
  
      defaultButton.setOnClickListener(new OnClickListener() {
  
          public void onClick(View arg0) {
  
               editText.setText(defaultAddress);
               SharedPreferences appSettings =  getSharedPreferences(TAG, 0);
               SharedPreferences.Editor prefEditor = appSettings.edit();          
               prefEditor.putString(keyValue, defaultAddress);    
               prefEditor.commit();
  
  
          }
      });
  
      stopButton.setOnClickListener(new OnClickListener() {
  
          public void onClick(View arg0) {
  
               mVideoView.stopPlayback();
  
  
          }
      });
  
      playButton.setOnClickListener(new OnClickListener() {
  
          public void onClick(View arg0) {
  
  
              videoAddress = editText.getText().toString();
               SharedPreferences appSettings =  getSharedPreferences(TAG, 0);
               SharedPreferences.Editor prefEditor = appSettings.edit();          
               prefEditor.putString(keyValue, videoAddress);  
               prefEditor.commit();
               //PlayRtspStream("rtsp://10.0.0.32:5004/aac5.sdp");
               PlayRtspStream(videoAddress);
  
  
          }
      });
  
      clearButton.setOnClickListener(new OnClickListener() {
  
          public void onClick(View arg0) {
  
               editText.setText("");
               SharedPreferences appSettings =  getSharedPreferences(TAG, 0);
               SharedPreferences.Editor prefEditor = appSettings.edit();          
               prefEditor.putString(keyValue, "");    
               prefEditor.commit();
  
  
          }
      });
  
  
  }
  
  private void PlayRtspStream(String rtspUrl){  
      mVideoView.setVideoPath(rtspUrl);
      //mVideoView.setVideoURI(Uri.parse(rtspUrl));  
      mVideoView.requestFocus();  
      mVideoView.start();  
  }  
  
  @Override
  public boolean onCreateOptionsMenu(Menu menu) {
      // Inflate the menu; this adds items to the action bar if it is present.
      getMenuInflater().inflate(R.menu.main, menu);
      return true;
  }
  }
  </code></pre>
  
  <p>AndroidManifest.xml File</p>
  
  <pre><code>    &lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;manifest xmlns:android="http://schemas.android.com/apk/res/android"
      package="com.example.videotest"
      android:versionCode="1"
      android:versionName="1.0" &gt;
      &lt;uses-sdk
          android:minSdkVersion="8"
          android:targetSdkVersion="8" /&gt;
  
      &lt;application
          android:allowBackup="true"
          android:icon="@drawable/ic_launcher"
          android:label="@string/app_name"
          android:theme="@style/AppTheme" &gt;
          &lt;activity
              android:name="com.example.videotest.MainActivity"
              android:label="@string/app_name" &gt;
              &lt;intent-filter&gt;
                  &lt;action android:name="android.intent.action.MAIN" /&gt;
  
                  &lt;category android:name="android.intent.category.LAUNCHER" /&gt;
              &lt;/intent-filter&gt;
          &lt;/activity&gt;
      &lt;/application&gt;
  
  &lt;/manifest&gt;
  </code></pre>
  
  <p>when I run the application and set the videopath of the videoview to the default address, i get the prompt "Cannot Play Video". Here is the logcat file.</p>
  
  <pre><code>03-07 21:09:51.305: D/MediaPlayer(20031): Couldn't open file on client side, trying server side
  03-07 21:09:51.305: E/MediaPlayer(20031): Unable to to create media player
  03-07 21:09:51.305: W/VideoView(20031): Unable to open content: rtsp://v6.cache7.c.youtube.com/CjYLENy73wIaLQlpqssvHCj9nxMYDSANFEIJbXYtZ29vZ2xlSARSBXdhdGNoYLXw9ZeX2OLcUAw=/0/0/0/video.3gp
  03-07 21:09:51.305: W/VideoView(20031): java.io.IOException: setDataSource failed.: status=0x80000000
  03-07 21:09:51.305: W/VideoView(20031):     at android.media.MediaPlayer._setDataSource(Native Method)
  03-07 21:09:51.305: W/VideoView(20031):     at android.media.MediaPlayer.setDataSource(MediaPlayer.java:958)
  03-07 21:09:51.305: W/VideoView(20031):     at android.media.MediaPlayer.setDataSource(MediaPlayer.java:946)
  03-07 21:09:51.305: W/VideoView(20031):     at android.media.MediaPlayer.setDataSource(MediaPlayer.java:899)
  03-07 21:09:51.305: W/VideoView(20031):     at android.widget.VideoView.openVideo(VideoView.java:236)
  03-07 21:09:51.305: W/VideoView(20031):     at android.widget.VideoView.setVideoURI(VideoView.java:198)
  03-07 21:09:51.305: W/VideoView(20031):     at android.widget.VideoView.setVideoURI(VideoView.java:188)
  03-07 21:09:51.305: W/VideoView(20031):     at android.widget.VideoView.setVideoPath(VideoView.java:184)
  03-07 21:09:51.305: W/VideoView(20031):     at com.example.videotest.MainActivity.PlayRtspStream(MainActivity.java:109)
  03-07 21:09:51.305: W/VideoView(20031):     at com.example.videotest.MainActivity.access$6(MainActivity.java:108)
  03-07 21:09:51.305: W/VideoView(20031):     at com.example.videotest.MainActivity$3.onClick(MainActivity.java:85)
  03-07 21:09:51.305: W/VideoView(20031):     at android.view.View.performClick(View.java:4204)
  03-07 21:09:51.305: W/VideoView(20031):     at android.view.View$PerformClick.run(View.java:17355)
  03-07 21:09:51.305: W/VideoView(20031):     at android.os.Handler.handleCallback(Handler.java:725)
  03-07 21:09:51.305: W/VideoView(20031):     at android.os.Handler.dispatchMessage(Handler.java:92)
  03-07 21:09:51.305: W/VideoView(20031):     at android.os.Looper.loop(Looper.java:137)
  03-07 21:09:51.305: W/VideoView(20031):     at android.app.ActivityThread.main(ActivityThread.java:5041)
  03-07 21:09:51.305: W/VideoView(20031):     at java.lang.reflect.Method.invokeNative(Native Method)
  03-07 21:09:51.305: W/VideoView(20031):     at java.lang.reflect.Method.invoke(Method.java:511)
  03-07 21:09:51.305: W/VideoView(20031):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
  03-07 21:09:51.305: W/VideoView(20031):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
  03-07 21:09:51.305: W/VideoView(20031):     at dalvik.system.NativeStart.main(Native Method)
  03-07 21:09:51.315: D/VideoView(20031): Error: 1,0
  </code></pre>
  
  <p>Any ideas as to what I am doing wrong?</p>