byte[] transceiveProtocol(NfcF nfcF, int systemCode, int requestCode, int timeSlot) { byte d0 = 6; byte d1 = 0; byte d2 = (byte)(systemCode>> 8 & 0xFF); byte d3 = (byte)(systemCode>> 0 & 0xFF); byte d4 = (byte)(requestCode & 0xFF); byte d5 = (byte)(timeSlot & 0xFF); byte[] command = { d0, d1, d2, d3, d4, d5 }; return nfcF.transceive(command); }
tagTech = NfcB.get(tag); } else if (tech.equals(android.nfc.tech.NfcF.class.getName())) { tagTech = NfcF.get(tag); } else if (tech.equals(android.nfc.tech.NfcV.class.getName())) { tagTech = NfcV.get(tag);
byte[] rawCmd(NfcF nfcF, byte[] IDm, byte felicaCmd, byte[] payload) throws IOException { final int len = payload != null ? payload.length : 0; final byte[] cmd = new byte[10 + len]; cmd[0] = (byte) (10 + len); cmd[1] = felicaCmd; System.arraycopy(IDm, 0, cmd, 2, IDm.length); if (payload != null) { System.arraycopy(payload, 0, cmd, 10, payload.length); } nfcF.transceive(cmd); }