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 aRunnable
to the UI thread through aandroid.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). SeeSCMUtils.openWaitForTokenDialog(Activity)
.
Methods¶
onReaderAdded¶
onReaderRemoved¶
onReaderStateChanged¶
- void onReaderStateChanged(Reader reader)¶
Called when the state of a reader changes (e.g. insertion or withdrawal of a card, …).
- Parameters:
reader – the affected
Reader
object. Its properties can be consulted (e.g. usingReader.getStatus()
,Reader.isCardPresent()
, …) to obtain more information about the event.
onWaitForTokenUserDismissed¶
- void onWaitForTokenUserDismissed()¶
Called when the “wait for token” dialog is dismissed by the user’s initiative (by touching outside the dialog).