I'm using android studio and i'm trying to select an app from a smart card before reading data using NFC. When i'm trying to select the app it's just throws an exception and the result I get back changes every time but looks like that "[B@41bf9ca8".
byte[] SELECT = {
(byte) 0x00, // CLA Class
(byte) 0xA4, // INS Instruction
(byte) 0x04, // P1 Parameter 1
(byte) 0x00, // P2 Parameter 2
(byte) 0x08, // Length
(byte) 0x31, (byte) 0x54, (byte) 0x49, (byte) 0x43, (byte) 0x2e,
(byte)0x49, (byte) 0x43, (byte) 0x41, // AID 315449432e494341
};
byte[] result = tag.transceive(SELECT);
if (!(result[0] == (byte) 0x90 && result[1] == (byte) 0x00)) {
throw new IOException("could not select applet");
}
Is there anything wrong with my SELECT command?