Recently we had a project at Onirica about creating/porting a DLNA Media Server for/to the Android platform. It was a good choice to start playing with the Android platform as it allowed us to evaluate several things:
- Android APIs usage (UI, Activities, Services, Content Providers, ...)
- Effort to port existing java code to Android
- Android tools
The adapt/port process included:
- Adding a hook for opening local files (originally included in the .jar file) to use through android R.raw
- Replace the Xerces based parsing code with the XML stack available in Android
- http transfer for local files, including 206 Partial-Content support
- Scanning android MediaStore providers to get info (size, duration, title, mime types, etc...) from the content and add it to the server
- Minimal UI
- Activity and Service
- Android emulator does not support multicast. UPnP servers use SSDP packets to announce the server in the local network using a multicast address. It was not trivial to solve: we had to create a dummy server doing only the SSDP announce outside the emulator and port redirection (android redir inside the amulator and rinetd on the host) so the clients in our local network could access the server
- Unexpected bugs on the android SDK

click on the image to view a demo video
