Is there a working sample for the Android 1.5 VideoView/MediaPlayer class?
-
06-07-2019 - |
Question
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.
Solution
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.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow