@Override protected Tag doInBackground(Tag... params) { Tag tag = params[0]; NfcV nfcvTag = NfcV.get(tag); if (DEBUG) Log.d(TAG, "Attempting to read tag data"); final boolean multiblock = true; try { nfcvTag.connect(); final byte[] uid = tag.getId(); final int step = multiblock ? 3 : 1; while (true) { try { oneBlock = nfcvTag.transceive(cmd); break; } catch (IOException e) { } finally { try { nfcvTag.close(); } catch (Exception e) { Log.e(TAG, "Error closing tag!");
nfc.connect(); Log.d(TAG, "Max Transceive Bytes: " + nfc.getMaxTransceiveLength()); nfc.transceive(arrByte); } catch (IOException e) { if (e.getMessage().equals("Tag was lost.")) { nfc.close();
tech.connect(); byte[] data = tech.transceive(readCmd); } catch (IOException e) { e.printStackTrace(); } finally { try { tech.close(); } catch (IOException e) { e.printStackTrace();
Tag tag = intent.getParcelableExtra(NfcAdapter.EXTRA_TAG); NfcV nfcV = NfcV.get(tag); byte[] cmdInfo = new byte[]{ (byte)0x20, (byte)0x2B, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00 }; System.arraycopy(tag.getId(), 0, cmdInfo, 2, 8); byte[] answer = nfcV.transceive(cmdInfo);
tagTech = NfcF.get(tag); } else if (tech.equals(android.nfc.tech.NfcV.class.getName())) { tagTech = NfcV.get(tag); } else if (tech.equals(android.nfc.tech.IsoDep.class.getName())) { tagTech = IsoDep.get(tag);
nfcvTag.connect(); response = nfcvTag.transceive(new byte[]); //your address nfcvTag.close();
NfcV nfcvTag = NfcV.get(tag); if (d) Log.d(TAG, "Attempting to read tag data"); try { nfcvTag.connect(); } catch (IOException e) { Log.d(TAG, "Trying second nfc connect"); Thread.sleep(250); nfcvTag.connect(); while (true) { try { replyBlock = nfcvTag.transceive(diag); break; } catch (IOException e) { while (true) { try { replyBlock = nfcvTag.transceive(cmd); break; } catch (IOException e) { while (true) { try { oneBlock = nfcvTag.transceive(cmd); break; } catch (IOException e) { } finally {
try{ NfcV vecinityTag = NfcV.get(mTag); vecinityTag.connect(); vecinityTag.transceive( new byte[] {0x00, 0x21, (byte) 0,0x31, 0x31, 0x31, 0x31} ); vecinityTag.close(); }catch(IOException e){ e.printStackTrace();
NfcV nfcvTag = NfcV.get(tag); if (d) Log.d(TAG, "Attempting to read tag data"); try { nfcvTag.connect(); } catch (IOException e) { Log.d(TAG, "Trying second nfc connect"); Thread.sleep(250); nfcvTag.connect(); while (true) { try { replyBlock = nfcvTag.transceive(diag); break; } catch (IOException e) { while (true) { try { replyBlock = nfcvTag.transceive(cmd); break; } catch (IOException e) { while (true) { try { oneBlock = nfcvTag.transceive(cmd); break; } catch (IOException e) { } finally {
NfcV nfcvTag = NfcV.get(tag); if (d) Log.d(TAG, "Attempting to read tag data"); try { nfcvTag.connect(); } catch (IOException e) { Log.d(TAG, "Trying second nfc connect"); Thread.sleep(250); nfcvTag.connect(); while (true) { try { replyBlock = nfcvTag.transceive(diag); break; } catch (IOException e) { while (true) { try { replyBlock = nfcvTag.transceive(cmd); break; } catch (IOException e) { while (true) { try { oneBlock = nfcvTag.transceive(cmd); break; } catch (IOException e) { } finally {