I am writing an application that requires getting the username android username@gmail.com from the phone. I am looking at the AccountManager class. This is what I have in my code.
AccountManager accountManager = AccountManager.get(this); Account[] accounts = accountManager.getAccountsByType("com.google"); String email=""; email=accountManager.getUserData(accounts[0], accountManager.KEY_USERDATA);
However, I get caller uid 10085 different from the uid authenticator exception. Does anyone know how to do this?
PS. I don't need a password or authentication token, I just need a username.
android
Jon
source share