That only took me to 6am. What else was I going to do today? How about a new project? Enter 4sqNoGPS... (You need a Foursquare account to see it because it starts with the OAuth handshake.)
It's a replacement for Foursquare mobile that is optimized for my handset. (or, as Ericles put it, the smartest non-smart phone :) ) There are numerous problems with Foursquare mobile:
- It sends you through too many screens to do a check-in, which compounds the slowness.
- There are strange bugs, such as check-ins that don't stick.
- All searches are on venue name only, which is vulnerable to typos from fellow Foursquarers.
- Adding a venue is tedious and sometimes fails, so you have to key in all the info again.
- The granularity at which you can change your location is to the closest town or zip code, which could be miles off. Worse yet, the Foursquare people broke that function a week ago and haven't fixed it or responded to inquiries.
- Because my phone does not have GPS, allow manual input of coordinates and make it easy to do on a phone without a full keyboard.
- Streamline the check-in process. Coordinate input should lead directly to a venue search around that point with one-click check-in after that.
- Add a venue by coordinates without entering a full address. (Foursquare API documentation refers to this as an "orphan", but I figure I could always fill in the address later when I'm back at the computer.)
There was also a bit of a trick to holding on to the request secret while the user visits the Foursquare website to allow the OAuth request. That's simple in a desktop application because you can keep that string in memory, but in a web application, the callback handler has to start from scratch. I borrowed a technique from one of the other OAuth libraries of using memcache with db backup to save the token and secret.
Once all those issues were settled, it was a snap to add the functionality and test it in the App Engine dev environment. There is more that I'd like to do -- for example, this app doesn't support shouts and doesn't show the user's badges yet -- but it already does what I need it for, so no hurry. I took it out on a few errands tonight as a test run. Among other venues, I went to the Scottish place. :) Yes, it is indeed faster than Foursquare Mobile. I hit a non-critical error when I checked in at Pathmark, so I'll have to make it a bit more tolerant of bad or missing data from Foursquare. I posted the code at Google Code but be forewarned that it's not production quality and it's probably useful only to me anyway. :)