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