Video From Youtube in Emulator Android 2.1 Eclipse Gallileo/ Unable to play video

by Valentino XM » Mon, 14 Dec 2009 06:08:32 GMT


Sponsored Links
 Hi!

having no luck with playback of video from source file, i thought id
try video from youtube... Emulator says it cannot play video.. So now
what?.. can anyone tell me aoubt this code below.

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();

--



Other Threads

1. Android Tutorial 099 (The secret to programming for android)

You may find yourself lost trying to learn to program for android if
you don't know about this document... The problem is that most
tutorial books dont talk about it, but you need to understand it
thoroughly before you can start programing. Most beginners will waste
days or weeks before finally coming across it. Is like finding light
in darkness...  http://bit.ly/cX91Mt

-- 

2. how can I know the service is already started



Without knowing how your counter value is getting from your Service to
your Activity, it is difficult to say if you need to "reconnect" or how
that might be done.

To stop a service, call stopService().


You don't, generally. Your activity will probably be calling
startService() to make sure the service runs (and will keep running even
after the activity ends). So, whether the service was started or not,
the activity will start it.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://twitter.com/commonsguy

Android Training in US: 14-18 June 2010: http://bignerdranch.com

-- 

3. Issue in playing m4a file after AAC codec integration.

4. Android demo on AT91SAM9G20-EK

5. 30 top android apps

6. Cloud2db JDBC driver for Google Android platform

7. ZappMarket Release