---
updatedAt: 2026-03-24T12:12:56.000Z
agentTools:
  projectIndex: https://docs.clover.com/dev/llms.txt
---

# Build with Android NFC (support ended July 2023)

<meta name=" description" content="Learn how to use Android Near Field Communication (NFC) solutions to read and write data payload between a tag and a Clover device. This feature is only supported in Clover devices prior to Generation 3.">

[block:html]
{
  "html": "<div class=\"container-top\">\n  <!-- North America -->\n  <div class=\"container-reg\">\n    <div class=\"pill-reg\">\n      <div class=\"label-reg\">North America</div>\n    </div>\n  </div>\n\n  <!-- Europe -->\n  <div class=\"container-reg\">\n    <div class=\"pill-reg\">\n      <div class=\"label-reg\">Europe</div>\n    </div>\n  </div>\n\n  <!-- Latin America -->\n  <div class=\"container-reg\">\n    <div class=\"pill-reg\">\n      <div class=\"label-reg\">Latin America</div>\n    </div>\n  </div>\n</div>\n\n<!-- CSS moved to global stylesheet-->\n"
}
[/block]

> 🚧 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 earlier 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.

**Android API level:** Using Android API level 19 onwards, you can build NFC solutions to read and write data payloads between a tag and a Clover device.

**Clover devices:** NFC reader and writer modes are available in the following devices:

* Clover Station 2018 with display printer
* Clover Mini 2
* Clover Flex

## Clover device guidelines

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 enable NFC 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 automatically turned off. 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`ACTION_ADAPTER_STATE_CHANGED` action.
* **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 |

## Use the NfcAdapter class

This section provides guidelines for using the [Android NfcAdapter class](https://developer.android.com/reference/android/nfc/NfcAdapter) in your app.

### Enable the NFC reader

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 `NfcAdapter` class:

* `enableForegroundDispatch()` when `onResume()` is called
* `disableForegroundDispatch()` when `onPause()` is called\
  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 `NfcAdapter` class:

| State              | Description                                                                                                                                                 |
| :----------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `STATE_ON`         | NFC field is enabled on the Clover device.                                                                                                                  |
| `STATE_TURNING_ON` | NFC field is being initialized. Your app can show the current NFC state by implementing a broadcast receiver for the `ACTION_ADAPTER_STATE_CHANGED` action. |
| `STATE_OFF`        | NFC is not supported by the Clover device.                                                                                                                  |

> 📘 NOTE
>
> Clover devices do not support the `STATE_TURNING_OFF` NFC state of the `NfcAdapter` class.

### Receive notifications

To receive notifications about tags, register for the following intents:

```java
ACTION_NDEF_DISCOVERED
ACTION_TAG_DISCOVERED
ACTION_TECH_DISCOVERED
```

### Security limitations

To maintain security, Clover does not support Android Beam and any related callbacks. The following methods of the `NfcAdapter` class are **not** supported:

```java
enableForegroundNdefPush()
enableReaderMode()
invokeBeam()
setBeamPushUris()
setBeamPushUrisCallback()
setNdefPushMessage()
setNdefPushMessageCallback()
setOnNdefPushCompleteCallback()
```

## Communication with HCE

The Android system uses the Application ID (AIDs) of an NFC device or tag to identify a Host-based card emulation (HCE) service with which to communicate. Clover automatically lets all non-payment AIDs but blocks  Payment AIDs that start with 0xA00000.

For more information on:

* HCE services and AIDs, see the [Android Developer documentation on host-based card emulation](https://developer.android.com/guide/topics/connectivity/nfc/)
* Android NFC specifications and capabilities, see the [Android Developer documentation on NFC](https://developer.android.com/guide/topics/connectivity/nfc/)