Compartir a través de


MifareUltralight.WritePage(Int32, Byte[]) Method

Definition

Write 1 page (4 bytes).

[Android.Runtime.Register("writePage", "(I[B)V", "")]
public void WritePage (int pageOffset, byte[]? data);
[<Android.Runtime.Register("writePage", "(I[B)V", "")>]
member this.WritePage : int * byte[] -> unit

Parameters

pageOffset
Int32

index of page to write, starting from 0

data
Byte[]

4 bytes to write

Attributes

Exceptions

if the tag leaves the field

if there is an I/O failure, or the operation is canceled

Remarks

Write 1 page (4 bytes).

The MIFARE Ultralight protocol always writes 1 page at a time, to minimize EEPROM write cycles.

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.writePage(int, byte[]).

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