Has anyone been able to successfully play a video using Android Things on a Raspberry Pi? If so was there anything special you had to do to get it to work? If not does any one know why it isn't working?
I made a simple video player that plays a local video from disk. The app runs fine on a phone but I get an error dialog on the Pi saying "Can't play this video".
One Thing I have already ran into but I think I solved was there are no content providers in Android Things, so instead of using a uri for the video source I gave it a file directly like so.
EDIT: Code edit
VideoView videoPanel;
.
.
.
videoPanel.SetVideoURI(Android.Net.Uri.FromFile(new Java.IO.File("/sdcard/Movies/videoFile.mp4")));
The Raspberry Pi makes a competent video player thanks to a wealth of software that you can utilize on it. Thanks to the Pi's small size and power-efficient hardware, it has become a popular choice for those wanting to play videos on their screen.
So, whatever OS you choose to use, just install it on the SD card and then stick it into the Raspberry Pi. Android for Raspberry Pi does not work “out of the box.” To get a working Android OS on Raspberry Pi, tweaks need to be made because Raspberry Pi and Android don't work natively together.
I was using 0.5.1-devpreview with raspberry pi 3, and tried to use exoplayer to play mp4. Audio works but not video (just black screen). Same result for youtube iframe sdk (black screen with only audio playing).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With