Skip to Main Content

Java Card

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Extracting service center timestamp from the received SMS

843851Jul 31 2003 — edited Sep 19 2003
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.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 17 2003
Added on Jul 31 2003
7 comments
424 views