File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed
app/src/main/kotlin/com/simplemobiletools/contacts/pro/extensions Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change 11package com.simplemobiletools.contacts.pro.extensions
22
3+ import android.content.Intent
4+ import android.net.Uri
35import com.simplemobiletools.commons.activities.BaseSimpleActivity
46import com.simplemobiletools.commons.dialogs.RadioGroupDialog
57import com.simplemobiletools.commons.extensions.*
@@ -12,7 +14,16 @@ import com.simplemobiletools.contacts.pro.helpers.*
1214import com.simplemobiletools.contacts.pro.models.Contact
1315
1416fun SimpleActivity.startCallIntent (recipient : String ) {
15- launchCallIntent(recipient, null )
17+ val action = Intent .ACTION_CALL
18+ Intent (action).apply {
19+ data = Uri .fromParts(" tel" , recipient, null )
20+
21+ if (resolveActivity(packageManager) != null ) {
22+ startActivity(this )
23+ } else {
24+ toast(R .string.no_app_found)
25+ }
26+ }
1627}
1728
1829fun SimpleActivity.tryStartCall (contact : Contact ) {
You can’t perform that action at this time.
0 commit comments