mirror of
https://github.com/SimpleMobileTools/Simple-SMS-Messenger.git
synced 2025-06-05 21:49:22 +02:00
catch and show exceptions thrown at sending a message
This commit is contained in:
@ -72,7 +72,11 @@ fun Context.sendMessage(text: String, addresses: List<String>, subscriptionId: I
|
||||
transaction.setExplicitBroadcastForSentSms(smsSentIntent)
|
||||
transaction.setExplicitBroadcastForDeliveredSms(deliveredIntent)
|
||||
Handler(Looper.getMainLooper()).post {
|
||||
transaction.sendNewMessage(message)
|
||||
try {
|
||||
transaction.sendNewMessage(message)
|
||||
} catch (e: Exception) {
|
||||
showErrorToast(e)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user