A notifier app for Fastmail

My super-secret spare time project this week is a notifier app for Fastmail, to cover the main failing in the mobile web client: no access to platform notifications.

Tonight I got the server-side stuff working, which is a small daemon that subscribes to your mailbox event channel and pushes change notifications through Google’s notification system to the client. The next step is to make the client respond by connecting back to the FastMail API and using the modseq (“modification sequence”, basically a revision number for your mailbox) to get the changes.

I’m doing it this way to avoid having to ship email content (eg subjects) through the push channel. It would be more convenient, but my more privacy-conscious users wouldn’t appreciate it, I’m sure!

The other client part, which I’ve already done, is the account manager. Its mostly just a OAuth client, though its a bit clunky right now. It requires calling out to the browser to get you to login, do the approval, and then copy & paste a verification code from the browser back into the app. I think it has to stay this way until I implement OAuth2 on the server. I don’t really want to, but it really does allow a much nicer registration flow.

There’s some API additions necessary too. I need a hook to allow registering and deregistering a GCM ID so our servers know that they need to push things (right now I have to manually update the database). And the last piece, and perhaps the most tricky, will be an endpoint to exchange an OAuth token for a live session key, which can then be used to go straight to a specific message in the browser with login. That’s something I’m handwaving away until the end because of the pain of doing it securely (avoiding CSRF and replay attacks, basically).

At this rate it should be ready for internal dogfooding early next week!

I’m still not sure how I feel about Android development. I still don’t enjoy Java, but the docs are pretty good and I have enough programming experience to know which keywords to search for. Necessity is always a good motivator though :)