Encoding SMS messages in Android

喜你入骨 提交于 2019-12-02 21:28:09
Gary

The sendDataMessage function adds it's own user data header, UDH, information consisting of the application port number and a TP-Data-Coding-Scheme of no class, 8 bit data 0x04 (found in the SmsMessage code base)

the SendTextMessage function will send the message with GSM7packed encoding and a TP-Data-Encoding-Scheme of 0x00 - uncompressed, default (7bit) encoding, no class. Per the GSM 03.38 spec

For class 0, 7 bit data, you'd be looking for a 0x10 value in the TP-Data-Encoding-Scheme byte location. To do so, one would need to control all of the PDU being sent. Currently this is not supported by the public android API. However, it can be done (though highly discouraged) via reflection on the internal APIs.

See SMS raw pdu in Android

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!