I'm trying to mimic the native behaviour of adding a phone number to an existing contact. The native behaviour has the following steps:
Tapping on the "Add to a contact"/ "Update existing" opens the native contacts list Activity where the user has the option to choose a contact.
Tapping on a contact opens the native edit contact activity and adds the selected phone number as an alternative phone number field (i.e. work).
Can I achieve this using an intent?
Similarly, I'm adding a contact using an intent. Here is my code:
Intent intent = new Intent(Intent.ACTION_INSERT, ContactsContract.Contacts.CONTENT_URI);
intent.putExtra(ContactsContract.Intents.Insert.PHONE,phoneNumber);
intent.putExtra("finishActivityOnSaveCompleted", true);
dialog.dismiss();
context.startActivity(intent);