ReaderSession

actual class ReaderSession : ReaderSessionInterface
expect class ReaderSession : ReaderSessionInterface

カードとの通信セッション

このクラスは、FeliCa カード(交通系 IC カード、Edy、WAON など)や、ISO/IEC 14443−4 Type-Aカード(クレジットカードなど)を タッチするとマイナンバーカードの挙動をシミュレートします。

複数コマンドの発行

このクラスは、カードに接続した単一のセッションを表します。 同じインスタンスを使用することで、単一のセッション内で複数のコマンドがカードに送信されます。 これによって、カードを一度タッチするだけで複数の署名の作成や、複数の証明書データの取得を行うことができます。

通信開始タイミング

このクラスは、作成された時点ではカードとの通信を行わず、コマンドを送信した際にカードとの通信を開始します。 このため、カードとの通信に起因する例外やコマンド実行エラーは、実際に通信が要求された際に発生します。

actual class ReaderSession : ReaderSessionInterface, PlatformReaderSessionInterface
actual class ReaderSession : ReaderSessionInterface
actual class ReaderSession : ReaderSessionInterface

Constructors

Link copied to clipboard
constructor(context: Context, activity: Activity, option: ReaderSessionOption = ReaderSessionOption(), supplier: CardSupplierInterface? = null)
constructor(context: Context, activity: Activity, supplier: CardSupplierInterface? = null)
constructor(dispatchQueue: dispatch_queue_t)
constructor(dispatchQueue: dispatch_queue_t, supplier: CardSupplierInterface? = null)
constructor(nfcPortLib: NFCPortLib, option: ReaderSessionOption = ReaderSessionOption(), supplier: PlatformCardSupplierInterface? = null)
constructor(cardSupplier: CardSupplierInterface = DefaultCardSupplier(SdkConfig()))

Properties

Link copied to clipboard
open override var dialogMessage: String

iOSのカード読み取りダイアログに表示するメッセージ

Link copied to clipboard
actual open override var onEvent: (ReaderSessionEvent) -> Unit
expect open override var onEvent: (ReaderSessionEvent) -> Unit

各種イベント時に呼び出されるコールバック関数

actual open override var onEvent: (ReaderSessionEvent) -> Unit
actual open override var onEvent: (ReaderSessionEvent) -> Unit
actual open override var onEvent: (ReaderSessionEvent) -> Unit

Functions

Link copied to clipboard
actual open override fun close()
expect open override fun close()

リーダーとの接続を終了する

actual open override fun close()
actual open override fun close()
actual open override fun close()
Link copied to clipboard
open override fun closeWithError(message: String)

リーダーとの接続を終了し、エラーメッセージを表示する