A distinctive clock as app. Sortof.
A while back, someone on my twitter stream posted a link to the “QLOCKTWO”. I was immediately taken with it. Not to the tune of a thousand dollars, mind you, but taken none the less.
With my GalaxyTab sitting in its display stand on my desk, I thought that clock would be an ideal little app.
And it was.
The basic 10x10 display came together quickly, followed by a few evenings tinkering with various options (different sizes, fonts, colors, embedded messages, date options, etc.)
The local storage API means that you can go away and come back to the same clock (the designs are random otherwise), the manifest means that it should continue to work when you're offline. It's all good.
Alas, neither JQTouch nor PhoneGap lived up to my modest expectations. I wasn't able to build a settings UI with JQTouch; the alignment of labels and inputs was mystifying. In fairness, I'm prepared to believe that had as much to do with my general inability to design UIs as JQTouch.
PhoneGap, on the other hand, just hasn't matured enough to meet my needs. I'm not saying it won't, it's an impressive bit of kit, but it's not there yet. I need the ability to read the hardware buttons on the Android; I get the impression that there are workarounds for this shortcoming, but I didn't investigate too deeply. I also need the ability to detect when the device is running on A/C power and to control screen brightness. I'm sure it can be done, but I've exhausted my interest for the moment.
If you want to see it in action, I've put it up at http://apps.nwalsh.com/wordclock. The source code is on github.
A few notes:
You can access the settings panel by clicking on any letter on the clock.
The clock updates every five minutes, so I don't think it puts too much of a drain on the battery of your device (if you run it on your device). But YMMV.
The placement of words and interstitial letters is random, but there are a number of constraints. Given a configuration, the code tries to find a layout that satisfies all the constraints. If it fails, it tries again. If it fails 800 times in a row, it gives up.
It's easy to overconstrain the problem (putting a long message on a small face, for example), but the initial configuration isn't overconstrained. If you get the overconstrained error message on your initial attempt to load the clock, just hit reload.
Share and enjoy.