Create PDU for Android

心不动则不痛 提交于 2019-12-04 14:37:27

Typically PDUs are hardcoded in the code. Similar to this:

String pdu = "07914151551512f2040B916105551511f100006060605130308A04D4F29C0E";
SmsMessage sms = SmsMessage.createFromPdu(HexDump.hexStringToByteArray(pdu));

Here's a complete example on how to do this.

Now, you're gonna ask me "where can I find a PDU for testing?" You generate it. For example, you can use this online service.

I hope this helps!!

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