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
11
votes
7 answers

How to remove account in AccountManager in Android

I am trying to remove a custom account in AccountManager. This is my code : final Handler handler = new Handler (); AccountManagerCallback callback = new AccountManagerCallback() { @Override public…
Vico
  • 111
  • 1
  • 1
  • 5
10
votes
2 answers

Android: Google SSO - OAuth or AccountManager? Or both?

After reading all sorts of Stackoverflow postings and various documentation including some on http://code.google.com/p/google-api-java-client/ site I feel utterly confused. So can someone explain to me the best way of achieving the following: Let…
Bostone
  • 36,858
  • 39
  • 167
  • 227
10
votes
4 answers

Android: Google authentication

I want to ask, what is the best way to authenticate user with his Google account already configured on the phone. I have looked at the ClientLogin first, but it's not what I want because it requires users to enter login/password in my application. I…
endryha
  • 7,166
  • 8
  • 40
  • 64
10
votes
1 answer

Authenticate user logged in with FB at my server using the Android Account Manager

I have a question about authentication using the Android Account Manager. We have a backend and an Android app and the user should log into our backend using his Facebook account. Currently we show a webview for this purpose which does normal oAuth…
Simon
  • 13,173
  • 14
  • 66
  • 90
10
votes
2 answers

Android OAuth2 Bearer token best practices

This nice tutorial is a very good introduction to account authentication on Android and doing it by utilizing Android's AccountManager. However, I need to create a client app for an OAuth2 API using a Bearer token for authentication. At the time of…
10
votes
1 answer

How to get an icon associated with specific Account from AccountManager.getAccounts()

There is an icon displayed in account settings for each account. For Google account there is one icon, for Facebook another. Is there a way of getting this icon from the code in application?
Prizoff
  • 4,486
  • 4
  • 41
  • 69
10
votes
1 answer

Get the Google ID used to download the application

How can i find out which google account downloaded the application? This question is related to Get the Google ID used in an in-app billing purchase Thank you!
Jonathan Naguin
  • 14,526
  • 6
  • 46
  • 75
9
votes
0 answers

Example using Android Account Manager

Possible Duplicate: What should I use Android AccountManager for? I was wondering if there are any simple examples, using Android account manager, so that I can understand it better. Thanks
Yogi
  • 1,035
  • 2
  • 13
  • 39
9
votes
2 answers

How do I implement an Account on Android without a SyncAdapter

I am implementing a login system for an Android application utilizing the built-in accounts system (with the AccountManager APIs). All is well and good on Android 2.2+, but on Android 2.1 not including a SyncAdapter causes reboots in the account…
9
votes
2 answers

Twitter Authentication through Android's AccountManager classes

I am working on a twitter based app and am trying to incorporate Android's built-in Account support for Twitter. The following code works to popup the confirmation dialog for my app to access twitter but I am unsure of what to pass in as the…
Robby Pond
  • 73,164
  • 16
  • 126
  • 119
9
votes
2 answers

Android AccountManager across apps: uninstalling the first app that registered the account causes the account to be deleted?

What we want to achieve: cross app single sign on We have 2 apps (app A and app B) that we would like to share the same user account. That is, when a user logs into app A, they will be automatically logged in app B, and the other way around. What we…
lotte
  • 91
  • 2
9
votes
3 answers

Change username and password of android custom account

I have created sync adapter for android that syncs data with my server. I works fine, but now I want to be able to change my username and password without removing and adding the account again. How can I do this? I have a login screen that has edit…
nikmin
  • 1,803
  • 3
  • 28
  • 46
8
votes
5 answers

validating Android's authToken on third party server

I'm writing an Android application, which uses AccountManager to get the token. From an android app I'm able to interact with Google Picasa - it works fine. What I would like to achieve is the following: send some text + authToken to my third party…
eleanor
  • 1,514
  • 3
  • 19
  • 40
8
votes
2 answers

Is it possible to override the Accounts & Sync 'Remove Account' functionality

I am working on application which has a sync adapter and authenticator used to add accounts via the Android Account Manager. I've got the following two problems: 1) It was possible to override the 'Add Account' button's functionality in Accounts &…
user1288511
  • 81
  • 1
  • 3
8
votes
1 answer

Adding account through Account manager

I'm new to android development so sorry if im asking a really obvious question.For my app I want to add a google account automatically using account manager. Do I want to use addAccount or addAccountExplicitly and how do i go about this assuming the…
user1279309
1 2
3
34 35