Questions tagged [accountmanager]

AccountManager keeps track of cloud login information on Android devices. It uses plugins to communicate with different kinds of services, and the user only has to enter the information once. Applications don't need to deal with passwords, and may instead ask for permission to gain access to specific accounts.

As a part of Google's Android SDK, the AccountManager can be used create a separation of the cloud account information entered by the user and the applications that make use of it. Since web services are constructed differently from each other, AccountManager uses plugins (authenticators) in order to communicate with them.

An application can ask for permission to access a certain account. If successful, the application receives a token, and never has to deal with the actual password. The user can find a list of all accounts that are used on the device under Settings > Accounts & sync, and may at any time remove an account that shouldn't be accessed anymore.

519 questions
15
votes
1 answer

How to make AccountManager (authtoken) and OpenID work together (without AppEngine)?

I am making an Android app which should be able to get data from a web service (which is not part of GAE). Users are able to log in to web service through their browser by using OpenId (only Google accounts are allowed). AccountManager can give me…
user765667
  • 159
  • 1
  • 3
15
votes
4 answers

Android SyncAdapter Automatically Initialize Syncing

I have a SyncAdapter for my app, and an AccountManager to add my apps accounts to the Android Account Manager. My code for when I add an account to the Account Manager looks like: Bundle data = new Bundle(5); data.putString(_PEOPLE_ID,…
Dandre Allison
  • 5,975
  • 5
  • 42
  • 56
14
votes
3 answers

Can I use AccountManager to let users sign in with their Google account?

I'm creating an app that will need users to create an account. (Like Facebook or Twitter would require you to.) BUT, since it's an Android app, should/can I let them sign in with their Google Account using AccountManager or some other service? It'd…
Cole
  • 2,805
  • 9
  • 44
  • 61
14
votes
1 answer

Use refresh token if auth token expired in account authenticator

I have an app which uses AccountManager to store users' accounts. Users log in and sign up through my REST API using OAuth2.0 password-username credentials flow. The access tokens that users receive expire in 2 hours and need to be refreshed until…
Denis Yakovenko
  • 3,241
  • 6
  • 48
  • 82
14
votes
5 answers

How can I get Primary Email Account of Android phone?

I am working on a project, and I have to fill the EditText automatically with the user's primary email, I am considering primary email as the email that associated with google play store. I have read this post and implemented that. If we are using…
droidev
  • 7,352
  • 11
  • 62
  • 94
14
votes
1 answer

Display the app icon if the contact is associated with the application in phone address book

I am trying to display the application icon for the phone number which is associated with the application. I tried to follow this link but it is too difficult. Is there any library for this or any easy way to solve this problem? For example, we can…
Kartheek Sarabu
  • 3,886
  • 8
  • 33
  • 66
14
votes
1 answer

Why does Android trigger a Google account sync every time I add/remove an account of a custom type?

I have an app linked with a Web service that uses AccountManager and Sync to allow users to log in to their account through the app and sync their data (this is custom data, not contacts or anything else used by Google accounts). AFAIK, I'm doing…
Russell Stewart
  • 1,960
  • 4
  • 24
  • 31
14
votes
4 answers

AccountManager getUserData returning null despite it being set

I'm working on an Android app that uses the AccountManager to store accounts & credentials. One problem I've been having is that even though I pass in a bunch of String values to the AccountManager's addAccountExplicitly data bundle. I have checked…
copolii
  • 14,208
  • 10
  • 51
  • 80
13
votes
1 answer

What protects Android AccountManager passwords from being read by other apps?

I'm writing 1) an app that stores a username and password in the AccountManager, and 2) a separate background Service app that accesses those credentials to login to my servers, etc. Playing around with this, I find I'm able to call…
liucheia
  • 364
  • 6
  • 16
12
votes
3 answers

Disallow multiple accounts in AccountManager

I've implemented my AccountManager authenticator and the service and the whole deal and it all seems to be working fine. There is, however, one little problem: I only want a single account for my app to exist in account manager, but can't quite seem…
copolii
  • 14,208
  • 10
  • 51
  • 80
12
votes
3 answers

Cannot add new custom account from different app with same authenticator

I have two apps that both use a same custom account type. Those two apps are completely independent and just share the account. When one of them starts, it checks for existing custom accounts and if no account was found, shows the sign-in page. So I…
11
votes
3 answers

Where is the Android Authorization Token Type alias list for Google APIs?

While following this tutorial on using OAuth 2 with the Android AccountManager, I'm told that when specifying the AUTH_TOKEN_TYPE, instead of specifying the scope like this: String AUTH_TOKEN_TYPE =…
Mendhak
  • 8,194
  • 5
  • 47
  • 64
11
votes
3 answers

Android Account Authenticator edit Email Id Credentials

When i login with test1@gmail.com in my application.It generate account successfully with my email like this Now i logout and login with different email like test2@gmail.com then it generate account like this I want to know that which is the best…
11
votes
2 answers

Android multiple sync adapter items like Google Account?

I currently have my Android app set up to use the AccountManager feature of Android, using a SyncAdapter and an authenticated account to performs syncs automatically. I only have 1 sync adapter running which syncs all content, but I would like to…
11
votes
2 answers

Why is AccountAuthenticator#getAuthToken() not called?

I created my own Android account authenticator by extending AbstractAccountAuthenticator and implementing addAccount() and getAuthToken(). Some of the methods in it are called by AccountManager, but others are not. This works…
Austyn Mahoney
  • 11,398
  • 8
  • 64
  • 85
1
2
3
34 35