Hi All,
I have developed a demo applet which is activated on the EVENT_UNFORMATTED_SMS_ENV. On this the applet tries to extract the user data and the service center timestamp from the received SMS. I have been able to get the user data but for service center timestamp i am getting "@@@@@" when I display the output onto the ME simulator.
I am using Schlumberger's VIEWS Developer IDE for the above.
the code extract :
//Proactive Commands For Your Tree Starts Here
case EVENT_UNFORMATTED_SMS_PP_ENV:
eh.findTLV(TAG_SMS_TPDU, (byte)1);
short TPDULength =(short)eh.getValueLength();
//calculating offset for the service center timestamp field
addressLength = (short)(eh.getValueByte((short)9)/2+1);
//extracting timestamp.
for(byte j = 0; j <addressLength;j++)
timeStamp[j] = eh.getValueByte((short)(j));
//displaying time stamp
myProHdlr.initDisplayText((byte)0x81, (byte)0x00, timeStamp, (short)0, (short)(timeStamp.length));
myProHdlr.send();
//for the user data part
tpudLengthOffset = eh.getTPUDLOffset();
userDataLength = (short)(eh.getValueByte(tpudLengthOffset) +1);
for (byte i=0; i<userDataLength; i++)
{
userData = eh.getValueByte((short)(i+tpudLengthOffset) );
}
myProHdlr.initDisplayText((byte)0x81, DCS_8_BIT_DATA, userData, (short)1, (short)(userDataLength-1));
myProHdlr.send();
break;//end of case event-unformatted-sms-env
------------------------------------------------------------------------
Thanks and regards,
Suraj Berwal.