Thursday, December 09, 2010

Synching your N900 with Google (Mail, Contacts, Calendar) with no third-party tools or service.

Today I was thinking...that it's time I keep my phone in sync with my Google stuff (e-mails, contacts and calendar)

I started by clearing up my Google Cntacts (https://www.google.com/contacts) as they'll be later loaded into the device and because it's much easier to work from a desktop than from the device itself.
If you already have (and most probably that is the case here) contacts on your device, I'd suggest to export them in a file, mail them over to yourself and load them in Google).
Google contacts also helps you spot duplicates, but it's not the perfect tool in the world, so go scan your contact list once more.

As for the Calendar, be warned that only the main Google Calendar will be synchronized over. I cleared that a bit and moved a few events over.

I then went on the N900 and cleared the N900 calendar. You can skip this step as explained later.

To sync Mail on your N900 you have two valid options: use regular Gmail account in the default N900 Mail client (Modest) or use Nokia Messaging. The latter brings push e-mail, but if you don't care, then just set-up a Google Gmail account and you're done.
Also Nokia Messaging brings you a better control on when to synchronize your e-mail (like which days, what hours, if in roaming, minimum battery charge and intervals).

I configured IMAP on Google Gmail and configured which folders (labels in Google terminology) I wanted to sync. Registered with Nokia Messaging and entered my Gmail credentials. On the N900 it's just a matter of selecting Nokia Messaging and enter its credentials.
What's cool it's that Nokia Messaging shows as one single mail account in Modest, but it can be configured (on the Nokia servers) with multiple mailboxes (Nokia's terminology for Mail Account). I do let him handle my ovi.com account as well.

For Google Calendar and Google Contacts I use the Mail for Exchange (MfE) client provided with the N900 itself.
This client is really picky (it's a bug, but that's all we have) so follow the instructions carefully.

First of all it expects a clean calendar and a clean contacts roster.
You don't have to do either now.
Anyway, start MfE and enter you Google credentials. Note that "User name" HAS to be your full e-mail address (actually I didn't without the @gmail.com suffix, but that's what the whole Internet agrees upon). Leave Domain empty.
On the next screen type in:

Server: m.google.com

Leave the other untouched:

Port: 443
Secure connection: Tick

On the next screen UnTick e-mail (we've already covered that and it won't work anyway).
Leave calendar, tasks and contacts ticked.
As "First synchronization" choose "Delete items on device" (I found out it needs it, you may be lucky and try to leave them, but if you exported and loaded them on Google, you won't need them there now anyway).

On the Next screen tap on Advanced and scroll down to "Calendar and tasks".
If you didn't delete the N900 calendar as above, you will need to use a different one.
Tap on "Calendar" and choose "Create new". It will create a new "Mail for Exchange" calendar when synchronizing.
Keep in mind that if you get any errors and need to re-start, you NEED to have a clean calendar (either manually delete it from Calendar or Create a new one).
I never ticked completed tasks, so I am not sure it works.

Click on Save and go to the Next page.
It should synchronize everything with no errors.

When it has completed, tap on Finish and then on Details, sometimes it doesn't sync Contacts, if that is the case, tap on Synchronize Manually, it should sync them this time.

Unfortunately in my case, MfE forgets the configuration when I close it, so I don't know if it works stable over the days.
But before closing it I did try to update contacts and calendars and they were correctly kept in sync everytime I clicked on Synchronize Manually.

So, there you have it, hoe it works for you as well!

PS: later I'll update the post with screenshots and clean it up a bit.