ReaderEvents

public interface ReaderEvents

Interface used to received smart card reader events. The methods are not called within the context of the main UI thread. If UI actions must be made within these methods, you can delegate the operation to android.app.Activity.runOnUiThread(Runnable), or post a Runnable to the UI thread through a android.os.Handler. Also note that due to system restrictions, it is only possible to correctly report events when the Smart Card Middleware application is in foreground (not the target application). See SCMUtils.openWaitForTokenDialog(Activity).

Methods

onReaderAdded

void onReaderAdded(Reader reader)

Called when a new reader is plugged on the device, or a bluetooth reader discovered.

Parameters:
  • reader – the new Reader object.

onReaderRemoved

void onReaderRemoved(Reader reader)

Called when a reader is unplugged from the computer.

Parameters:
  • reader – the removed Reader object.

onReaderStateChanged

void onReaderStateChanged(Reader reader)

Called when the state of a reader changes (e.g. insertion or withdrawal of a card, …).

Parameters:

onWaitForTokenUserDismissed

void onWaitForTokenUserDismissed()

Called when the “wait for token” dialog is dismissed by the user’s initiative (by touching outside the dialog).