This discussion is archived
0 Replies Latest reply: Oct 23, 2012 11:01 PM by Umer RSS

IMEI in STK Applet

Umer Journeyer
Currently Being Moderated
Hi,

Can we get and display IMEI no of mobile in a STK applet in java sim card ?
I am trying following code but it always display 0000 ....
          proactiveHandler.init(PRO_CMD_PROVIDE_LOCAL_INFORMATION , (byte) 0x01, DEV_ID_ME);
          byte result = proactiveHandler.send();
          byte tag = TAG_IMEI;
          byte responseLength =0;

          ProactiveResponseHandler responseHandler = ProactiveResponseHandler.getTheHandler();
               if (responseHandler.findTLV(tag, (byte)1) == TLV_FOUND_CR_SET ||
                         responseHandler.findTLV(tag, (byte)1) == TLV_FOUND_CR_NOT_SET) {
                    responseLength = (byte) responseHandler.getValueLength();
               }
               responseHandler.copyValue((short) 0, IMEI, (short)0,(short)responseLength);
Any help will be appreciated.

Regards

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points