Encoding SMS messages in Android

后端 未结 1 720
栀梦
栀梦 2021-02-03 16:16

My problem is that I want to send an SMS message of a certain Class and with a certain encoding. (Class 0 and 7-bit encoding).

When checking the Android.Telephony.SmsMan

1条回答
  •  执念已碎
    2021-02-03 16:45

    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

    0 讨论(0)
提交回复
热议问题