-
Notifications
You must be signed in to change notification settings - Fork 146
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
How to add a phone number to existing contact #106
Comments
I also have this requirement. Have you solved it? |
Hi, what do you call "device view"? |
Sorry for my mistake,I means how to add a new phone number to existing contact?Is this library support it? Very thanks |
You first need the contact ID. Then: final contactId = '.....';
Contact contact = await FlutterContacts.getContact(contactId);
contact.phones.add(Phone('555-123-4567'));
await contact.update(); |
Is there another way to add existing contact? eg. open contacts app,and auto fill phone number to an existing contact。 |
I doubt you can autofill a phone number and pass it through the default contact app. You can always use: await FlutterContacts.openExternalView(contact.id); or await FlutterContacts.openExternalEdit(contact.id); |
em... my question is how to autofill phone number... |
Ah. In this case you can use: final contact = Contact()..phones = [Phone('555-123-4567')];
await FlutterContacts.openExternalInsert(contact); |
But if this is for an existing contact, indeed, that is currently not possible. I'll reopen this as a |
please help me, thanks
The text was updated successfully, but these errors were encountered: