This post will cover the use of AccountManager (available in Android 2.0 and onwards) to access Google Accounts online.
It is a research article I am putting together mainly for my own use but my preliminary research revealed very few postings on the net, so I thought I'd keep it available online, so that it is accessible to more people as well as being a note board for myself.
It is possible to authenticate Google Accounts using HTTP requests but this requires the user to supply the app with both username and password, which is neither comfortable or convenient for the user. Using Google Authentication it is possible to use information already stored in the Android device to authenticate towards Google services without the Application needing access to username or password.
And authentication handled by AccountManager is handled in a generic way regardless of application.
I am performing this research in order to use it in my own Apps, primarily Analytics 4 Android (Free), but hopefully general application in your instance should be fairly easy. Please feel free to comment.
In this article I will be citing other works. I may/may not have asked for permission to do so, but I am hoping that if You are an author and/or publisher of any said works will treat them as fair use. I will try to provide adequate attribution and reference for any works used. If You feel that I am violating your copyright, please feel free to contact me on janholbo(at) gmail (d ot) com.
References:
- AccountManager (Android Reference material), http://developer.android.com/reference/android/accounts/AccountManager.html
- AndroidAccountManager (google-api-java-client), http://code.google.com/p/google-api-java-client/wiki/AndroidAccountManager
- Authenticating against App Engine from an Android app (Nick's Blog), http://blog.notdot.net/2010/05/Authenticating-against-App-Engine-from-an-Android-app
Links to be researched:
- Android: Account Manager: Step by Step (Final Concept), http://www.finalconcept.com.au/article/view/android-account-manager-step-by-step-1 & http://www.finalconcept.com.au/article/view/android-account-manager-step-by-step-2
- Android example source code file (AccountManager.java) (DevDaily.com), http://www.devdaily.com/java/jwarehouse/android/core/java/android/accounts/AccountManager.java.shtml
Other links:
No comments:
Post a Comment