mirror of
https://github.com/SimpleMobileTools/Simple-Contacts.git
synced 2025-06-05 21:59:27 +02:00
improving some intent handling for Android 11+
This commit is contained in:
@ -21,12 +21,7 @@ fun SimpleActivity.startCallIntent(recipient: String) {
|
||||
val action = if (it) Intent.ACTION_CALL else Intent.ACTION_DIAL
|
||||
Intent(action).apply {
|
||||
data = Uri.fromParts("tel", recipient, null)
|
||||
|
||||
if (resolveActivity(packageManager) != null) {
|
||||
startActivity(this)
|
||||
} else {
|
||||
toast(R.string.no_app_found)
|
||||
}
|
||||
launchActivityIntent(this)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user