Android 中通过 MMS/SMS 监听器区分 MMS 和 SMS
在彩信和短信到达收件箱之前,是否可以通过使用彩信/短信侦听器来区分彩信和短信?
Is there any ways to differentiate MMS and SMS messages by using a MMS/SMS listener before they hit the inbox?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
MMS 消息的第一个指示符是 MIME 类型“application/vnd.wap.mms-message”的 WAP 推送,因此您可以为“android.provider.Telephony.WAP_PUSH_RECEIVED”注册接收器
:这不是收到的彩信,您必须破解 PDU:s 并提取
X-Mms-Message-Type
,它应该是m-notification-ind
(根据WAP 209)。您还可以选择 X-Mms-Transaction-ID,如果您想稍后将它们链接起来,您认为应该将其存储在消息提供程序的Telephony.Mms.TRANSACTION_ID
列中。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":
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 bem-notification-ind
(as per WAP 209). You can also pick out the X-Mms-Transaction-ID, which one thinks should be stored in theTelephony.Mms.TRANSACTION_ID
column in the message provider if you want to link them up later.