Switch to ACTION_INSERT_OR_EDIT
for "add to contacts" action
This allows adding an email address to an existing contact.
This commit is contained in:
parent
8015392d70
commit
23ddb37d55
1 changed files with 2 additions and 2 deletions
|
@ -6,8 +6,8 @@ import android.provider.ContactsContract
|
|||
|
||||
internal class AddToContactsLauncher {
|
||||
fun launch(context: Context, name: String?, email: String) {
|
||||
val intent = Intent(Intent.ACTION_INSERT).apply {
|
||||
type = ContactsContract.Contacts.CONTENT_TYPE
|
||||
val intent = Intent(Intent.ACTION_INSERT_OR_EDIT).apply {
|
||||
type = ContactsContract.Contacts.CONTENT_ITEM_TYPE
|
||||
|
||||
putExtra(ContactsContract.Intents.Insert.EMAIL, email)
|
||||
|
||||
|
|
Loading…
Reference in a new issue