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. How to set the length of what is presented by Toast.maketext()

Dear All,

As part of my program development, I am using the command
Toast.makeText(getBaseContext(), " Latitude [" +
location.getLatitude() + "] longitude [" + location.getLongitude()
+"]", Toast.LENGTH_SHORT).show();
to display the current coordinates

The command works fine and display the coordinates as planned.
My only problem is related to what is displayed.
So far, I display the full result with approx 14 digits.
It would be great if I could present the results with only 5 digits.

Please, can you help me? Is there a command that I can add to truncate
the results from 14 to 5 digits?

Best Regards
ckloch

-- 

2. Preparing webapp for i-Jetty / using dx tool

Hi,

Has anyone successfully converted their web app to work with i-Jetty?
I seem to be unable... My first problem is trying to run the dx tool
with argument given in i-Jetty's pom.xml file (I'm trying to mimic
their process since I get errors when trying to run pom.xml with maven
eclipse plugin).  I run dx from command line:


UNEXPECTED TOP-LEVEL EXCEPTION:
java.lang.RuntimeException: .\com\test\ijetty\hello\HelloWorld.class:
file not found
        at com.android.dx.util.FileUtils.readFile(FileUtils.java:55)
        at
com.android.dx.cf.direct.ClassPathOpener.processOne(ClassPathOpener.java:
133)
        at
com.android.dx.cf.direct.ClassPathOpener.process(ClassPathOpener.java:
108)
        at com.android.dx.command.dexer.Main.processOne(Main.java:247)
        at com.android.dx.command.dexer.Main.processAllFiles(Main.java:
183)
        at com.android.dx.command.dexer.Main.run(Main.java:139)
        at com.android.dx.command.dexer.Main.main(Main.java:120)
        at com.android.dx.command.Main.main(Main.java:89)
1 error; aborting

Can someone help me out?

Thanks,
Chris

-- 

3. Default Paint size too small on new device; is there a better source?

4. Data connection via cell modem (GPRS)

5. Bluetooth socket to non Android device

6. <WTA> Buat Desire user, ada yang sering HH reboot sendiri?

7. Changing factory default settings?