Android – How to implement ClientLogin on Android to access Google services

android

What is a good way to implement the Google ClientLogin scheme below on Android?

http://code.google.com/apis/accounts/docs/AuthForInstalledApps.html

My understanding is that Android does not support the GData API. So I wanted to say, login to my Google books account, will I be able to do it using Android and the reference above? What classes should I be looking at in the Android SDK? (I am using Android 1.6.)

Best Answer

There's nothing special you need to do; you can use the standard Java networking and built-in Apache Commons HTTP client library to make the HTTP requests.

You just implement the required requests, though note that you may need to handle the display of a CAPTCHA if Google asks you to.

As there are a few OAuth implementations for Android already, you could also try looking at Google's OAuth authentication mechanism — but it actually looks more complex and not as seamless...