How do you access the user's Google Account Id / username in code? I building am application that will call a web service to store data and I want to identify the identity of the person sumitting the data.
+5
A:
The account manager class has access to this.
http://developer.android.com/reference/android/accounts/AccountManager.html
sadboy
2010-02-11 16:37:59
Where does the AccountManager class reside. I'm developing for version 1.5 and I can't find this class.Here's the code I'm starting with from developer.android.com site.AccountManager accountManager = AccountManager.get(context);
KawBoy
2010-02-13 15:57:08
I found where the AccountManager class is new to 2.x. Is there a forward-compatible way to do this in 1.5?
KawBoy
2010-02-13 16:32:14
can you clarify how to use AccountManger.get(context)? What do i use as the context? if i use .get(getBaseContext()), it just returns null.
tommy chheng
2010-04-28 05:06:15