I have an application that implements my own Authenticator, as described in this article. And it works just as intended. Now I need to get the google account from AccountManager, and I do it as follows:
Account[] accounts = AccountManager.get(this).getAccountsByType("com.google");
The problem is that it returns an empty array. But when I use this snippet in my test application without any means of authentication, it works like a charm. I do not see where the actual difference is between these cases. Has anyone encountered this problem?
source
share