• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# NFC<a name="EN-US_TOPIC_0000001133207781"></a>
2
3-   [Introduction](#section13587125816351)
4-   [Architecture](#section13587185873516)
5-   [Directory Structure](#section161941989596)
6-   [Constraints](#section119744591305)
7-   [Usage](#section1312121216216)
8-   [Repositories Involved](#section1371113476307)
9
10## Introduction<a name="section13587125816351"></a>
11
12Near-field communication \(NFC\) is a non-contact identification and interconnection technology for short-distance wireless communication between mobile devices, consumer electronic products, PCs, and smart devices.
13
14NFC service provides NFC switch control, NFC tag discovery and dispatch, NFC tag reading and writing, NFC card emulation functions.
15
16## Architecture<a name="section13587185873516"></a>
17
18**Figure  1**  NFC architecture<a name="fig4460722185514"></a>
19
20
21![](figures/en-us_image_0000001086731550.png)
22
23## Directory Structure<a name="section161941989596"></a>
24
25```
26/foundation/communication/nfc
27├── interfaces                        # Interface
28│   └── inner_api                     # System inner interface
29├── frameworks                        # Framework interface
30│   └── js                            # Implementation of JS API
31│       └── napi                      # Napi implementation of JS API
32├── services                          # Service implementation
33├── test                              # Test code
34├── BUILD.gn                          # Build entry
35└── bundle.json                       # Component description
36```
37
38## Constraints<a name="section119744591305"></a>
39
40-   The device must have an NFC controller chip to use NFC services.
41
42## Usage<a name="section1312121216216"></a>
43
44-  NFC switch
45
46Please reference: docs/zh-cn/application-dev/reference/apis/js-apis-nfcController.md47
48-  NFC tag reading and writing
49
50Please reference: docs/zh-cn/application-dev/reference/apis/js-apis-nfcTag.md51
52-  NFC card emulation
53
54Please reference: docs/zh-cn/application-dev/reference/apis/js-apis-cardEmulation.md55
56## Repositories Involved<a name="section1371113476307"></a>
57
58hmf/communication/nfc
59
60