Skip to content

Why are new RawContacts getting inserted with null account instead of custom account? #334

Answered by vestrel00
marrale asked this question in Q&A
Discussion options

You must be logged in to vote

I see that you are adding your own custom account via AccountManager.addAccountExplicitly. The Account validation performed in this library uses the AccountsQuery API to retrieve the visible Accounts that has a registered SyncAdapter for Contacts syncing; https://vestrel00.github.io/contacts-android/accounts/query-accounts/

So, the issue could be that your custom Account is not being returned by the AccountManager because of visibility issues AND/OR it does not have a matching registered SyncAdapter type.

Regardless, turning off the Account validation should (hopefully) allow you to insert RawContacts to the Account of your choice without issue 🤞


I do have a question. Does your custom Ac…

Replies: 1 comment 8 replies

Comment options

You must be logged in to vote
8 replies
@marrale
Comment options

@vestrel00
Comment options

@marrale
Comment options

@vestrel00
Comment options

Answer selected by marrale
@marrale
Comment options

@vestrel00
Comment options

@marrale
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
question Further information is requested
2 participants