Sunday, December 13, 2009

[android-developers] Sorry Cannot Play this Video

Hi!
trying to play video in a Emulator, "error" Sorry this Video cannot be
played" , please tell me what i am doing or not doing..

TIA

Cheers

package info.shouraig.com;

import android.app.Activity;
import android.net.Uri;
import android.os.Bundle;
import android.util.Log;
import android.widget.MediaController;
import android.widget.VideoView;

public class XSO5 extends Activity {
private static final String RTSP ="http://www.youtube.com/watch?
v=8bmWwxixT0Y
";

VideoView videoXSO5;

/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);

//***VideoView to video element inside Multimedia.xml file

VideoView videoView =(VideoView)findViewById(R.id.videoXSO5);
Log.v("videoXSO5", "***Video to Play:: " + RTSP);
MediaController mc = new MediaController(this);
mc.setAnchorView(videoView);
Uri video = Uri.parse(RTSP);
videoView.setMediaController(mc);
videoView.setVideoURI(video);
videoView.start();

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate