Package org.nfctools.api

Examples of org.nfctools.api.TagInfo


  protected MfClassicNdefOperations createNdefOperations(ApduTag tag, MemoryLayout memoryLayout) {
    boolean formatted = false;
    boolean writable = false;
    MfClassicReaderWriter readerWriter = new AcrMfClassicReaderWriter(tag, memoryLayout);
    TagInfo tagInfo = null;
    try {
      tagInfo = readerWriter.getTagInfo();
      if (readerWriter.hasApplicationDirectory()) {
        ApplicationDirectory applicationDirectory = readerWriter.getApplicationDirectory();
        if (applicationDirectory.hasApplication(MfConstants.NDEF_APP_ID)) {
View Full Code Here


  protected Type2NdefOperations createNdefOperations(ApduTag tag) {
    MfUlReaderWriter readerWriter = new AcrMfUlReaderWriter(tag);
    MemoryLayout memoryLayout = null;
    boolean formatted = false;
    boolean writable = false;
    TagInfo tagInfo = null;
    try {
      tagInfo = readerWriter.getTagInfo();
      MfBlock[] initBlocks = readerWriter.readBlock(0, 5);
      CapabilityBlock capabilityBlock = new CapabilityBlock(initBlocks[3].getData());
      if (UltralightHandler.isBlank(initBlocks)) {
View Full Code Here

    if (tagInfo == null) {
      byte[] id = new byte[4];
      MfBlock[] block = readManuBlockWithMultiKeys(MfClassicConstants.MAD_KEY, MfClassicConstants.TRANSPORT_KEY);
      if (block != null)
        System.arraycopy(block[0].getData(), 0, id, 0, 4);
      tagInfo = new TagInfo(apduTag.getTagType(), id);
    }
    return tagInfo;
  }
View Full Code Here

  @Override
  public TagInfo getTagInfo() throws IOException {
    if (tagInfo == null) {
      MfBlock[] idBlocks = readBlock(0, 2);
      byte[] id = UltralightHandler.extractId(idBlocks);
      tagInfo = new TagInfo(tag.getTagType(), id);
    }
    return tagInfo;
  }
View Full Code Here

TOP

Related Classes of org.nfctools.api.TagInfo

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.