rdrDetectCardInterface

open override fun rdrDetectCardInterface(supportedInterface: Int, timeout: Int): Int

Performs card detection (swipe, instert & tap) on all supported interfaces until timeout.

On a typical COST device that would be performed by enabling the reader mode of the NfcAdapter and wait until the onTagDiscovered callback is called. If a contactless card is presented before the timeout, the function should return CardInterfaceOrErrorType.CARD_INTERFACE_OR_ERROR_TYPE_CONTACTLESS.

It's the implementer's responsibility to handle timeout exhaustion as well user cancellation. In case either of those scenarios happen, the functions should respectively return CardInterfaceOrErrorType.CARD_INTERFACE_OR_ERROR_TYPE_TIMEOUT or CardInterfaceOrErrorType.CARD_INTERFACE_OR_ERROR_TYPE_CANCELLED.

Return

The detected CardInterfaceOrErrorType value (Int)

Parameters

supportedInterfaces
timeout

Timeout value in seconds.