android-authenticator

sharing Custom AccountAuthenticator between apps

此生再无相见时 提交于 2019-12-12 08:14:15
问题 I have an app I've built for a client that uses a custom AccountAuthenticator. It works wonderfully and it does what the client wants. However, that is only the first app in what will be a collection of apps that will be using the same authentication manager, and this is where I'm not sure how to proceed. I have no way of knowing which apps will be installed by any given user, or the order they may be installed. I do not what to require the user to provide their credentials for each app; that

No contacts for my AccountManager account

僤鯓⒐⒋嵵緔 提交于 2019-12-11 13:23:58
问题 I am currently working on a project in which I want to access the mobile contacts, So I have managed to create account with accountmanager and also able to perform Syncadapter operation. I could see my account got created in the mobile settings->Accounts . However, when I try to get all the contacts with my account with below code ,it does not work. Its showing all apps(google.com and WhatsApp.com) contacts except my app account contacts. Cursor cursor = getContext().getContentResolver()

Syncing contacts using SyncAdapter ,Working

我与影子孤独终老i 提交于 2019-12-10 18:10:37
问题 I am currently working on a android project in which I want to Sync mobile contacts to server, After researching a lot about SyncAdapter and Creating account in accountmanager , I have learned it myself. however there are two things I don't understand, I searched about these in google but could not get perfect answer. Please don't duplicate the question, I want to know more clearly how it works. As the Google documentation says whenever a sync is done, the dirty flag of the contact gets

How can access preferences set in account-authenticator in Android

柔情痞子 提交于 2019-12-10 17:28:22
问题 I need to get value of CheckBoxPreference and SwitchPreference. In account_preferences.xml i have: <PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android" > <PreferenceCategory android:title="User Preferences" /> <CheckBoxPreference android:key="test1" android:title="Test 1" /> <SwitchPreference android:key="test2" android:title="Test 2" /> </PreferenceScreen> 来源: https://stackoverflow.com/questions/21528195/how-can-access-preferences-set-in-account-authenticator-in

Android Account Authenticator edit Email Id Credentials

和自甴很熟 提交于 2019-12-10 12:37:45
问题 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 way 1) Remove first account and add second account 2) Update first account with second if it is possible to update it. What is Problem I am getting actually? If I remove and again add account using addAccountExplicitly it takes some time for creating

Android : AccountPicker set Light Theme

会有一股神秘感。 提交于 2019-12-09 15:59:20
问题 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, accountTypes, false, null, null, null, null); activity.startActivityForResult(intent, REQUEST_CODE_PICK_ACCOUNT); My base app theme is android:Theme.Light but that dialog is dark. Thanks. 回答1: If you wish to change the theme of the dialog, you should change the

AccountManager does not add custom account in Android N preview

偶尔善良 提交于 2019-12-09 14:54:08
问题 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 accounts. But in Android N preview, account does not add to the device accounts. AccountManager's addAccountExplicitly() method always returns false. Has anyone faced this problem? 回答1: Not sure if this is the same issue, but there's an issue with

IllegalArgumentException: addAccount not supported

别等时光非礼了梦想. 提交于 2019-12-07 01:02:39
问题 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 android.accounts.AccountManager.convertErrorToException(AccountManager.java:2147) at android.accounts.AccountManager.-wrap0(AccountManager.java) at android.accounts.AccountManager$AmsTask$Response.onError(AccountManager.java:1993) at android.accounts

IllegalArgumentException: addAccount not supported

自作多情 提交于 2019-12-05 04:59:09
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 android.accounts.AccountManager.convertErrorToException(AccountManager.java:2147) at android.accounts.AccountManager.-wrap0(AccountManager.java) at android.accounts.AccountManager$AmsTask$Response.onError(AccountManager.java:1993) at android.accounts.IAccountManagerResponse$Stub.onTransact(IAccountManagerResponse.java:69) at android.os.Binder.execTransact

create custom account android

ぐ巨炮叔叔 提交于 2019-12-04 11:08:12
问题 Whats 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 things a bit too much elaborated wich I quite didn't understand well since I'm just an Android begginer with the accounts. I know its not as simple as calling: final Account account = new Account(mUsername, your_account_type); mAccountManager