Hi, I've spent 5 hours but still can't find out. My situation is:

I want to play a video file, so I use VideoView. Then VideoView
requires a file name or an URI, but I have no idea what it is. I have
a local video file, but I don't know how to make it visible by
VideoView.
I tried DDMS, but it just says "Failed to push video.3gp on
emulator-5554: Read-only file system" and rejects my upload. I also
has no idea how to set sdcard.

Thanks for helping!

I tried another way, but when I use MediaPlayer, the prepare() method
throws "ERROR/MediaPlayer(5779): prepareAsync called in state 8" then
crashes. My code is:

        SurfaceView sv = (SurfaceView) findViewById(R.id.viewer);
        MediaPlayer mp = MediaPlayer.create(this, R.raw.video);

        mp.setDisplay(sv.getHolder());

        try {
                        mp.prepare();
                        mp.start();
                } catch (Exception e) {
                        // TODO Auto-generated catch block
                        e.printStackTrace();
                }
    }

and this is not called in onCreate(). How can I set the MediaPlayer's
state so it can prepare?

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to