Thunderbuddy: Weave-synchronized Thunderbird contacts on Android

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.

9 thoughts on “Thunderbuddy: Weave-synchronized Thunderbird contacts on Android

  1. Awesome!

    If I understand correctly, the app just shows the metadata pulled from the weave server, it’s not syncing it with the Android address book. Correct?

    What kind of other things would you like to pull from the weave server? How are the plans for the Thunderbird Weave^W Sync going?

  2. Jonathan, yes, right now the app just grabs the data from the weave server every time and displays the information in the UI. It is not persisted anywhere. The next step would be to persist some of the data in localStorage, if only because the encryption is still pretty darn expensive.

    I personally am interested in using my mobile to fill in the short blank spaces where I might be waiting in line or what not with things that are a mix of productive and amusing. For example, synchronizing contact pictures to my phone so I can draw mustaches and funny hats on people and then synchronizing them back up. Delving into flame-wars for juicy nuggets or to perform some categorization so a morbid visualization of it can be made. And the like.

    There could also be good and practical things that could be done, but the reality is that I am sufficiently far out of the norm that it might be best to draw on other people for that.

    I think Shane has a revamp of the Thunderbird weave stuff planned.

  3. wabik, I think calendar/lightning is potentially in an even better synchronization place just because there is a standard for calendaring data, at least for consumption. I suppose modifying calendars could still be improved if the answer is not just “use the google solution”.

    In my eyes, the most exciting potential feature of weave is synchronizing data for which there is currently no well-established standard. That and more granular levels of privacy and trust. Weave originally had support for sharing information with other people in a cryptographically secure way. I think they lost that feature out of a need to focus and drive the core functionality through, but it’s still quite possible to pursue that, and I think it would be quite interesting.

  4. Good work. I hope something like this will be available for my next phone, probably MeeGo. I do think that it’s worth trying to get straight contact sync between Thunderbird and Android, like you identify, there are many services out there that allow you to do it through Google, but that’s not the point.

  5. other Jonathan, yes, if you don’t already have Google in the picture (as could be the case for MeeGo), then direct sync through weave would be nice. Weave’s ability to keep your data private is great and it would be nice to provide that option.

  6. Your phone is a lemon. Galaxy S devices might stutter when installing apps, and other random places, but they will not lock up unless:

    1. You installed a load of crap software on it
    2. There’s a problem with it

    Try a factory reset, and if that yields no better then send it back for a exchange or something.

    If possible get a different device, like a droid 2 or a desire z while you’re at it.

  7. Thanks for the notes. My research suggests all Bell Mobility Galaxy S devices in Canada are lemons for the time being, at least until a new (2.2?) firmware gets released.

    I’m basing that off of this thread and other comments I’ve found around:
    http://forum.xda-developers.com/showthread.php?t=775017

    Long thread short, areas with bad reception (where it has to switch towers/bands/whatever) seem to result in lock-ups. It’s happy at my apartment where the reception is good.

Comments are closed.