I’ve spent a few days reading through the Android developer docs and trying to get Eclipse to cooperate with my outlook on software development. It took giving up on Eclipse to get any real coding done. It was a bit tricky, as I’m not the all-star Java programmer I once was, and I got bogged down on silly syntax errors and library issues. For example, I forgot that ‘new’ is a keyword in Java, and trying to instantiate a class without it results in errors that don’t say, “what do you think this is, Python?”.
The pet project I started is an extremely simple music remote control to interact with Quod Libet, my music player of choice, running on my laptop. So now if I have my phone at the couch I don’t have to get up and walk six steps to my desk to pause or skip to the next song.
The overall architecture is mildly embarrassing, but works well. I’ve got a very simple web.py server running on my laptop that accepts three urls — prevous, next, and play-pause. When one of these is received, it sends a control command to quod libet to perform the associated action. The android client simply displays three ultra-ugly buttons that send requests to a (hard-coded, no less) IP and Presto! I can skip tracks and pause my music!
It’s barely working yet and the design is atrocious, but I’ve posted the initial version to github for
peer review and patches storage.
I really just wrote this for myself, the fact that I’m releasing it is mostly because a) I have a blog now and b) I have a github account now.
I’ve got several things on my to-do list, most importantly improving the client interface. I want to add volume control as well, and the ability to return the current song whenever an action is invoked. I might even add a polling feature to update the displayed song on the phone. I also need to do some config stuff, hard-coding the url may actually not be that flexible.