Language

IsoDep.TransceiveAsync(Byte[]) Method

Definition

Sends ISO-DEP data to the tag and receives its response on a thread-pool thread.

public System.Threading.Tasks.Task<byte[]?> TransceiveAsync(byte[]? data);
member this.TransceiveAsync : byte[] -> System.Threading.Tasks.Task<byte[]>

Parameters

data
Byte[]

The non-null ISO-DEP INF payload to send, without start-of-frame or end-of-frame indicators.

Returns

Task<Byte[]>

A task whose result contains the response bytes.

Remarks

This managed wrapper uses Task.Run to call Transceive(Byte[]). Connect first and await the task before starting another operation. The payload must not exceed MaxTransceiveLength. ISO-DEP fragmentation and reassembly are automatic.

The method has no cancellation-token parameter. Calling Close() from another thread cancels blocked I/O with IOException. Tag loss and other 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