开发者

include a 'new line' in sms text using GSMCommunication Library

开发者 https://www.devze.com 2023-03-09 22:00 出处:网络
I\'m using the GsmCommMain class to send an sms I want to include a new line in my sms, i tried the normal default Environment.NewLine and the chart set \\0x0A but nothing realy had helped..

I'm using the GsmCommMain class to send an sms

I want to include a new line in my sms, i tried the normal default Environment.NewLine and the chart set \0x0A but nothing realy had helped..

any suggestions?开发者_如何学JAVA

Edit:

Environment.NewLine did the job

turns out that the system has this block of code

body = body.Replace("\t", " ").Replace("\n", " ").Replace("\r", " ");

Thank you, issue is solved


Try 0X0D and 0X0A both for new line.


Some places to investigate:

  • Check that the device you are receiving with understands new lines in SMS messages!
  • This similar question has an answer suggesting that you need to make sure you have encoded the message as 7-bit
  • A newline in SMS is 0x0A 0x0D not just 0x0A


Environment.NewLine did the job

turns out that the system has this block of code

body = body.Replace("\t", " ").Replace("\n", " ").Replace("\r", " ");
0

精彩评论

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