Thom Nichols

Thom

Technology is evolution outside the gene pool

GMarks - Google Bookmarks for Android

GMarks is my first Android app.  I wrote it (1) to learn Android, and (2) because Android has no native bookmark backup solution, and Google has never released a native app for Google Bookmarks.  So it seemed like a reasonable project.  I did my best to utilize as many Android features as possible, where appropriate, which let me cover a lot of ground.  GMarks uses:
  • Live Folders
  • Full-text search
  • Global search 
  • Media sharing
  • Background services
  • A custom content provider
  • asynchronous tasks
  • HTTP remoting
Honestly, the most difficult part was not learning Android, but reverse-engineering the Bookmarks API since it's not public.  It is, thankfully, a fairly straightforward JSON REST interface so it wasn't too difficult.  The other difficult part was (and continues to be) authentication.  Since there's no real REST API.  The remote interface doesn't support OAuth or AuthSub authentication.  So I'm forced to more-or-less use password login, which is a big no-no for a third-party app to ask for one's Google password.  

I think I found a reasonable compromise for authentication - I actually use the Android browser to login, and then capture the user's authentication cookies.  That way, my app never actually handles the user's password.  It is, admittedly a little hack-ish and doesn't work all the time, but it's not a horrible solution all things considered.  This scheme also allowed me to support two-factor authentication easily.  GMarks watches when the two-factor verification page loads, and then launch the Google Authenticator app through a standard intent, instructing the user to copy the auth code and paste it into the browser.  Again, not perfect, but better than any third-party app that decides to ask for your Google password.

The app is available on the Google Market, and the code is completely open-source, including the SVG used for the icons and other graphic assets.  It's also been translated into 30+ languages thanks to the generous contributions from the XDA-Developers community. You can see sreenshots here.

Category: Android portfolio

(Comments are closed)

1 Comments

  1. avatar Re: GMarks - Google Bookmarks for Android Oct. 24, 2011 Brian Gonzalez

    I just want to say, has this method been thrown into the discussion?