This module is used to implement Near-Field Communication (NFC) card emulation.
> **NOTE**<br>
> The initial APIs of this module are supported since API version 8. Newly added APIs will be marked with a superscript to indicate their earliest API version.
## **Modules to Import**
```
import cardEmulation from '@ohos.nfc.cardEmulation';
```
## cardEmulation.isSupported
isSupported(feature: number): boolean
Checks whether a certain type of card emulation is supported.
| boolean | Returns **true** if the card emulation is supported; returns **false** otherwise.|
## HceService
Implements Host-based Card Emulation (HCE). Before calling any API in **HceService**, you must use **new cardEmulation.HceService()** to create an **HceService** instance.
| type | string | Yes | Event type to subscribe to. The value is **hceCmd**. |
| callback | AsyncCallback<number[]> | Yes | Callback invoked to return the subscribed event. The input parameter is a data array that complies with the Application Protocol Data Unit (APDU).|
This module is used to implement Near-Field Communication (NFC).
> **NOTE**<br>
> The initial APIs of this module are supported since API version 8. Newly added APIs will be marked with a superscript to indicate their earliest API version.
## **Modules to Import**
```
import controller from '@ohos.nfc.controller';
```
## controller.isNfcAvailable
isNfcAvailable(): boolean
Checks whether NFC is available.
**Return value**
| **Type**| **Description**|
| -------- | -------- |
| boolean | Returns **true** if NFC is available; returns **false** otherwise.|
| type | string | Yes| Event type to unsubscribe from. The value is **nfcStateChange**.|
| callback | Callback<NfcState> | No| Callback used to return the NFC state changes. If this parameter is not specified, all callbacks associated with the specified event will be unregistered.|
This module is used to manage Near-Field Communication (NFC) tags.
> **NOTE**<br>
> The initial APIs of this module are supported since API version 8. Newly added APIs will be marked with a superscript to indicate their earliest API version.
## **Modules to Import**
```
import tag from '@ohos.nfc.tag';
```
## tag.getNfcATag
getNfcATag(tagInfo: TagInfo): NfcATag
Obtains the **NfcATag** object, which allows access to the tags that use the NfcA technology.