Class MifareUltralight
java.lang.Object
com.codename1.nfc.TagTechnology
com.codename1.nfc.MifareUltralight
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintNumber of pages on this tag.final TagTypegetType()The technology variant this view represents.AsyncResource<byte[]> readPages(int firstPage) Reads 4 pages (16 bytes) starting atfirstPage.writePage(int page, byte[] data) Writes a single 4-byte page.Methods inherited from class TagTechnology
transceive
-
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. Returns0when the port has not populated this field. -
readPages
Reads 4 pages (16 bytes) starting atfirstPage. Pages roll over to page 0 when the request runs past the end. -
writePage
Writes a single 4-byte page. Fails withNfcError.READ_ONLYfor vendor / OTP / lock pages. -
getType
Description copied from class:TagTechnologyThe technology variant this view represents.- Specified by:
getTypein classTagTechnology
-