DataGram Malformation Error??? (SMS)
Please Login to Remove!
Hi All,
I'm developing an application that reacts to incoming SMS messages on (any) blackberry platform. So far i've been very successful in reguards to the code working perfectly in the simulator platform and on my BlackBerry (Verizon) 7250.
Problem's started cropping up however when i move the same application onto a BlackBerry 7100t. When my DataGram receive's the incoming SMS message the string is totally malformed.
I will send:
11|Raven~JsoYwnFspUNotZ
18|Raven~JsoYwnFspUNegW
And receive:
Raven18xxx9633;=Ravenxxx9633;bJsoYwnFspUNegW
Part of the data is totally cut off and other seems to be converted to a diffrent charset than was sent.
Here is my code i use to grab incoming SMS messages:
dataConnection = (DatagramConnection)Connector.open("sms://");
Datagram dataGram = dataConnection.newDatagram(dataConnection.getMaxi mumLength());
dataConnection.receive(dataGram);
msg = new String(dataGram.getData());
System.out.println("SMS Message: " + msg);
Has anyone experianced this before? Is there an easy way to force the datagram to a specific charset?
|