i was wondering if i could send back some data from the javacard applet when it is selected.
since select() method returns a boolean value i don't know how to return data bytes from it.
can anyone help me with this? i want the applet to return a simple byte array along with the status word 9000 (which is default for success), when i send the select command to the card.
ie, when i send the following command
00A4040006010203040506
i want a response like,
010203049000
(first four bytes are the data returned from the applet) TIA. thanks in advance..
I guess you do the "good practice" of "if selectingApplet() then return" in process? You need to process the incoming APDU instead of simple return.
You can return data to select the normal way, but be careful to return 0x9000 if the select was successful.