I got my first modern Android phone at the end of last week and I figured it would be a good idea to get over the activation energy hump so it’s easy to do incremental mozilla hacking on it. Thanks to a lot of work by other people, this turned out to be pretty easy. It would have been even easier if the Android emulator ran at anything remotely close to real time or if my Samsung Galaxy S Vibrant (Bell Canada model) running 2.1 did not have a habit of locking up all the time. (And this is before my code touched it, mind you. I’m half-hoping my device is a lemon. If anyone knows how to tell a lemon from lockups-as-usual, please let me know.)
The screenshot shows my Android device running the app. It’s a super trivial wmsy UI showing contacts from my address book pulled down from a weave server that were put there by Thunderbird.
Anywho, props to:
- Phonegap, the HTML/JS way to write mobile apps! Major awesome.
- weaveclient-chromium, a slightly bitrotted pure JS weave client by Philipp von Weitershausen / philikon (now of the mozilla weave/sync team) which built on the weaveweb project by Anant Narayanan and pure JS crypto work by the people mentioned in the README.
- weaver and weave-ext by Shane Caraveo, which make weave happily run in Thunderbird and have it propagate the contents of the address book.
- The Mozilla Weave/Firefox Sync team who made it easy and practical for software like Thunderbird to partake in the encrypted synchronization revolution.
- RequireJS, CommonJS loader to the stars.
The relevant repos for those interested, are:
- weaveclient-js: This is a fork of weaveclient-chromium that ditches the chromium bits, makes things CommonJS/Asynchronous Module Definition happy, and slightly factors out the encryption so that thunderbuddy can provide ‘native’ accelerated encryption support on android.
- thunderbuddy: The phonegap android app repo proper. The only really notable thing at this point is the custom Java class that implements and exposes faster ‘native’ encryption methods. (Thunderbuddy can also just be used as a webpage on any reasonably capable browser with good JS performance.)
It’s worth noting that the goal is not actually to perform contact synchronization with Android. There are already a ton of ways to synchronize your Thunderbird contacts with gmail and from there your phone. The goal is to let other interesting data and meta-data propagate. I just picked contacts for this example because Shane already had the data propagating.