Being developers of mobile applications, we have a lot of testing devices to field test our apps with users and customers. Due to the rapid development of the mobile market, however, we also have a lot of devices in our drawers getting dusty, because they are no longer industry standard or of interest to our clients.
Though not in a great demand anymore, these old devices are still incredible gadgets. Our latest addition to ‚the drawer‘ was the iPhone 3G. This device still sports some pretty impressive specs for a mobile device and conveniently fits in the palm. Now, with the introduction of Xcode 4.5, Apple finally dropped the support for armv6, thus officially labeling devices such as the iPhone 3G dead meat and we understand this decision for the sake of progress. In comparison to its younger siblings, even our 3G is now a bit worn out. However, because it has never been carried around a lot, it is still in good shape apart from the weak battery which eliminates its intended use.
Because the 3G is such a great device, but officially of no relevance to our work anymore, we decided to honor it with a day of our monthly tinkering. Brainstorming about ways to upcycle the device by taking advantage of its hardware and software power, we decided to create an app for the bathroom. The app we created is not rocket science, but a nice contribution to our office and an instructive little finger exercise for many of us.
In order to give new life to our old buddy, we gave ourselves a simple but fuzzy objective: „Let’s create an app that uses specific features of the hardware and reintegrates the phone practically back into an office life.“ We wanted to repurpose the device by showing off its capabilities and morphing it from an unfortunately useless object to a smart ubiqutious piece of technology in the office. Location and purpose have been decided through lot with the results of „bathroom“ and „comfort“ as design parameters.
Let’s make an app for that
The app coined “DJ Privy” is addressing a simple issue. Daily maintenance routines, such as the walk to the bathroom, are monotonous. Moreover, in a bathroom we sometimes create sounds that we don’t really like to share with the world outside the bathroom door. Everybody has been in this situation once and although it has never been an issue in the office, we thought it might be a valid problem case for the sake of tinkering.
DJ Privy has been conceived as a combination of a stationary alarm clock, webradio and a light sensor. Placed in the bathroom, the app is built to play music once a light switch has been turned on so you don’t have to worry about any sounds anymore. On top of that it even caters for a little bit of entertainment.
Putting the pieces together
As mentioned, with the introduction of Xcode 4.5, Apple finally dropped the support for armv6 so there is no chance to deploy to the 3G under normal conditions. Fortunately, with the help of this little post, we were able to deploy to the 3G despite Snow Leopard and the new IDE.
Keeping in mind, that most of the problems we had to address had most likely already been solved by others, we looked around for code snippets and useful libraries. Matt Gallagher, for example, wrote a great streaming app that we used as foundation. Being able to stream a music station (we used soma.fm’s secret agent fm), we set up a little gcd to analyse the luminosity of the back camera in specific time intervals and handle the music stream at the same time. Thereby, DJ Privy is able to continuously check if the light in the bathroom has been switched on and to play a tune if this is the case.
Ready to take the stage
For a couple of days now, DJ Privy is filling the bathroom with acoustic irradiation. In the following video you can see our little project in action…
If you are interested in the source code, you can download a copy from the repository at github. It needs to be mentioned though, that we glued this app within a couple of hours with a variety of distraction along the way, so be warned, the code is as pretty as a rag rug.
Again, the app is neither rocket science nor constructive progress in any way. However, there is huge appreciation to them good folks on the interweb, who make this kind of prototyping possible and who love the idea of repurposing. It’s good times for tinkering folks…