mirror of
https://github.com/SimpleMobileTools/Simple-Contacts.git
synced 2025-06-05 21:59:27 +02:00
fixing a glitch at sending batch SMS messages
This commit is contained in:
@ -236,14 +236,14 @@ fun Context.sendSMSToContacts(contacts: ArrayList<Contact>) {
|
|||||||
if (number != null) {
|
if (number != null) {
|
||||||
numbers.append("${Uri.encode(number.value)};")
|
numbers.append("${Uri.encode(number.value)};")
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
val uriString = "smsto:${numbers.toString().trimEnd(';')}"
|
val uriString = "smsto:${numbers.toString().trimEnd(';')}"
|
||||||
Intent(Intent.ACTION_SENDTO, Uri.parse(uriString)).apply {
|
Intent(Intent.ACTION_SENDTO, Uri.parse(uriString)).apply {
|
||||||
if (resolveActivity(packageManager) != null) {
|
if (resolveActivity(packageManager) != null) {
|
||||||
startActivity(this)
|
startActivity(this)
|
||||||
} else {
|
} else {
|
||||||
toast(R.string.no_app_found)
|
toast(R.string.no_app_found)
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user