Is there any ways to differentiate MMS and SMS messages by using a MMS/SMS listener before they hit the inbox?
A text message of up to 160 characters without an attached file is known as an SMS, while a text that includes a file—like a picture, video, emoji, or a website link—becomes an MMS.
SMS messages have a restriction of 160 characters per text message, whereas MMS messages allow for unlimited characters. Another difference, much more significant in essence, is that MMS—as opposed to SMS—allows you to embed media files on a text message (i.e. images, audio files, clips, and gifs).
MMS stands for Multimedia Messaging Service. It was built using the same technology as SMS to allow SMS users to send multimedia content. It's most popularly used to send pictures, but can also be used to send audio, phone contacts, and video files.
SMS (Short Message Service) is essentially a 160-character text message that may include links. Whereas MMS (Multimedia Messaging Service) allows you to send a message with rich media content, including animated gifs and short video or audio files – and it has an increased limit of 1,000 characters.
The first indicator of an MMS message is a WAP-push with the MIME-type "application/vnd.wap.mms-message", so you could register a receiver for "android.provider.Telephony.WAP_PUSH_RECEIVED":
<receiver android:name=".SomeReceiverName"
android:permission="android.permission.BROADCAST_WAP_PUSH">
<intent-filter>
<action android:name="android.provider.Telephony.WAP_PUSH_RECEIVED" />
<data android:mimeType="application/vnd.wap.mms-message" />
</intent-filter>
</receiver>
To discover whether or not its a received MMS you're going to have to crack open the PDU:s and extract the X-Mms-Message-Type
, which should be m-notification-ind
(as per WAP 209). You can also pick out the X-Mms-Transaction-ID, which one thinks should be stored in the Telephony.Mms.TRANSACTION_ID
column in the message provider if you want to link them up later.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With