IMPORTANT—Support ended for Android NFC feature from July 2023
With the launch of the third generation of Clover Flex and Mini devices, we no longer support the Android NFC (Near Field Communication) feature.
- In the third generation Clover devices, you can use alternatives to the Android NFC feature, such as external USB NFC readers.
- In older Clover devices, such as Clover Station 2018, Mini2, Flex1, and Flex2, you can still use Android NFC; however, we do not actively support this feature.
Using Android API level 19 onwards, you can build NFC solutions to read and write data payloads between a tag and a Clover device.
The following Clover devices support both the NFC reader and writer modes:
- Clover Station 2018 with display printer
- Clover Mini 2
- Clover Flex
The required considerations for building with Android NFC on Clover devices are:
- Conserve power—To account for thermal and power considerations on Clover devices, do not keep NFC enabled for your app at all times. We recommend enabling NFC for your app only when a tag is detected. If no tag is detected for 10 minutes, NFC is disabled automatically. At this point, you can enable NFC again by moving your app to the foreground.
- Show NFC states—Indicates the current NFC state for instance, with a spinner, by implementing a broadcast receiver for the
- Supported signal and tag modes—Different signal and tag modes supported by Clover devices:
|Signal mode||Tag mode|
|NFC-A, NFC-B, NFC-F||T1T, T2T, T3T, T4T|
This section provides guidelines for using the Android NfcAdapter class in your app.
The NFC antenna is enabled only when your app is in the foreground. In the foreground activity, your app must call the following methods of the
If a window is added over an activity, both the NFC reader and writer modes are disabled.
Clover devices support three NFC states defined by the
|NFC field is enabled on the Clover device.|
|NFC field is being initialized. Your app can show the current NFC state by implementing a broadcast receiver for the |
|NFC is not supported by the Clover device.|
Clover devices do not support the
STATE_TURNING_OFFNFC state of the
To receive notifications about tags, register for the following intents:
ACTION_NDEF_DISCOVERED ACTION_TAG_DISCOVERED ACTION_TECH_DISCOVERED
To maintain security, Clover does not support Android Beam and any related callbacks. The following methods of the
NfcAdapter class are not supported:
enableForegroundNdefPush() enableReaderMode() invokeBeam() setBeamPushUris() setBeamPushUrisCallback() setNdefPushMessage() setNdefPushMessageCallback() setOnNdefPushCompleteCallback()
The Android system uses the Application ID (AIDs) of an NFC device or tag to identify a Host-based card emulation (HCE) service to communicate with.
For more information on HCE services and AIDs, see the Android Developer documentation on host-based card emulation.
Clover automatically allows all non-payment AIDs, but blocks Payment AIDs that begin with 0xA00000.
For additional information on Android NFC specifications and capabilities, see the Android Developer documentation on NFC.
Updated about 1 month ago