New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Question] Creating new contacts #71
Comments
hi @fgubler, this is the right place to ask questions :)
This is correct. As soon as you store a contact via ContactStore, Android itself will assign a new id to it. There is no need to provide your own ids.
You can use AFAIK there is no concept of 'default' in Android, but it is something each app handles on their own. |
Thanks for the explanation :-).
Ok, makes sense. The system's contact app so far always correctly predicted which account to choose as default for me (across vendors). But maybe it just checked which one had the most contacts in it. There is also usually an option to just store a contact locally on the phone without any account. Is that also supported by the library? Is it just a kind of dummy-account? |
Yup it is supported. Pass no account and it will be stored locally. |
Last question for now: when loading an existing contact: is there a way to find out which account it belongs to? |
No. Each contact returned by contact store can be the result of combining multiple contacts together from different sources. For your case, the number of contacts might not mean that this is the account the user would prefer saving the contacts (as the account can be managed from a different device). An alternative would be to check what kind of account you would like to promote (i.e. google) and pick that first. |
Sorry, this is more of a question than an issue but I was not sure about the ideal channel of communications and maybe the question is also interesting for other users of the library.
As explained in the Readme, it is possible to create a new contact in the Android contact database, however for my real-world use-case I have two additional questions:
The text was updated successfully, but these errors were encountered: