Wednesday, October 22, 2008

From Sidekick to T-Mobile G1 Google Android with Contacts

Bookmark and Share
I received my G1 a day early - October 21. I took a half day from work to make the transition which was fortunate, because for as many things as the crew at Google got right, there were some things that T-Mobile overlooked.

I realized this after moving the SIM card from my Sidekick ID to the G1. When I turned the phone on and began digging around in what was a very new interface for me, I quickly realized that my contacts - at least the ones with phone numbers - were gone. I tried loading the ones from the SIM card, but realized I didn't have them there either. If you have hundreds of contacts that you need daily as I do, this is a non-starter.

Here's my solution to moving contacts from the Sidekick to the G1, which assumes that you have minor league programming skills like editing HTML, editing a CSV file, and running a script at the command line. If you don't have these skills, there are probably better methods. I don't have access to Microsoft Outlook on Windows platforms, so this was the easiest option for me.

Caveat Emptor! This solution has the following limitations - if you destroy your entire personal data infrastructure based on these instructions, you were warned:
  1. You only get one chance to get it right, if you get it wrong, gmail will import the entries with a name such as "unknown", then the phone will synch these entries, and since there's no multi-delete that I can find in the phone, you'll have to delete them by hand. I found this troublesome given that I thought synch would take care of it.
  2. It does not handle contacts that have more than one phone number.
  3. It does not handle contacts that have email addresses.
  4. Additional phone numbers and email addresses are preserved, you just have to edit those contacts by hand.
The email information will be preserved in the notes field. If you know how to preserve this information correctly, please comment. My contacts in the Sidekick were more than 90% phone-only, so email addresses were not a big concern for me. I already had those in gmail.
  1. Go to my t-mobile and show all your contacts in a list.
  2. Save the page as html: in firefox, right-click, save page as: index.html is fine. The method is similar in other browsers.
  3. Edit the html, remove everything above the second opening table tag except the opening doctype, html, head, and body tags.
  4. Find the closing table tag corrsponding to the opening table tag in #3 above - this will be the next table tag in the html.
  5. Remove everything below the closing table tag except the closing body and html tags.
  6. Save index.html
  7. Download this python script.
  8. Save the script as html2csv.py.
  9. Make sure you have python installed. If not, you can get it here.
  10. Run the script at a command line in the location where you placed the script and your contact list html: python html2csv.py index.html
  11. Edit the resulting index.csv and set the top line to: "","Name","","","Phone","","Email Addresses",""
  12. Go to gmail, click contacts, then import
  13. Select the index.csv file that you just created in the file browser, then click import.
  14. You should see your contacts appear in gmail, then shortly thereafter they will synch and appear in your G1. I use the contacts display group entitled contacts with phone numbers so I only see the contacts that have phone numbers.
  15. Edit any contacts with multiple phone numbers using gmail on the web by removing the extra phone numbers that are concatenated onto the main phone number and creating new entries for them.
While a bit long-winded, this gets the job done relatively quickly with minor issues for hand-editing. It also points out just how poorly import/export capabilities are designed into, or not designed at all, in many of these systems. Just try finding documentation of the CSV that many of these systems export or import. I found it nearly impossible and guessed by looking at gmail's export to CSV in outlook format. It also points to the need for multi-entity edit capabilities in gmail's contacts feature. If you edit many contacts, you'll realize that having to click a button to get to the notes field is ridiculous, and then having to click save on every entry is a lot of work. It gets very tedious for mass edits.

4 Comments:

Blogger dreimann said...

"You only get one chance to get it right, if you get it wrong, gmail will import the entries with a name such as "unknown", then the phone will synch these entries, and since there's no multi-delete that I can find in the phone, you'll have to delete them by hand."

That's not completely correct. If you get it wrong then your G1 will sync the 'wrong' contacts to the web (Google Contacts) where you can delete them out relatively easily. Sync again Google Contacts (web) with your G1 and the 'wrong' contacts are gone.

9:06 AM  
Blogger David Watson said...

That may be the design, but the implementation leaves a lot to be desired. I had deleted the contacts from gmail on the web, the deletions never made it back to the G1, even after synching several times.

If I perceive it correctly, the cloud should always have the canonical copy of the data, the various devices then have views of that data. It seems clear here, that for some reason, those views were out of synch, despite the status conveyed by the devices.

9:27 AM  
Blogger Elizabeth said...

i am stuck! Help! I tried running this script and nothing happens!!

8:23 AM  
Blogger Elizabeth said...

im stuck! Help! uppn running this script nothing happenS!!

8:24 AM  

Post a Comment

Links to this post:

Create a Link

<< Home