Package org.nfctools.ndef

Examples of org.nfctools.ndef.NdefMessage


    TypeLengthValueReader reader = new TypeLengthValueReader(new TagInputStream(memoryLayout, readerWriter));

    while (reader.hasNext()) {
      Tlv tlv = reader.next();
      if (tlv instanceof NdefMessageTlv) {
        NdefMessage ndefMessage = decoder.decode(((NdefMessageTlv)tlv).getNdefMessage());
        for (Record record : decoder.decodeToRecords(ndefMessage)) {
          System.out.println(record);
        }
      }
    }
View Full Code Here


    lastReadRecords = new ArrayList<Record>();
    NdefMessageDecoder ndefMessageDecoder = NdefContext.getNdefMessageDecoder();
    while (reader.hasNext()) {
      Tlv tlv = reader.next();
      if (tlv instanceof NdefMessageTlv) {
        NdefMessage ndefMessage = ndefMessageDecoder.decode(((NdefMessageTlv)tlv).getNdefMessage());
        for (Record record : ndefMessageDecoder.decodeToRecords(ndefMessage)) {
          lastReadRecords.add(record);
        }
      }
    }
View Full Code Here

      List<Record> records = new ArrayList<Record>();

      while (lengthValueReader.hasNext()) {
        Tlv tlv = lengthValueReader.next();
        if (tlv instanceof NdefMessageTlv) {
          NdefMessage ndefMessage = ndefMessageDecoder.decode(((NdefMessageTlv)tlv).getNdefMessage());
          for (Record record : ndefMessageDecoder.decodeToRecords(ndefMessage)) {
            records.add(record);
          }
        }
      }
View Full Code Here

  @Override
  public WellKnownRecord decodePayload(byte[] payload, NdefMessageDecoder messageDecoder) {
    byte configurationByte = payload[0];

    NdefMessage payloadNdefMessage = messageDecoder.decode(payload, 1, payload.length - 1);

    GcTargetRecord target = null;
    GcActionRecord action = null;
    GcDataRecord data = null;
View Full Code Here

TOP

Related Classes of org.nfctools.ndef.NdefMessage

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.