Language

MifareUltralight.ReadPagesAsync(Int32) Method

Definition

Reads four pages from the tag on a thread-pool thread.

public System.Threading.Tasks.Task<byte[]?> ReadPagesAsync(int pageOffset);
member this.ReadPagesAsync : int -> System.Threading.Tasks.Task<byte[]>

Parameters

pageOffset
Int32

The zero-based index of the first page to read, from 0 through 255.

Returns

Task<Byte[]>

A task whose result contains four pages, totaling 16 bytes.

Remarks

This managed wrapper uses Task.Run to call ReadPages(Int32). Connect first and await the task before starting another operation. A read past the last readable page wraps to the first pages. For example, an original Ultralight read at page 0x0E returns pages 0x0E, 0x0F, 0x00, and 0x01.

The method has no cancellation-token parameter. Calling Close() from another thread cancels blocked I/O with IOException. Exceptions from the synchronous call are reported through the task. The NFC permission is required.

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.

Applies to