简体   繁体   中英

Is there a working sample for the Android 1.5 VideoView/MediaPlayer class?

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.

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 .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM