12-03-2008 12:20 PM
I am using Message Listener to listen to incoming SMS messages, my problem is when the incoming sms messages contains "@" character the messages does not display after that. For example when I send SMS with "I am @ witn another @" the messages comes as "I am". I use the follow code but of no help.
if (originalMessage instanceof TextMessage)
TextMessage tm = (TextMessage) originalMessage;
msg = new String(tm.getPayloadText().getBytes(),"UTF-8");
else if (originalMessage instanceof BinaryMessage)
byte data = ((BinaryMessage) originalMessage).getPayloadData();
// convert Binary Data to Text
msg = new String(data, "UTF-8");
12-04-2008 09:17 AM - edited 12-04-2008 09:20 AM
thanks. I reproduced what you have said. Is there any solution to this problem ?? Does that mean I have check my message for '@' everytime and act accordingly. Also, are there any more characters that might cause trouble?
12-04-2008 09:52 AM