This weekend I finally found the time to dabble with Android development, something I'd planned for quite a while now. Since I'm a fan of Locale, which allows you to change various phone settings based on e.g. your location, I decided to try to write a plugin for Locale. There is already a plugin which lets you silence your phone whenever your calendar shows an appointment but I found that it doesn't work with older Android versions (Too bad my phone only runs Android 1.5.) So this was to be my first Android project...
The first obstacle was that Android doesn't have an official API to get at the calendar data stored on the phone and I really didn't want to hit the net every few minutes. Luckily Jim Blackler has an excellent blog post showing how to access the calendar on your phone, so that problem was solved quickly.
Another invaluable resource was the developer documentation and example plugin provided by Locale's developers, two forty four a.m. LLC.. A few hours later I actually had the first working version of the plugin on my phone (see screenshots).
It's still far from perfect, e.g. I fear it sucks the battery empty much faster than I'd like. Nevertheless I found it quite exciting how easy it was to get so far. If you're interested in the source code you can find it on Github but please bear in mind that it is still quite unpolished. You certainly won't find any clever tricks in there ;-) But unlike that other plugin (for which I paid, BTW), this one at least works...
Sunday, March 20, 2011
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment