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. Desire Froyo Official Claimed by Adam_g of open desire

langsung aj nih :p

http://forum.xda-developers.com/showthread.php?t=726300

-- 
thx...

www.ekowanz.info

-- 
"Indonesian Android Community [id-android]" 

2. Problem with Multicast sockets

Hello folks,

I'm running some code on the nexus one - and I am having a very
strange issue. The "server" sends UDP packets out on the multicast
socket that the phone is joined to. The phone receives and sends stuff
to the multicast group fine, but it appears that the phone chokes when
it receives a large number of packets at one time.

For example, the server will occasionally send out 80 or so 512 byte
packets in one go around. The phone starts receiving the packets, but
then at the 31st packet (~16KB of data) the receive hangs (indicating
that there is nothing on the socket anymore.) I've done wireshark
testing and stuff so I know for sure that the packets are not being
lost. Even if some are being lost, it is very strange that EVERY test
produces the same result --- a large amount of data gets jammed onto
the socket at one time, but the socket only allows me to
socket.receive() for 16KB worth of data.

I have tried socket.setReceiveBufferSize() with a variety of values
(up to 1MB) -- but that doesn't seem to work. Interestingly, a call to
getReceiveBufferSize() tells me that the socket should hold roughly
100KB worth of data.

If I tell the server to slow down its send method (which I cannot
deploy, I can only do that for testing purposes) - everything works
fine, presumably because the packets aren't jammed onto the phone's
socket all at one time (ie. I tell the server to wait 1/2 a second
between packets.)

Has anyone else experienced this - if so - how did you get around it?
I *cannot* switch the application to TCP.

Thanks!

- Dan

-- 

3. Load images from a device and store in the app memory

4. Selected listview item with a shadow effect at boundaries

5. button text in new line

6. Animasi Booting id-android - EVO+ Desir

7. Blacklisted Apps