mozilla-b2g/gaia-email-libs-and-more — pull request #53 by asutherland (2012-09-28 22:35:36+00:00)
Title: Periodic sync and notifs

@mozsquib This is not completely done yet, but it seems to broadly work. I'll add the gaia pull request too that goes with this.

Key notes:
- only tested with IMAP right now, but I think it should work with ActiveSync too. On IMAP I am observing some duplicate new message detection happening; I think that might be the INTERNALDATE issue I have an issue filed on.
- periodic sync is disabled by default, you need to set it. The 3 minutes settings is actually for 30 seconds right now to make testing easier.
- mozalarms does not work on b2g-desktop, just on the device itself. So for now I've commented out the mozalarms stuff and am using setTimeout, but ideally we should use mozAlarms on the device and setTimeout on b2g-desktop. I think that might make sense as a very soon follow-up next week just for paranoia reasons about causing problems for other apps.
- there's a lot of console.log stuff in there right now, ideally it should be helpful.
- clicking on the notifications does cause some underlying XPCOM errors somehow that I haven't looked into yet.