开发者

Android Data Message (Binary SMS)

开发者 https://www.devze.com 2023-03-06 12:59 出处:网络
I am thinking o开发者_如何转开发f using SMSManager.sendDataMessage for one of my applications.Can anyone let me know:

I am thinking o开发者_如何转开发f using SMSManager.sendDataMessage for one of my applications. Can anyone let me know:

  1. Is the size limit (no. of characters) per data message, same as text message?
  2. If not, what is the rationale behind that and what is the limit?
  3. Which limit does SMSManager.divideMessage uses, text message limit or data message limit?


  1. No, they are different.

  2. from smpp version 3.4 ---- snip ---- 6.2 Maximum Message Length Each network variation is limited to some fixed maximum length. This may be further affected by data coding scheme. The SMSC, depending on configuration, may reject or truncate messages that exceed the network allowed maximum. ---- snip ----

    When you integrate with a telco carier, you should read into their documentation which should mentioned what are the encoding you should use and its corresponding length. Then cross check with your implementation.

  3. neither. it checks the message encoding and determine the maximum length for that message. then it will do substring to the original message and return the splitted messages in ArrayList.

    Read here on how the divideMessage called is made. http://grepcode.com/file/repository.grepcode.com/java/ext/com.google.android/android/2.2_r1.1/android/telephony/SmsManager.java#SmsManager.divideMessage%28java.lang.String%29 http://grepcode.com/file/repository.grepcode.com/java/ext/com.google.android/android/2.2_r1.1/android/telephony/SmsMessage.java#SmsMessage.fragmentText%28java.lang.String%29

0

精彩评论

暂无评论...
验证码 换一张
取 消