Questions tagged [android-account]

Android Account refers to the object public class Account as part of the mobile operating system Android that acts as a Value type that represents an Account in the AccountManager public class. Use this tag for questions related to this public class.

Android Account refers to the object public class Account as part of the mobile operating system Android that acts as a Value type that represents an Account in the AccountManager public class. Use this tag for questions related to this public class.

Documentation: https://developer.android.com/reference/android/accounts/package-summary

106 questions
26
votes
11 answers

How to maintain session in android?

Can anybody tell me how to maintain session for a user login. For example when the user sign- in to an application they have to be signed in unless the user logouts or uninstall the application similar to gmail in android.
june
  • 999
  • 3
  • 14
  • 20
25
votes
3 answers

Pick an email using AccountPicker.newChooseAccountIntent

I'm trying to let the user pick an Email account using the following code: Intent intent = AccountPicker.newChooseAccountIntent(null, null, new String[]{"com.google"}, false, null, null, null, null); …
Udi Oshi
  • 6,787
  • 7
  • 47
  • 65
24
votes
1 answer

AccountAuthenticatorActivity and fragments

Is there are way to use fragments with the AccountAuthenticatorActivity when I'm using the Support Package? AccountAuthenitactorActivity does not subclass the FragmentActivity class and therefore I'm not sure how to use fragments with it when I'm…
20
votes
2 answers

Should you use AccountManager for storing Usernames and Passwords for an Android app?

I would like to know if one should implement AccountManager to save user credentials such as username, email, passwords etc. I can't find a good reason to use it myself. I don't want other applications to have access to the Accounts and I don't…
HGPB
  • 4,346
  • 8
  • 50
  • 86
19
votes
3 answers

Why might AccountManager.addAccountExplicitly return false?

Google's Android docs (http://developer.android.com/reference/android/accounts/AccountManager.html#addAccountExplicitly(android.accounts.Account, java.lang.String, android.os.Bundle)) say: Returns True if the account was successfully added, false…
cja
  • 9,512
  • 21
  • 75
  • 129
19
votes
2 answers

In-app purchase: get the name or ID of the Google Play account that's requesting a purchase

I want to get a name / ID of the user making a purchase. I would like to do without AccountManager if possible, as its use requires an extra permission. Even with AccountManager I don't see a way to determine the current account, so any advice is…
14
votes
1 answer

How can I avoid making users download a separate APK for account management?

I have created a custom account type for two applications that I am developing. Now I am looking for a way for both apps to take advantage of this single account service. The documentation recommends the following. One solution is to place the…
Bryan
  • 14,756
  • 10
  • 70
  • 125
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
12
votes
3 answers

AccountManager does not add custom account in Android N preview

I have implemented a sync adapter in my app which requires an account to be added in the device account settings. I followed the same approach given in the Android docs. It works fine till Marshmallow and I can see my account listed in the device…
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
1 answer

Caused by java.lang.SecurityException: uid ... cannot explicitly add accounts of type: ... Android P and Android 10

Recently I see an increase of error reported from Firebase Crashlytic on the following Caused by java.lang.SecurityException: uid 10172 cannot explicitly add accounts of type: com.mypackage.account at…
Elye
  • 53,639
  • 54
  • 212
  • 474
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
1 answer

How to add custom app tag in native android contact app?

I am developing an app and the requirement is to show the app icon in native contact app of android for the contacts who are also using my app i.e. they have installed and registered on my app. I want to show WhatsApp kind label in contacts. Please…
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
1 answer

Who and when should call method confirmCredentials of AbstractAccountAuthenticator-based class?

I don't understand how method confirmCredentials works. I've never seen any options in the Android UI like “Confirm Credentials” or something like, there are only “Create account” and “Remove account”.
Sergey Stolyarov
  • 2,587
  • 3
  • 27
  • 40
1
2 3 4 5 6 7 8