playnice: make your iPhone autoupdate Google Latitude
Last week Google released a version of Latitude for the iPhone. Unfortunately it’s a web page that you have to visit every time you want to update your location.
In my opinion, it would be nicer to have my iPhone automatically update my location in the background without having to visit google.com/latitude every time I want to let my friends know that I’ve moved.
So this weekend I wrote a script that does just that.
It works by scraping the iPhone location from MobileMe‘s Find My iPhone feature, using the code from Tyler Hall’s sosumi project. When you enable Find My iPhone, your iPhone will regularly send its location to MobileMe.
Google doesn’t provide an API to update Latitude yet, so there is some scraping involved on that end too. Thanks to Jack Catchpoole for his help with the Google scraping.
Of course, you need a MobileMe subscription for this to work.
With all the scraping, playnice could be fragile and subject to any minor changes Google and Apple might make.
It would be nice if Google and Apple would offer APIs for these services in the future.
But at least for now, it works.