Package org.nfctools.mf.ndef

Examples of org.nfctools.mf.ndef.MfNdefReader


  private MfReaderWriter readerWriter = new Acr122ReaderWriter(nfcReaderWriter);
  private NdefMessageDecoder decoder = NdefContext.getNdefMessageDecoder();

  @Override
  public void cardDetected(MfCard card, MfReaderWriter readerWriter) throws IOException {
    MfNdefReader ndefReader = new MfNdefReader(readerWriter, decoder);

    try {
      List<Record> records = ndefReader.readNdefMessage(card);
      for (Record record : records) {
        log.info(record.toString());
      }
    }
    catch (IOException e) {
View Full Code Here


    }
  }

  @Override
  public void cardDetected(MfCard mfCard, MfReaderWriter mfReaderWriter) throws IOException {
    MfNdefReader ndefReader = new MfNdefReader(mfReaderWriter, NdefContext.getNdefMessageDecoder());
    List<Record> records = ndefReader.readNdefMessage(mfCard);
    if (ndefListener != null) {
      ndefListener.onNdefMessages(records);
    }
  }
View Full Code Here

TOP

Related Classes of org.nfctools.mf.ndef.MfNdefReader

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.