3

Is there a way to get user's real name as set in Google account?

I can use AccountManager.get(ctx).getAccountsByType("com.google") to get user's google email address. However I'd like to get real name, for greeting user nicely in my app.

Is there some Android API to get this info?

Pointer Null
  • 36,993
  • 13
  • 79
  • 106
  • Do you use the account for anything else? If not you would request the USE_CREDENTIALS permission just for this. This permission is very powerful and should only be requested by an app if there is a serious reason. – Robert Aug 20 '12 at 09:50
  • Yes I do need USE_CREDENTIALS for other features. – Pointer Null Aug 20 '12 at 09:54

1 Answers1

-1

You can do this only in Android 4.0 (API level 14 +)

Please take a look at this post.

Community
  • 1
  • 1
Dmytro Danylyk
  • 19,094
  • 10
  • 59
  • 68