OpenID for android apps that require SignIn -


i fresh developer on googles android platform - htc desire arrived last week.

now need way sign in existing application (java, running on jetty). server application developed using spring security 3.0.2

in case, want support following: if user has set android phone googlemail/google-account (and users do) want use account credentials automagically log in server app.

is there android framework supporting use-case? or there alternatives?

i read: http code.google.com intl/de-de/apis/accounts/docs/openid.html

how sign in app on google appengine described here: http://blog.notdot.net/2010/05/authenticating-against-app-engine-from-an-android-app

i think want use accountmanager

to find out type google account is, use like:

authenticatordescription[] types = maccountmanager.getauthenticatortypes(); // (authenticatordescription type : types) {   log.d("account types", type.type); } 

then like

accountmanager maccountmanager = accountmanager.get(context); account[] maccounts = accountmanager.get(context).getaccountsbytype("com.google"); // choose account use if there multiple google accounts registered, save account maccount accountmanagerfuture<options> response = maccountmanager.getauthtoken(maccount, type, options, activity, mcallback, mhandler); // define callback , handler return 

when user reaches mcallback in mhandler, login process done. usual google login dialogue used if user not logged in his/her google account.

try out , let me know if helped you!


Comments

Popular posts from this blog

c++ - How do I get a multi line tooltip in MFC -

asp.net - In javascript how to find the height and width -

c# - DataTable to EnumerableRowCollection -