diff --git a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/messaging/MessagingUtils.kt b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/messaging/MessagingUtils.kt index d90a9996..9f0da6f1 100644 --- a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/messaging/MessagingUtils.kt +++ b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/messaging/MessagingUtils.kt @@ -21,6 +21,7 @@ import com.simplemobiletools.smsmessenger.extensions.isPlainTextMimeType import com.simplemobiletools.smsmessenger.extensions.smsSender import com.simplemobiletools.smsmessenger.messaging.SmsException.Companion.ERROR_PERSISTING_MESSAGE import com.simplemobiletools.smsmessenger.models.Attachment +import com.simplemobiletools.smsmessenger.receivers.MmsSentReceiver import com.simplemobiletools.smsmessenger.receivers.SendStatusReceiver class MessagingUtils(val context: Context) { @@ -158,6 +159,9 @@ class MessagingUtils(val context: Context) { } } + val mmsSentIntent = Intent(context, MmsSentReceiver::class.java) + transaction.setExplicitBroadcastForSentMms(mmsSentIntent) + try { transaction.sendNewMessage(message) } catch (e: Exception) { diff --git a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/messaging/SmsSender.kt b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/messaging/SmsSender.kt index 9f3e5bb9..f32f81e6 100644 --- a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/messaging/SmsSender.kt +++ b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/messaging/SmsSender.kt @@ -110,13 +110,13 @@ class SmsSender(val app: Application) { } private fun getSendStatusIntent(requestUri: Uri, subId: Int): Intent { - val intent = Intent(SendStatusReceiver.MESSAGE_SENT_ACTION, requestUri, app, SmsStatusSentReceiver::class.java) + val intent = Intent(SendStatusReceiver.SMS_SENT_ACTION, requestUri, app, SmsStatusSentReceiver::class.java) intent.putExtra(SendStatusReceiver.EXTRA_SUB_ID, subId) return intent } private fun getDeliveredStatusIntent(requestUri: Uri, subId: Int): Intent { - val intent = Intent(SendStatusReceiver.MESSAGE_DELIVERED_ACTION, requestUri, app, SmsStatusDeliveredReceiver::class.java) + val intent = Intent(SendStatusReceiver.SMS_DELIVERED_ACTION, requestUri, app, SmsStatusDeliveredReceiver::class.java) intent.putExtra(SendStatusReceiver.EXTRA_SUB_ID, subId) return intent } diff --git a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/receivers/SendStatusReceiver.kt b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/receivers/SendStatusReceiver.kt index 59a759d0..73c91bf0 100644 --- a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/receivers/SendStatusReceiver.kt +++ b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/receivers/SendStatusReceiver.kt @@ -21,8 +21,8 @@ abstract class SendStatusReceiver : BroadcastReceiver() { } companion object { - const val MESSAGE_SENT_ACTION = "com.simplemobiletools.smsmessenger.receiver.SendStatusReceiver.MESSAGE_SENT" - const val MESSAGE_DELIVERED_ACTION = "com.simplemobiletools.smsmessenger.receiver.SendStatusReceiver.MESSAGE_DELIVERED" + const val SMS_SENT_ACTION = "com.simplemobiletools.smsmessenger.receiver.SMS_SENT" + const val SMS_DELIVERED_ACTION = "com.simplemobiletools.smsmessenger.receiver.SMS_DELIVERED" // Defined by platform, but no constant provided. See docs for SmsManager.sendTextMessage. const val EXTRA_ERROR_CODE = "errorCode"