MifareUltralight.ReadPages(Int32) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Read 4 pages (16 bytes).
[Android.Runtime.Register("readPages", "(I)[B", "")]
public byte[]? ReadPages (int pageOffset);
[<Android.Runtime.Register("readPages", "(I)[B", "")>]
member this.ReadPages : int -> byte[]
Parameters
- pageOffset
- Int32
index of first page to read, starting from 0
Returns
4 pages (16 bytes)
- Attributes
Exceptions
if the tag leaves the field
if there is an I/O failure, or the operation is canceled
Remarks
Read 4 pages (16 bytes).
The MIFARE Ultralight protocol always reads 4 pages at a time, to reduce the number of commands required to read an entire tag.
If a read spans past the last readable block, then the tag will return pages that have been wrapped back to the first blocks. MIFARE Ultralight tags have readable blocks 0x00 through 0x0F. So a read to block offset 0x0E would return blocks 0x0E, 0x0F, 0x00, 0x01. MIFARE Ultralight C tags have readable blocks 0x00 through 0x2B. So a read to block 0x2A would return blocks 0x2A, 0x2B, 0x00, 0x01.
This is an I/O operation and will block until complete. It must not be called from the main application thread. A blocked call will be canceled with IOException
if #close
is called from another thread.
<p class="note">Requires the android.Manifest.permission#NFC
permission.
Java documentation for android.nfc.tech.MifareUltralight.readPages(int)
.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.