title: Android NFC read ISO15693 RFID Tag
body: <p>I am trying to read an ISO15693 RFID tag with the nfc android library:</p>
  
  <p>Here is more info on the Tag: <a href="http://img42.com/gw07d+" rel="noreferrer">http://img42.com/gw07d+</a></p>
  
  <p>The Tag ID is read correctly but the data in the tag is not.</p>
  
  <p><code>onCreate</code> Method:</p>
  
  <pre><code>// initialize NFC
      nfcAdapter = NfcAdapter.getDefaultAdapter(this);
      nfcPendingIntent = PendingIntent.getActivity(this, 0, new Intent(this,   this.getClass()).addFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP), 0);
  </code></pre>
  
  <p><code>onNewIntent</code> method:</p>
  
  <pre><code>if (NfcAdapter.ACTION_TAG_DISCOVERED.equals(intent.getAction()) || NfcAdapter.ACTION_TECH_DISCOVERED.equals(intent.getAction())) {
  
          currentTag = intent.getParcelableExtra(NfcAdapter.EXTRA_TAG);
          byte[] id = currentTag.getId();
          Tag_data_TextDisplay.setText("TagId:" + Common.getHexString(id));
  
          for (String tech : currentTag.getTechList()) {
  
              if (tech.equals(NfcV.class.getName())) {
                  NfcV nfcvTag = NfcV.get(currentTag);
  
                  try {
                      nfcvTag.connect();
                      txtType.setText("Hello NFC!");
                  } catch (IOException e) {
                      Toast.makeText(getApplicationContext(), "Could not open a connection!", Toast.LENGTH_SHORT).show();
                      return;
                  }
  
                  try {
                      byte[] cmd = new byte[]{
                              (byte) 0x00, // Flags
                              (byte) 0x23, // Command: Read multiple blocks
                              (byte) 0x00, // First block (offset)
                              (byte) 0x04  // Number of blocks
                      };
                      byte[] userdata = nfcvTag.transceive(cmd);
  
                      userdata = Arrays.copyOfRange(userdata, 0, 32);
                      txtWrite.setText("DATA:" + Common.getHexString(userdata));
  
                  } catch (IOException e) {
                      Toast.makeText(getApplicationContext(), "An error occurred while reading!", Toast.LENGTH_SHORT).show();
                      return;
                  }
              }
          }
      }
  </code></pre>
  
  <p><code>userdata</code> is contains a single byte with value <code>0x02</code> (<code>{ 0x02 }</code>) right after the transceive method finished.</p>