From 49ab328a77af3a48bedbe68334a39b2ddc9395b1 Mon Sep 17 00:00:00 2001 From: Moez Bhatti Date: Mon, 4 Jun 2018 15:15:33 -0400 Subject: [PATCH] #1166 - Fix add contact not working --- presentation/src/main/java/common/Navigator.kt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/presentation/src/main/java/common/Navigator.kt b/presentation/src/main/java/common/Navigator.kt index 8707e2df..8015e323 100644 --- a/presentation/src/main/java/common/Navigator.kt +++ b/presentation/src/main/java/common/Navigator.kt @@ -211,8 +211,9 @@ class Navigator @Inject constructor(private val context: Context, private val no } fun addContact(address: String) { - val uri = Uri.parse("tel: $address") - val intent = Intent(ContactsContract.Intents.SHOW_OR_CREATE_CONTACT, uri) + val intent = Intent(Intent.ACTION_INSERT) + .setType(ContactsContract.Contacts.CONTENT_TYPE) + .putExtra(ContactsContract.Intents.Insert.PHONE, address) startActivityExternal(intent) }