I found some articles in developers group, and now work fine with
sdcard :)

It's like:
1. mksdcard 2147483648 sdcard.img
2. Addition Emulator Options "-sdcard sdcard.img"
3. adb push <file> /sdcard/<path>

But the VideoView occasionally crashes when playing 3gp file, I don't
know it's an Android bug or I've got something wrong. Mp3 files are
fine.

On 9月5ζ—₯, 午後4:32, "Romain Guy" <[EMAIL PROTECTED]> wrote:
> Have you tried pushing the file in /data?
>
>
>
> On Fri, Sep 5, 2008 at 12:27 AM, Urakagi <[EMAIL PROTECTED]> wrote:
>
> > 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?
>
> --
> Romain Guywww.curious-creature.org
--~--~---------~--~----~------------~-------~--~----~
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