Just a little side note -- you need the permission: com.google.android.googleapps.permission.GOOGLE_AUTH
NOT android.permission.GET_ACCOUNTS For this snippet to work. On Jun 1, 5:13 am, admin androidslide <admin.androidsl...@googlemail.com> wrote: > Great thanks - I'll give that a try. > > 2009/6/1 Sujay Krishna Suresh <sujay.coold...@gmail.com> > > > First u need to do get framework.jar from > >http://github.com/android/platform_frameworks_opt_com.google.android/.... > > .. > > next include this lib into ur project... > > this piece of code is to be placed in ur onCreate method... or any other > > method where you wanna invoke this.. > > com.google.android.googlelogin.GoogleLoginServiceHelper.getAccount(this, > > 123, true); > > and in ur onActivityResult place the foll code or anythin similar.... > > if(requestCode==123){ > > System.out.println(resultCode); > > for (String key : data.getExtras().keySet()) { > > System.out.println(key + ":" + > > Arrays.toString(data.getExtras().getStringArray(key))); > > String accounts[] = data.getExtras().getStringArray(key); > > usernameText.setText("You are : "+accounts[0].replace("@gmail.com", > > "")); > > } > > } > > > On Mon, Jun 1, 2009 at 1:55 PM, admin androidslide < > > admin.androidsl...@googlemail.com> wrote: > > >> Looks like I was wrong! > > >> Could I take you up on your offer to post the code to do this? > > >> 2009/6/1 Sujay Krishna Suresh <sujay.coold...@gmail.com> > > >>> I'm actually able to get the list of accounts registered in my app... > >>> its finally workin now... :).... if anyone needs the samethin... feel > >>> free to ask... > >>> i'll give u the steps to get the registered google accounts... > > >>> On Mon, Jun 1, 2009 at 1:06 PM, admin.androidsl...@googlemail.com < > >>> admin.androidsl...@googlemail.com> wrote: > > >>>> You will need to wait for an official response from a google dev but > >>>> my two cents worth is that I remember somewhere this feature is > >>>> disabled for security reasons. Try searching this group I think it > >>>> was discussed once before. > > >>>> On Jun 1, 6:47 am, Sujay Krishna Suresh <sujay.coold...@gmail.com> > >>>> wrote: > >>>> > Plz respond... i need it asap... I dont want my app users to be > >>>> entering > >>>> > their G acc info in my app again... > >>>> > when i add > >>>> > <uses-permission > >>>> > android:name="android.permission.GET_ACCOUNTS"></uses-permission> > >>>> > to my manifest file i get an extra app permission sayin > >>>> > Your Google Accounts > >>>> > discover known accounts > >>>> > does anyone no how i can use this permission to actually get the acc > >>>> > details??? > >>>> > On Mon, Jun 1, 2009 at 10:25 AM, Sujay Krishna Suresh < > > >>>> > sujay.coold...@gmail.com> wrote: > >>>> > > hi, > >>>> > > i want to get the google account which has been registered > >>>> in the > >>>> > > phone... > >>>> > > the one that all the google apps use... is their any means to get > >>>> hold of > >>>> > > the username of the google account??? > > >>>> > > -- > >>>> > > Regards, > >>>> > > Sujay > >>>> > > W. C. Fields < > >>>>http://www.brainyquote.com/quotes/authors/w/w_c_fields.html> - "I am > >>>> free of all prejudices. I hate every one equally." > > >>>> > -- > >>>> > Regards, > >>>> > Sujay > > >>> -- > >>> Regards, > >>> Sujay > >>> Groucho > >>> Marx<http://www.brainyquote.com/quotes/authors/g/groucho_marx.html> - "A > >>> hospital bed is a parked taxi with the meter running." > > > -- > > Regards, > > Sujay > > Erma Bombeck<http://www.brainyquote.com/quotes/authors/e/erma_bombeck.html> > > - "A friend doesn't go on a diet because you are fat." --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---