• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Changelog of NFC JS APIs in the Communication Subsystem
2
3Compared with OpenHarmony 3.2 Beta4, OpenHarmony 3.2.10.2(Mr) has the following changes in NFC APIs:
4
5## cl.nfc.1 API Change
6Deprecated some NFC JS APIs in API versions 6 to 8 because the APIs cannot throw error codes, and added new APIs in API version 9 instead.
7
8You need to adapt your application.
9
10 **Change Impact**
11
12The deprecated JS APIs in API versions 6 to 8 are affected. Your application needs to adapt new APIs so that it can properly implement functions in the SDK environment of the new version.
13
14**Key API/Component Changes**
15
16| Module                   | Class               | Method/Attribute/Enum/Constant                                         | Change Type|
17| ------------------------- | ------------------- | ------------------------------------------------------------ | -------- |
18| api/@ohos.nfc.cardEmulation.d.ts        | cardEmulation         | FeatureType  | Deprecated    |
19| api/@ohos.nfc.cardEmulation.d.ts        | cardEmulation         | isSupported  | Deprecated    |
20| api/@ohos.nfc.cardEmulation.d.ts        | cardEmulation         | hasHceCapability  | Added    |
21| api/@ohos.nfc.controller.d.ts        | nfcController         | isNfcAvailable  | Deprecated    |
22| api/@ohos.nfc.controller.d.ts        | nfcController         | openNfc  | Deprecated    |
23| api/@ohos.nfc.controller.d.ts        | nfcController         | closeNfc  | Deprecated    |
24| api/@ohos.nfc.controller.d.ts        | nfcController         | enableNfc  | Added    |
25| api/@ohos.nfc.controller.d.ts        | nfcController         | disableNfc  | Added    |
26| api/@ohos.nfc.tag.d.ts        | tag         | getNfcATag  | Deprecated    |
27| api/@ohos.nfc.tag.d.ts        | tag         | getNfcBTag  | Deprecated    |
28| api/@ohos.nfc.tag.d.ts        | tag         | getNfcFTag  | Deprecated    |
29| api/@ohos.nfc.tag.d.ts        | tag         | getNfcVTag  | Deprecated    |
30| api/@ohos.nfc.tag.d.ts        | tag         | getNfcA  | Added    |
31| api/@ohos.nfc.tag.d.ts        | tag         | getNfcB  | Added    |
32| api/@ohos.nfc.tag.d.ts        | tag         | getNfcF  | Added    |
33| api/@ohos.nfc.tag.d.ts        | tag         | getNfcV  | Added    |
34| api/tag/tagSession.d.ts        | TagSession          | getTagInfo  | Deprecated    |
35| api/tag/tagSession.d.ts        | TagSession          | connectTag  | Deprecated    |
36| api/tag/tagSession.d.ts        | TagSession          | reset  | Deprecated    |
37| api/tag/tagSession.d.ts        | TagSession          | isTagConnected  | Deprecated    |
38| api/tag/tagSession.d.ts        | TagSession          | setSendDataTimeout  | Deprecated    |
39| api/tag/tagSession.d.ts        | TagSession          | getSendDataTimeout  | Deprecated    |
40| api/tag/tagSession.d.ts        | TagSession          | sendData  | Deprecated    |
41| api/tag/tagSession.d.ts        | TagSession          | getMaxSendLength  | Deprecated    |
42| api/tag/tagSession.d.ts        | TagSession          | connect  | Added    |
43| api/tag/tagSession.d.ts        | TagSession          | resetConnection  | Added    |
44| api/tag/tagSession.d.ts        | TagSession          | isConnected  | Added    |
45| api/tag/tagSession.d.ts        | TagSession          | setTimeout  | Added    |
46| api/tag/tagSession.d.ts        | TagSession          | getTimeout  | Added    |
47| api/tag/tagSession.d.ts        | TagSession          | transmit  | Added    |
48| api/tag/tagSession.d.ts        | TagSession          | getMaxTransmitSize  | Added    |
49
50**Adaptation Guide**
51
52See the following:
53[@ohos.nfc.cardEmulation (Standard NFC Card Emulation)](../../../application-dev/reference/apis/js-apis-cardEmulation.md)
54
55[@ohos.nfc.controller (Standard NFC)](../../../application-dev/reference/apis/js-apis-nfcController.md)
56
57[@ohos.nfc.tag (Standard NFC Tags)](../../../application-dev/reference/apis/js-apis-nfcTag.md)
58
59[tagSession (Standard NFC Tag Session)](../../../application-dev/reference/apis/js-apis-tagSession.md)
60
61
62