欢迎您访问 最编程 本站为您分享编程语言代码,编程技术文章!
您现在的位置是: 首页

Android接收彩信通知的详细步骤解析

最编程 2024-08-05 10:53:15
...

这里对froyo(非标准)里mms模块收彩信的函数调用关系进行一点解说。这里只说的是收到彩信,但是还没有下载(设为手工下载)
首先,mms是通过WAPPUSH实现的,具体在com.android.internal.telephony包里的WapPushOverSms类。
这个类里除了构造函数,另一个public的就是dispatchWapPdu()了

仔细查看下,就会找到dispatchWapPdu_MMS()这个函数

  1. private void dispatchWapPdu_MMS(byte[] pduint transactionIdint pduType,
  2.                                     int headerStartIndexint headerLength) {
  3.         byte[] header = new byte[headerLength];
  4.         System.arraycopy(pduheaderStartIndexheader0header.length);
  5.         int dataIndex = headerStartIndex + headerLength;
  6.         byte[] data = new byte[pdu.length - dataIndex];
  7.         System.arraycopy(pdudataIndexdata0data.length);
  8.  
  9.         Intent intent = new Intent(Intents.WAP_PUSH_RECEIVED_ACTION);
  10.         intent.setType(WspTypeDecoder.CONTENT_MIME_TYPE_B_MMS);
  11.         intent.putExtra("transactionId"transactionId);
  12.         intent.putExtra("pduType"pduType

    上一篇: 如何在iOS 7上开启iPhone的彩信功能并设置参数?

    下一篇: 快速掌握Android MMS技术

推荐阅读