Is it possible to stream music from Android/iOS devices to desktop devices?
I have开发者_开发问答 a ucLinux microcontroller, which connects to loudspeakers. Now I want to stream music from Android/iOS devices to the microcontroller, and make the loudspeaker play music on my mobile devices. The microcontroller and mobile devices can connect via wi-fi. Is it possible to do so? Thanks.
There's two parts to this - getting the files to the micro, and controlling the playback. The second part is easy - use mpd (http://mpd.wikia.com/). There's good clients available for Android and mpd is lightweight enough to run well on low-end or embedded devices, and ucLinux is specifically supported.
Getting the files there is trickier. mpd expects to get the files from a filesystem, which tends to require more "serverness" than Android typically has. I found two options.
If you can root the Android device you can run a samba server on the device (http://mobilitydigest.com/woah-samba-server-for-android/) and mount that.
If you can't or don't want to root the device, there is a WebDAV server for Android (http://www.androidzoom.com/android_applications/productivity/davdrive_fwtl.html) and Linux supports mounting WebDAV shares as a filesystem. It can be pretty fiddly to get working though, and reliability can be a bit iffy too.
Having said that, I think your best bet might be to give some local storage to the microcontroller and have it sync the files in advance, then control the playback with an mpd client.
If you write your own music streaming server, or find somebody who has written one, sure. There is no music streaming server built into Android itself.
精彩评论