Class MifareUltralight

java.lang.Object
com.codename1.nfc.TagTechnology
com.codename1.nfc.MifareUltralight

public class MifareUltralight extends TagTechnology

NXP MIFARE Ultralight / Ultralight C / NTAG21x technology view. Page-level read/write of 4-byte pages.

Supported on Android (MifareUltralight) and iOS 13+ (subset of NFCMiFareTag).

  • Constructor Details

    • MifareUltralight

      public MifareUltralight()
  • Method Details

    • getPageCount

      public int getPageCount()
      Number of pages on this tag. 16 for Ultralight, 48 for Ultralight C, 45 for NTAG213, 135 for NTAG215, 231 for NTAG216. Returns 0 when the port has not populated this field.
    • readPages

      public AsyncResource<byte[]> readPages(int firstPage)
      Reads 4 pages (16 bytes) starting at firstPage. Pages roll over to page 0 when the request runs past the end.
    • writePage

      public AsyncResource<Boolean> writePage(int page, byte[] data)
      Writes a single 4-byte page. Fails with NfcError.READ_ONLY for vendor / OTP / lock pages.
    • getType

      public final TagType getType()
      Description copied from class: TagTechnology
      The technology variant this view represents.
      Specified by:
      getType in class TagTechnology