Package org.eclipse.keyple.plugin.android.nfc

This document specifies the API dedicated to the integration of the Android NFC plugin in an Android Keyple application.

Observability

The Android NFC plugin requires the use of the Keyple observation pattern at the reader level to handle card insertion and removal events.
Unlike other reader implementations, Android NFC does not support continuous polling for card presence (e.g., isCardPresent()). Instead, it relies entirely on Android’s event-driven model.

To properly detect card presence and handle interactions, it is mandatory to cast Reader objects as ObservableReader and implement the appropriate interfaces from the Keyple Service SPI package.

Since NFC events are managed asynchronously by the Android system, working without observation is not possible in this context. Any integration of the Android NFC plugin must therefore be designed around this event-driven approach.

Types

Link copied to clipboard
data class AndroidNfcConfig(    val activity: Activity,     val isPlatformSoundEnabled: Boolean = true,     val skipNdefCheck: Boolean = true,     val cardInsertionPollingInterval: Int = 0,     val cardRemovalPollingInterval: Int = 100)

Configuration class holding all the plugin options.

Link copied to clipboard
object AndroidNfcConstants

Constants for the Android NFC plugin.

Link copied to clipboard
interface AndroidNfcPlugin : KeyplePluginExtension

Extends the KeyplePluginExtension interface.

Link copied to clipboard
interface AndroidNfcPluginFactory : KeyplePluginExtensionFactory

Extends the KeyplePluginExtensionFactory interface.

Link copied to clipboard
object AndroidNfcPluginFactoryProvider

Provider of AndroidNfcPluginFactory instances.

Link copied to clipboard
interface AndroidNfcReader : KeypleReaderExtension

Extends the KeypleReaderExtension interface.

Link copied to clipboard

Enum representing supported NFC protocols.