Questions tagged [android-authenticator]

Android Authenticator refers to the class Authenticator in the mobile operating system Android that represents an object that knows how to obtain authentication for a network connection. Usually, this class will do this by prompting the user for information. Use this tag for questions related to this class.

Android Authenticator refers to the class Authenticator in the mobile operating system Android that represents an object that knows how to obtain authentication for a network connection. Usually, this class will do this by prompting the user for information. Use this tag for questions related to this class.

Documentation: https://developer.android.com/reference/java/net/Authenticator

109 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
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…
23
votes
3 answers

Use screen lock in my app

Is it possible to use the default security settings, which user has set to the phone, as a locking or login mechanism for my app too? I mean like when we reset the phone, it asks for phone password or pattern. Is it possible the same way that I can…
Mangesh
  • 5,491
  • 5
  • 48
  • 71
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
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
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…
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
8
votes
3 answers

IllegalArgumentException: addAccount not supported

I followed this description to add my sync adapter. But there is a litte bug :-( When I open Settings -> Account -> Add account and select my account I get this error message java.lang.IllegalArgumentException: addAccount not supported at…
8
votes
1 answer

Android: read preferences set in authenticator xml

I want to read in my code preferences I have set via the authenticator xml file. I found Can't access preferences set in account-authenticator in Android and How can access preferences set in account-authenticator in Android one is completely…
AndyAndroid
  • 4,039
  • 14
  • 44
  • 71
8
votes
2 answers

Android : AccountPicker set Light Theme

Is it possible to set the theme of picker dialog ? import com.google.android.gms.common.AccountPicker; .... String[] accountTypes = new String[]{"com.google"}; Intent intent = AccountPicker.newChooseAccountIntent(null, null, …
8
votes
1 answer

create custom account Android

What is the simplest way to create a custom account on Android? So far I've read the documentation: Creating a Custom Account Type, but it certainly didn't help a lot (too vague info). I tried reading the example from LastFm but certainly they did…
Raykud
  • 2,488
  • 3
  • 21
  • 41
7
votes
3 answers

GMail API Grant Permissions Before UserRecoverableAuthUIException

I've followed the quickstart example from Google to setup the GMail API: https://developers.google.com/gmail/api/quickstart/android My app successfully requests the GET_ACCOUNTS permission and allows the user to select his/her gmail account. The…
1
2 3 4 5 6 7 8