I have been able to play videos in the emulator using Android 1.5 and
1.6 (using the MediaPlayer class).
However I have also just noticed that it doesn't work in the emulator
in Android 2.1 - I only hear the sound.

Does anyone actually know why? I don't have an Android 2.1 phone to
test with, so I'm very much stuck now with my development.

Kind regards,
Eugene

On Jan 22, 6:26 am, "Mark Murphy" <[email protected]> wrote:
> > Hi guys, a spent the whole day on this and still cannot find a
> > solution for this.
> > Here's my short code:
>
> >        super.onCreate(savedInstanceState);
> >        setContentView(R.layout.videoview);
> >        SurfaceView v = (SurfaceView) findViewById(R.id.surface_view);
> >        holder = v.getHolder();
> >        player = MediaPlayer.create(this, R.raw.psa);
> >        player.setScreenOnWhilePlaying(true);
> >        player.setDisplay(holder);
> >        try
> >        {
> >          player.start();
> >        }
> >        catch(Exception e)
> >        {
> >               e.printStackTrace();
> >        }
>
> > Thevideoitself is in raw directory.
> > When the application starts I can hear thevideo'ssound butnoimage
> > is displayed.
> > I've tried using 1.5, 2.0 and2.1, same thing.
> > I've tried this with different videos, tried converting them using
> > ffmpegX and "Videora Android Converter", nothing helps.
>
> > I'd appreciate some help, thanks !
>
> Use an actual Android device for working withvideocontent, or use a
> quad-core desktop with the emulator. I have had limited luck getting much
> out of the emulator with lesser machines. For example, just today, I
> attempted to play an MP4 clip that works fine on a G1 and on a quad-core
> desktop. I tried it on an Android2.1emulator running on a dual-core
> 2.5GHz Vista machine, and it didn't play thevideo.
>
> --
> Mark Murphy (a Commons Guy)http://commonsware.com
> Android App Developer Books:http://commonsware.com/books.html

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to