transceive<T> static method
Transceive data with the card / tag in the format of APDU (iso7816) or raw commands (other technologies).
The capdu
can be either of type Uint8List or hex string.
Return value will be in the same type of capdu
.
There must be a valid session when invoking.
On Android, timeout
parameter will set transceive execution timeout that is persistent during a active session.
Also, Ndef TagTechnology will be closed if active.
On iOS, this parameter is ignored and is decided by the OS.
On Web, timeout
is currently not
Timeout is reset to default value when finish is called, and could be changed by multiple calls to transceive.
Implementation
static Future<T> transceive<T>(T capdu, {Duration? timeout}) async {
assert(capdu is String || capdu is Uint8List);
return await _channel.invokeMethod('transceive', {
'data': capdu,
'timeout': timeout?.inMilliseconds ?? TRANSCEIVE_TIMEOUT
});
}