views:

4007

answers:

1

Hi folks, I'm new to Android dev.

There's a very pretty state diagram of the MediaPlayer, but I can't for the life of me figure out how to actually use this class to play a video.

There's a view samples around the 'net, but they seem to be for previous versions of the SDK. I've also checked the official samples, but with no luck.

+1  A: 

Yes. There is example code for VideoView and MediaPlayer in:

<android-sdk>/platforms/android-1.5/samples/ApiDemos/src/com/example/android/apis/media/

These aren't linked anywhere in the online help, as the samples there are out of sync with what is actually shipped.

Edit: Note the samples exist, but they don't work in Android 1.5, see this bug.

Justicle