diff --git a/en/application-dev/reference/apis/js-apis-cardEmulation.md b/en/application-dev/reference/apis/js-apis-cardEmulation.md index 599ec851697326c6329d1d080fe611a3161a9514..946ebd2f881fe66a7ec6b0afc8e308d254a6f68c 100644 --- a/en/application-dev/reference/apis/js-apis-cardEmulation.md +++ b/en/application-dev/reference/apis/js-apis-cardEmulation.md @@ -21,11 +21,11 @@ Enumerates the NFC card emulation types. **System capability**: SystemCapability.Communication.NFC.CardEmulation -| Name| Value| Description| -| -------- | -------- | -------- | -| HCE | 0 | HCE.| -| UICC | 1 | Subscriber identity module (SIM) card emulation.| -| ESE | 2 | embedded Secure Element (eSE) emulation.| +| Name | Value | Description | +| ---- | ---- | -------- | +| HCE | 0 | HCE.| +| UICC | 1 | Subscriber identity module (SIM) card emulation.| +| ESE | 2 | embedded Secure Element (eSE) emulation. | ## CardType9+ @@ -33,10 +33,10 @@ Enumerates the types of services used by the card emulation application. **System capability**: SystemCapability.Communication.NFC.CardEmulation -| Name| Value| Description| -| -------- | -------- | -------- | +| Name | Value | Description | +| ------- | --------- | ----------------- | | PAYMENT | "payment" | Payment type.| -| OTHER | "other" | Other types.| +| OTHER | "other" | Other types.| ## isSupported @@ -51,14 +51,14 @@ Checks whether a certain type of card emulation is supported. **Parameters** -| Name | Type | Mandatory| Description | -| ------- | -------- | ---- | ----------------------- | -| feature | number | Yes | Card emulation type. For details, see [FeatureType](#featuretype).| +| Name | Type | Mandatory | Description | +| ------- | ------ | ---- | ---------------------------------------- | +| feature | number | Yes | Card emulation type. For details, see [FeatureType](#featuretype).| **Return value** -| **Type**| **Description**| -| -------- | -------- | +| **Type** | **Description** | +| ------- | -------------------------------------- | | boolean | Returns **true** if the card emulation type is supported; returns **false** otherwise.| ## hasHceCapability9+ @@ -73,8 +73,8 @@ Checks whether HCE is supported. **Return value** -| **Type**| **Description**| -| -------- | -------- | +| **Type** | **Description** | +| ------- | -------------------------------- | | boolean | Returns **true** if HCE is supported; returns **false** otherwise.| ## isDefaultService9+ @@ -89,15 +89,15 @@ Checks whether an application is the default application of the specified servic **Parameters** -| Name | Type | Mandatory| Description | -| ------- | -------- | ---- | ----------------------- | -| elementName | [ElementName](js-apis-bundleManager-elementName.md#elementname) | Yes| Application description, which consists of the bundle name and component name.| -| type | [CardType](#cardtype9) | Yes| Card emulation service type.| +| Name | Type | Mandatory | Description | +| ----------- | ---------------------------------------- | ---- | ----------------------- | +| elementName | [ElementName](js-apis-bundleManager-elementName.md#elementname) | Yes | Application description, which consists of the bundle name and component name.| +| type | [CardType](#cardtype9) | Yes | Card emulation service type. | **Return value** -| **Type**| **Description**| -| -------- | -------- | +| **Type** | **Description** | +| ------- | ------------------------------------ | | boolean | Returns **true** if the application is the default payment application; returns **false** otherwise.| **Example** @@ -108,13 +108,11 @@ import cardEmulation from '@ohos.nfc.cardEmulation'; var isHceSupported = cardEmulation.isSupported(cardEmulation.FeatureType.HCE); if (!isHceSupported) { console.log('this device is not supported for HCE, ignore it.'); - return; } var hasHceCap = cardEmulation.hasHceCapability(); if (!hasHceCap) { console.log('this device hasHceCapability false, ignore it.'); - return; } var elementName = { diff --git a/en/application-dev/reference/apis/js-apis-nfcTag.md b/en/application-dev/reference/apis/js-apis-nfcTag.md index 6b1bd68289e090aaa4ee73ce459437a51db5bff1..61bd849804434dfd16db488c933c7b62bb47456d 100644 --- a/en/application-dev/reference/apis/js-apis-nfcTag.md +++ b/en/application-dev/reference/apis/js-apis-nfcTag.md @@ -48,10 +48,11 @@ Before developing applications related to tag read and write, you must declare N } ``` > **CAUTION**
-1. The **actions** field is mandatory. It must be **ohos.nfc.tag.action.TAG_FOUND** and cannot be changed. -2. The **name** field under **metadata** is mandatory. It must be **tag-tech** and cannot be changed. -3. The **value** field under **metadata** is mandatory. It can be **NfcA**, **NfcB**, **NfcF**, **NfcV**, **IsoDep**, **Ndef**, **MifareClassic**, **MifareUL**, **NdefFormatable** or any of their combinations. Incorrect settings of this field will cause a parsing failure. -4. The **name** field under **requestPermissions** is mandatory. It must be **ohos.permission.NFC_TAG** and cannot be changed. +> +> - The **actions** field is mandatory. It must be **ohos.nfc.tag.action.TAG_FOUND** and cannot be changed. +> - The **name** field under **metadata** is mandatory. It must be **tag-tech** and cannot be changed. +> - The **value** field under **metadata** is mandatory. It can be **NfcA**, **NfcB**, **NfcF**, **NfcV**, **IsoDep**, **Ndef**, **MifareClassic**, **MifareUL**, **NdefFormatable** or any of their combinations. Incorrect settings of this field will cause a parsing failure. +> - The **name** field under **requestPermissions** is mandatory. It must be **ohos.permission.NFC_TAG** and cannot be changed. ## **Modules to Import** @@ -98,7 +99,7 @@ onCreate(want, launchParam) { if (isNfcATag) { var nfcA; try { - nfcA = tag.getNfcATag(taginfo); + nfcA = tag.getNfcATag(tagInfo); } catch (error) { console.log("tag.getNfcATag caught error: " + error); } @@ -109,7 +110,7 @@ onCreate(want, launchParam) { if (isIsoDepTag) { var isoDep; try { - isoDep = tag.getIsoDep(taginfo); + isoDep = tag.getIsoDep(tagInfo); } catch (error) { console.log("tag.getIsoDep caught error: " + error); } @@ -139,8 +140,8 @@ Obtains an **NfcATag** object, which allows access to the tags that use the NFC- **Return value** -| **Type**| **Description**| -| -------- | -------- | +| **Type** | **Description** | +| ------------------------------------- | ------------- | | [NfcATag](js-apis-nfctech.md#nfcatag) | **NfcATag** object obtained.| ## tag.getNfcA9+ @@ -159,16 +160,16 @@ Obtains an **NfcATag** object, which allows access to the tags that use the NFC- **Return value** -| **Type**| **Description**| -| -------- | -------- | +| **Type** | **Description** | +| ------------------------------------- | ------------- | | [NfcATag](js-apis-nfctech.md#nfcatag) | **NfcATag** object obtained.| **Error codes** For details about the error codes, see [NFC Error Codes](../errorcodes/errorcode-nfc.md). -| ID| Error Message| -| ------- | -------| +| ID | Error Message | +| ------- | ---------------------------------------- | | 3100201 | Tag running state is abnormal in service. | ## tag.getNfcBTag @@ -190,9 +191,9 @@ Obtains an **NfcBTag** object, which allows access to the tags that use the NFC- **Return value** -| **Type**| **Description** | -| -------- | ---------------- | -| [NfcBTag](js-apis-nfctech.md#nfcbtag) | **NfcBTag** object obtained.| +| **Type** | **Description** | +| ------------------------------------- | ------------- | +| [NfcBTag](js-apis-nfctech.md#nfcbtag) | **NfcBTag** object obtained.| ## tag.getNfcB9+ @@ -210,16 +211,16 @@ Obtains an **NfcBTag** object, which allows access to the tags that use the NFC- **Return value** -| **Type**| **Description** | -| -------- | ---------------- | -| [NfcBTag](js-apis-nfctech.md#nfcbtag) | **NfcBTag** object obtained.| +| **Type** | **Description** | +| ------------------------------------- | ------------- | +| [NfcBTag](js-apis-nfctech.md#nfcbtag) | **NfcBTag** object obtained.| **Error codes** For details about the error codes, see [NFC Error Codes](../errorcodes/errorcode-nfc.md). -| ID| Error Message| -| ------- | -------| +| ID | Error Message | +| ------- | ---------------------------------------- | | 3100201 | Tag running state is abnormal in service. | ## tag.getNfcFTag @@ -241,9 +242,9 @@ Obtains an **NfcFTag** object, which allows access to the tags that use the NFC- **Return value** -| **Type**| **Description** | -| -------- | ---------------- | -| [NfcFTag](js-apis-nfctech.md#nfcftag) | **NfcFTag** object obtained.| +| **Type** | **Description** | +| ------------------------------------- | ------------- | +| [NfcFTag](js-apis-nfctech.md#nfcftag) | **NfcFTag** object obtained.| ## tag.getNfcF9+ @@ -261,16 +262,16 @@ Obtains an **NfcFTag** object, which allows access to the tags that use the NFC- **Return value** -| **Type**| **Description** | -| -------- | ---------------- | -| [NfcFTag](js-apis-nfctech.md#nfcftag) | **NfcFTag** object obtained.| +| **Type** | **Description** | +| ------------------------------------- | ------------- | +| [NfcFTag](js-apis-nfctech.md#nfcftag) | **NfcFTag** object obtained.| **Error codes** For details about the error codes, see [NFC Error Codes](../errorcodes/errorcode-nfc.md). -| ID| Error Message| -| ------- | -------| +| ID | Error Message | +| ------- | ---------------------------------------- | | 3100201 | Tag running state is abnormal in service. | ## tag.getNfcVTag @@ -292,9 +293,9 @@ Obtains an **NfcVTag** object, which allows access to the tags that use the NFC- **Return value** -| **Type**| **Description** | -| -------- | ---------------- | -| [NfcVTag](js-apis-nfctech.md#nfcvtag) | **NfcVTag** object obtained.| +| **Type** | **Description** | +| ------------------------------------- | ------------- | +| [NfcVTag](js-apis-nfctech.md#nfcvtag) | **NfcVTag** object obtained.| ## tag.getNfcV9+ @@ -312,16 +313,16 @@ Obtains an **NfcVTag** object, which allows access to the tags that use the NFC- **Return value** -| **Type**| **Description** | -| -------- | ---------------- | -| [NfcVTag](js-apis-nfctech.md#nfcvtag) | **NfcVTag** object obtained.| +| **Type** | **Description** | +| ------------------------------------- | ------------- | +| [NfcVTag](js-apis-nfctech.md#nfcvtag) | **NfcVTag** object obtained.| **Error codes** For details about the error codes, see [NFC Error Codes](../errorcodes/errorcode-nfc.md). -| ID| Error Message| -| ------- | -------| +| ID | Error Message | +| ------- | ---------------------------------------- | | 3100201 | Tag running state is abnormal in service. | ## tag.getIsoDep9+ @@ -334,22 +335,22 @@ Obtains an **IsoDepTag** object, which allows access to the tags that use the IS **Parameters** -| Name | Type | Mandatory | Description | -| --------- | ------------------------- | ---- | ---------------------------------------- | -| taginfo | [TagInfo](#taginfo) | Yes| Tag information including the technology type and related parameters, which are obtained from **tag.getTagInfo(want: Want)**. | +| Name | Type | Mandatory | Description | +| ------- | ------------------- | ---- | ---------------------------------------- | +| taginfo | [TagInfo](#taginfo) | Yes | Tag information including the technology type and related parameters, which are obtained from **tag.getTagInfo(want: Want)**.| **Return value** -| **Type**| **Description** | -| ---------- | ------------------| -| [IsoDepTag](js-apis-nfctech.md#isodeptag9) | **IsoDepTag** object obtained.| +| **Type** | **Description** | +| ---------------------------------------- | ----------------------------------- | +| [IsoDepTag](js-apis-nfctech.md#isodeptag9) | **IsoDepTag** object obtained.| **Error codes** For details about the error codes, see [NFC Error Codes](../errorcodes/errorcode-nfc.md). -| ID| Error Message| -| ------- | -------| +| ID | Error Message | +| ------- | ---------------------------------------- | | 3100201 | Tag running state is abnormal in service. | ## tag.getNdef9+ @@ -362,22 +363,22 @@ Obtains an **NdefTag** object, which allows access to the tags in the NFC Data E **Parameters** -| Name | Type | Mandatory | Description | -| --------- | ------------------------- | ---- | ---------------------------------------- | -| taginfo | [TagInfo](#taginfo) | Yes | Tag information including the technology type and related parameters, which are obtained from **tag.getTagInfo(want: Want)**. | +| Name | Type | Mandatory | Description | +| ------- | ------------------- | ---- | ---------------------------------------- | +| taginfo | [TagInfo](#taginfo) | Yes | Tag information including the technology type and related parameters, which are obtained from **tag.getTagInfo(want: Want)**.| **Return value** -| **Type**| **Description** | -| ---------| -------------- | -| [NdefTag](js-apis-nfctech.md#ndeftag9) | **NdefTag** object obtained.| +| **Type** | **Description** | +| -------------------------------------- | ------------------------------- | +| [NdefTag](js-apis-nfctech.md#ndeftag9) | **NdefTag** object obtained.| **Error codes** For details about the error codes, see [NFC Error Codes](../errorcodes/errorcode-nfc.md). -| ID| Error Message| -| ------- | -------| +| ID | Error Message | +| ------- | ---------------------------------------- | | 3100201 | Tag running state is abnormal in service. | ## tag.getMifareClassic9+ @@ -390,22 +391,22 @@ Obtains a **MifareClassicTag** object, which allows access to the tags that use **Parameters** -| Name | Type | Mandatory | Description | -| --------- | ------------------------- | ---- | ---------------------------------------- | -| taginfo | [TagInfo](#taginfo) | Yes | Tag information including the technology type and related parameters, which are obtained from **tag.getTagInfo(want: Want)**. | +| Name | Type | Mandatory | Description | +| ------- | ------------------- | ---- | ---------------------------------------- | +| taginfo | [TagInfo](#taginfo) | Yes | Tag information including the technology type and related parameters, which are obtained from **tag.getTagInfo(want: Want)**.| **Return value** -| **Type**| **Description** | -| ----------------- | ------------------------| -| [MifareClassicTag](js-apis-nfctech.md#mifareclassictag-9) | **MifareClassicTag** object obtained.| +| **Type** | **Description** | +| ---------------------------------------- | ---------------------------------------- | +| [MifareClassicTag](js-apis-nfctech.md#mifareclassictag-9) | **MifareClassicTag** object obtained.| **Error codes** For details about the error codes, see [NFC Error Codes](../errorcodes/errorcode-nfc.md). -| ID| Error Message| -| ------- | -------| +| ID | Error Message | +| ------- | ---------------------------------------- | | 3100201 | Tag running state is abnormal in service. | ## tag.getMifareUltralight9+ @@ -417,22 +418,22 @@ Obtains a **MifareUltralightTag** object, which allows access to the tags that u **System capability**: SystemCapability.Communication.NFC.Tag **Parameters** -| Name | Type | Mandatory | Description | -| --------- | ------------------------- | ---- | ---------------------------------------- | -| taginfo | [TagInfo](#taginfo) | Yes | Tag information including the technology type and related parameters, which are obtained from **tag.getTagInfo(want: Want)**. | +| Name | Type | Mandatory | Description | +| ------- | ------------------- | ---- | ---------------------------------------- | +| taginfo | [TagInfo](#taginfo) | Yes | Tag information including the technology type and related parameters, which are obtained from **tag.getTagInfo(want: Want)**.| **Return value** -| **Type**| **Description** | -| -------------------- | ---------------------------| -| [MifareUltralightTag](js-apis-nfctech.md#mifareultralighttag9) | **MifareUltralightTag** object obtained.| +| **Type** | **Description** | +| ---------------------------------------- | ---------------------------------------- | +| [MifareUltralightTag](js-apis-nfctech.md#mifareultralighttag9) | **MifareUltralightTag** object obtained.| **Error codes** For details about the error codes, see [NFC Error Codes](../errorcodes/errorcode-nfc.md). -| ID| Error Message| -| ------- | -------| +| ID | Error Message | +| ------- | ---------------------------------------- | | 3100201 | Tag running state is abnormal in service. | ## tag.getNdefFormatable9+ @@ -445,16 +446,16 @@ Obtains an **NdefFormatableTag** object, which allows access to the tags that ar **Return value** -| **Type**| **Description** | -| ------------------ | --------------------------| -| [NdefFormatableTag](js-apis-nfctech.md#ndefformatabletag) | **NdefFormatableTag** object obtained.| +| **Type** | **Description** | +| ---------------------------------------- | ---------------------------------------- | +| [NdefFormatableTag](js-apis-nfctech.md#ndefformatabletag) | **NdefFormatableTag** object obtained.| **Error codes** For details about the error codes, see [NFC Error Codes](../errorcodes/errorcode-nfc.md). -| ID| Error Message| -| ------- | -------| +| ID | Error Message | +| ------- | ---------------------------------------- | | 3100201 | Tag running state is abnormal in service. | ## tag.getTagInfo9+ @@ -467,14 +468,14 @@ Obtains **TagInfo** from **Want**, which is initialized by the NFC service and c **Parameters** -| Name | Type | Mandatory | Description | -| --------- | ------------------------- | ---- | ---------------------------------------- | -| want | [Want](js-apis-app-ability-want.md#Want) | Yes | Data obtained from the parameters of the **onCreate** entry function when an ability is dispatched. | +| Name | Type | Mandatory | Description | +| ---- | ---------------------------------------- | ---- | --------------------------------- | +| want | [Want](js-apis-app-ability-want.md#Want) | Yes | Data obtained from the parameters of the **onCreate** entry function when an ability is dispatched.| **Return value** -| **Type**| **Description** | -| ------------------ | --------------------------| +| **Type** | **Description** | +| ------------------- | --------------------------- | | [TagInfo](#taginfo) | **TagInfo** object obtained.| @@ -488,14 +489,14 @@ Creates an NDEF record based on the specified URI. **Parameters** -| Name | Type | Mandatory| Description | -| -------- | ----------------------- | ---- | -------------------------------------- | -| uri | string | Yes| Data to write to the NDEF record.| +| Name | Type | Mandatory | Description | +| ---- | ------ | ---- | ---------------------- | +| uri | string | Yes | Data to write to the NDEF record.| **Return value** -| **Type**| **Description** | -| ------------------ | --------------------------| +| **Type** | **Description** | +| -------------------------- | ---------------------------------------- | | [NdefRecord](#ndefrecord9) | NDEF record created. For details, see *NFCForum-TS-NDEF_1.0*.| **Example** @@ -527,15 +528,15 @@ Creates an NDEF record based on the specified text data and encoding type. **Parameters** -| Name | Type | Mandatory| Description | -| -------- | ----------------------- | ---- | -------------------------------------- | -| text | string | Yes | Text to write to the NDEF record.| -| locale | string | Yes | Encoding mode of the text.| +| Name | Type | Mandatory | Description | +| ------ | ------ | ---- | ------------------------ | +| text | string | Yes | Text to write to the NDEF record.| +| locale | string | Yes | Encoding mode of the text. | **Return value** -| **Type**| **Description** | -| ------------------ | --------------------------| +| **Type** | **Description** | +| -------------------------- | ---------------------------------------- | | [NdefRecord](#ndefrecord9) | NDEF record created. For details, see *NFCForum-TS-NDEF_1.0*.| **Example** @@ -569,15 +570,15 @@ Creates an NDEF record based on the specified MIME data and type. **Parameters** -| Name | Type | Mandatory| Description | -| -------- | ----------------------- | ---- | -------------------------------------- | -| mimeType | string | Yes | MIME type that complies with RFC rules, for example, **text/plain** or **image/jpeg**.| -| mimeData | number[] | Yes | MIME data, which consists of hexadecimal numbers ranging from **0x00** to **0xFF**.| +| Name | Type | Mandatory | Description | +| -------- | -------- | ---- | ---------------------------------------- | +| mimeType | string | Yes | MIME type that complies with RFC rules, for example, **text/plain** or **image/jpeg**.| +| mimeData | number[] | Yes | MIME data, which consists of hexadecimal numbers ranging from **0x00** to **0xFF**. | **Return value** -| **Type**| **Description** | -| ------------------ | --------------------------| +| **Type** | **Description** | +| -------------------------- | ---------------------------------------- | | [NdefRecord](#ndefrecord9) | NDEF record created. For details, see *NFCForum-TS-NDEF_1.0*.| **Example** @@ -609,16 +610,16 @@ Creates an NDEF record based on application-specific data. **Parameters** -| Name | Type | Mandatory| Description | -| -------- | ----------------------- | ---- | -------------------------------------- | -| domainName | string | Yes | Bundle name of the application or domain name of the organization that releases the applications.| -| type | string | Yes | Type of the application data.| -| externalData | number[] | Yes | Application data, which consists of hexadecimal numbers ranging from **0x00** to **0xFF**.| +| Name | Type | Mandatory | Description | +| ------------ | -------- | ---- | ----------------------------------- | +| domainName | string | Yes | Bundle name of the application or domain name of the organization that releases the applications. | +| type | string | Yes | Type of the application data. | +| externalData | number[] | Yes | Application data, which consists of hexadecimal numbers ranging from **0x00** to **0xFF**.| **Return value** -| **Type**| **Description** | -| ------------------ | --------------------------| +| **Type** | **Description** | +| -------------------------- | ---------------------------------------- | | [NdefRecord](#ndefrecord9) | NDEF record created. For details, see *NFCForum-TS-NDEF_1.0*.| **Example** @@ -652,14 +653,14 @@ Converts an NDEF message to bytes. **Parameters** -| Name | Type | Mandatory| Description | -| -------- | ----------------------- | ---- | -------------------------------------- | -| ndefMessage | [NdefMessage](js-apis-nfctech.md#ndefmessage9) | Yes | NDEF message to convert.| +| Name | Type | Mandatory | Description | +| ----------- | ---------------------------------------- | ---- | ----------- | +| ndefMessage | [NdefMessage](js-apis-nfctech.md#ndefmessage9) | Yes | NDEF message to convert.| **Return value** -| **Type**| **Description** | -| ------------------ | --------------------------| +| **Type** | **Description** | +| -------- | ---------------------------------------- | | number[] | NDEF message in bytes, which consists of hexadecimal numbers ranging from **0x00** to **0xFF**.| **Example** @@ -693,14 +694,14 @@ Creates an NDEF message from raw byte data. The data must comply with the NDEF r **Parameters** -| **Name**| **Type**| **Mandatory**| **Description**| -| -------- | -------- | -------- | -------- | -| data | number[] | Yes| Raw byte data, which consists of hexadecimal numbers ranging from **0x00** to **0xFF**. The data must comply with the NDEF record format.| +| **Name**| **Type** | **Mandatory**| **Description** | +| ------- | -------- | ------ | ---------------------------------------- | +| data | number[] | Yes | Raw byte data, which consists of hexadecimal numbers ranging from **0x00** to **0xFF**. The data must comply with the NDEF record format.| **Return value** -| **Type**| **Description** | -| ------------------ | --------------------------| +| **Type** | **Description** | +| ---------------------------------------- | ---------------------------------------- | | [NdefMessage](js-apis-nfctech.md#ndefmessage9) | NDEF message created. For details, see *NFCForum-TS-NDEF_1.0*.| **Example** @@ -727,14 +728,14 @@ Creates an NDEF message from the NDEF records list. **Parameters** -| **Name**| **Type**| **Mandatory**| **Description**| -| -------- | -------- | -------- | -------- | -| ndefRecords | [NdefRecord](js-apis-nfcTag.md#ndefrecord9)[] | Yes| NDEF record list used to create the NDEF message. For details, see *NFCForum-TS-NDEF_1.0*.| +| **Name** | **Type** | **Mandatory**| **Description** | +| ----------- | ---------------------------------------- | ------ | ---------------------------------------- | +| ndefRecords | [NdefRecord](js-apis-nfcTag.md#ndefrecord9)[] | Yes | NDEF record list used to create the NDEF message. For details, see *NFCForum-TS-NDEF_1.0*.| **Return value** -| **Type**| **Description** | -| ------------------ | --------------------------| +| **Type** | **Description** | +| ---------------------------------------- | ---------------------------------------- | | [NdefMessage](js-apis-nfctech.md#ndefmessage9) | NDEF message created. For details, see *NFCForum-TS-NDEF_1.0*.| **Example** @@ -762,66 +763,66 @@ Defines the **TagInfo** object, which provides information about the tag technol **Required permissions**: ohos.permission.NFC_TAG -| **Name**| **Type**| **Readable**| **Writable**| **Description**| -| -------- | -------- | -------- | -------- | -------- | -| uid9+ | number[] | Yes| No| Tag unique identifier (UID), which consists of hexadecimal numbers ranging from **0x00** to **0xFF**.| -| technology9+ | number[] | Yes| No| Supported technologies. Each number is a constant indicating the supported technology.| -| supportedProfiles | number[] | Yes| No| Supported profiles. This parameter is not supported since API version 9. Use [tag.TagInfo#technology](#tagtaginfo) instead.| -| extrasData9+ | [PacMap](js-apis-inner-ability-dataAbilityHelper.md#pacmap)[] | Yes| No| Extended attribute value of the tag technology.
**System API**: This is a system API.| -| tagRfDiscId9+ | number | Yes| No| ID allocated when the tag is discovered.
**System API**: This is a system API.| -| remoteTagService9+ | [rpc.RemoteObject](js-apis-rpc.md#remoteobject) | Yes| No| Remote object of the NFC service process used for interface communication between the client and the service.
**System API**: This is a system API.| +| **Name** | **Type** | **Readable**| **Writable**| **Description** | +| ----------------------------- | ---------------------------------------- | ------ | ------ | ---------------------------------------- | +| uid9+ | number[] | Yes | No | Tag unique identifier (UID), which consists of hexadecimal numbers ranging from **0x00** to **0xFF**. | +| technology9+ | number[] | Yes | No | Supported technologies. Each number is a constant indicating the supported technology. | +| supportedProfiles | number[] | Yes | No | Supported profiles. This parameter is not supported since API version 9. Use [tag.TagInfo#technology](#tagtaginfo) instead.| +| extrasData9+ | [PacMap](js-apis-inner-ability-dataAbilityHelper.md#pacmap)[] | Yes | No | Extended attribute value of the tag technology.
**System API**: This is a system API. | +| tagRfDiscId9+ | number | Yes | No | ID allocated when the tag is discovered.
**System API**: This is a system API. | +| remoteTagService9+ | [rpc.RemoteObject](js-apis-rpc.md#remoteobject) | Yes | No | Remote object of the NFC service process used for interface communication between the client and the service.
**System API**: This is a system API.| ## NdefRecord9+ Defines an NDEF record. For details, see *NFCForum-TS-NDEF_1.0*. **System capability**: SystemCapability.Communication.NFC.Tag -| **Name**| **Type**| **Readable**| **Writable**| **Description**| -| -------- | -------- | -------- | -------- | -------- | -| tnf | number | Yes| No| Type name field (TNF) of the NDEF record.| -| rtdType| number[] | Yes| No| Record type definition (RTD) of the NDEF record. It consists of hexadecimal numbers ranging from **0x00** to **0xFF**.| -| id | number[] | Yes| No| NDEF record ID, which consists of hexadecimal numbers ranging from **0x00** to **0xFF**.| -| payload | number[] | Yes| No| NDEF payload, which consists of hexadecimal numbers ranging from **0x00** to **0xFF**.| +| **Name** | **Type** | **Readable**| **Writable**| **Description** | +| ------- | -------- | ------ | ------ | ---------------------------------------- | +| tnf | number | Yes | No | Type name field (TNF) of the NDEF record. | +| rtdType | number[] | Yes | No | Record type definition (RTD) of the NDEF record. It consists of hexadecimal numbers ranging from **0x00** to **0xFF**.| +| id | number[] | Yes | No | NDEF record ID, which consists of hexadecimal numbers ranging from **0x00** to **0xFF**.| +| payload | number[] | Yes | No | NDEF payload, which consists of hexadecimal numbers ranging from **0x00** to **0xFF**.| ## Technology Type Definition Enumerates the tag technology types. **System capability**: SystemCapability.Communication.NFC.Tag -| **Name**| **Value**| **Description**| -| -------- | -------- | -------- | -| NFC_A | 1 | NFC-A (ISO 14443-3A).| +| **Name** | **Value**| **Description** | +| ---------------------------- | ----- | ------------------------ | +| NFC_A | 1 | NFC-A (ISO 14443-3A). | | NFC_B | 2 | NFC-B (ISO 14443-3B).| -| ISO_DEP | 3 | ISO-DEP (ISO 14443-4).| -| NFC_F | 4 | NFC-F (JIS 6319-4).| -| NFC_V | 5 | NFC-V (ISO 15693).| -| NDEF | 6 | NDEF.| -| NDEF_FORMATABLE9+ | 7 | NDEF formattable.| -| MIFARE_CLASSIC | 8 | MIFARE Classic.| -| MIFARE_ULTRALIGHT | 9 | MIFARE Ultralight.| +| ISO_DEP | 3 | ISO-DEP (ISO 14443-4).| +| NFC_F | 4 | NFC-F (JIS 6319-4). | +| NFC_V | 5 | NFC-V (ISO 15693). | +| NDEF | 6 | NDEF. | +| NDEF_FORMATABLE9+ | 7 | NDEF formattable. | +| MIFARE_CLASSIC | 8 | MIFARE Classic. | +| MIFARE_ULTRALIGHT | 9 | MIFARE Ultralight. | ## TnfType9+ Enumerates the TNF types. For details, see *NFCForum-TS-NDEF_1.0*. **System capability**: SystemCapability.Communication.NFC.Tag -| **Name**| **Value**| **Description**| -| -------- | -------- | -------- | -| TNF_EMPTY | 0x0 | Empty.| -| TNF_WELL_KNOWN | 0x1 | NFC Forum Well Known Type [NFC RTD].| -| TNF_MEDIA | 0x2 | Media-type as defined in RFC 2046 [RFC 2046].| -| TNF_ABSOLUTE_URI | 0x3 | Absolute URI as defined in RFC 3986 [RFC 3986].| -| TNF_EXT_APP | 0x4 | NFC Forum external type [NFC RTD].| -| TNF_UNKNOWN | 0x5 | Unknown.| -| TNF_UNCHANGED | 0x6 | Unchanged (see section 2.3.3 in *NFCForum-TS-NDEF_1.0*).| +| **Name** | **Value**| **Description** | +| ---------------- | ----- | ---------------------------------------- | +| TNF_EMPTY | 0x0 | Empty. | +| TNF_WELL_KNOWN | 0x1 | NFC Forum Well Known Type [NFC RTD]. | +| TNF_MEDIA | 0x2 | Media-type as defined in RFC 2046 [RFC 2046].| +| TNF_ABSOLUTE_URI | 0x3 | Absolute URI as defined in RFC 3986 [RFC 3986].| +| TNF_EXT_APP | 0x4 | NFC Forum external type [NFC RTD]. | +| TNF_UNKNOWN | 0x5 | Unknown. | +| TNF_UNCHANGED | 0x6 | Unchanged (see section 2.3.3 in *NFCForum-TS-NDEF_1.0*). | ## NDEF Record RTD Enumerates the NDEF record types. For details about the RTD, see *NFCForum-TS-NDEF_1.0*. **System capability**: SystemCapability.Communication.NFC.Tag -| **Name**| **Value**| **Description**| -| -------- | -------- | -------- | -| RTD_TEXT9+ | [0x54] | NDEF record of the text type.| +| **Name** | **Value** | **Description** | +| --------------------- | ------ | ------------------ | +| RTD_TEXT9+ | [0x54] | NDEF record of the text type. | | RTD_URI9+ | [0x55] | NDEF record of the URI type.| ## NfcForumType9+ @@ -829,46 +830,47 @@ Enumerates the NFC Forum tag types. **System capability**: SystemCapability.Communication.NFC.Tag -| **Name**| **Value**| **Description**| -| -------- | -------- | -------- | -| NFC_FORUM_TYPE_1 | 1 | NFC Forum tag type 1.| -| NFC_FORUM_TYPE_2 | 2 | NFC Forum tag type 2.| -| NFC_FORUM_TYPE_3 | 3 | NFC Forum tag type 3.| -| NFC_FORUM_TYPE_4 | 4 | NFC Forum tag type 4.| -| MIFARE_CLASSIC | 101 | MIFARE Classic.| +| **Name** | **Value**| **Description** | +| ---------------- | ----- | ----------------- | +| NFC_FORUM_TYPE_1 | 1 | NFC Forum tag type 1. | +| NFC_FORUM_TYPE_2 | 2 | NFC Forum tag type 2. | +| NFC_FORUM_TYPE_3 | 3 | NFC Forum tag type 3. | +| NFC_FORUM_TYPE_4 | 4 | NFC Forum tag type 4. | +| MIFARE_CLASSIC | 101 | MIFARE Classic.| ## MifareClassicType9+ Enumerates the MIFARE Classic tag types. **System capability**: SystemCapability.Communication.NFC.Tag -| **Name**| **Value**| **Description**| -| -------- | -------- | -------- | -| TYPE_UNKNOWN | 0 | Unknown type.| -| TYPE_CLASSIC | 1 | MIFARE Classic.| -| TYPE_PLUS | 2 | MIFARE Plus.| -| TYPE_PRO | 3 | MIFARE Pro.| +| **Name** | **Value**| **Description** | +| ------------ | ----- | ----------------- | +| TYPE_UNKNOWN | 0 | Unknown type. | +| TYPE_CLASSIC | 1 | MIFARE Classic.| +| TYPE_PLUS | 2 | MIFARE Plus. | +| TYPE_PRO | 3 | MIFARE Pro. | ## MifareClassicSize9+ Enumerates the sizes of a MIFARE Classic tag. **System capability**: SystemCapability.Communication.NFC.Tag -| **Name**| **Value**| **Description**| -| -------- | -------- | -------- | -| MC_SIZE_MINI | 320 | Each tag has 5 sectors, and each sector has 4 blocks.| -| MC_SIZE_1K | 1024 | Each tag has 16 sectors, and each sector has 4 blocks.| -| MC_SIZE_2K | 2048 | Each tag has 32 sectors, and each sector has 4 blocks.| -| MC_SIZE_4K | 4096 | Each tag has 40 sectors, and each sector has 4 blocks.| +| **Name** | **Value**| **Description** | +| ------------ | ----- | ------------------ | +| MC_SIZE_MINI | 320 | Each tag has 5 sectors, and each sector has 4 blocks. | +| MC_SIZE_1K | 1024 | Each tag has 16 sectors, and each sector has 4 blocks.| +| MC_SIZE_2K | 2048 | Each tag has 32 sectors, and each sector has 4 blocks.| +| MC_SIZE_4K | 4096 | Each tag has 40 sectors, and each sector has 4 blocks.| ## MifareUltralightType9+ Enumerates the MIFARE Ultralight tag types. **System capability**: SystemCapability.Communication.NFC.Tag -| **Name**| **Value**| **Description**| -| -------- | -------- | -------- | -| TYPE_UNKNOWN | 0 | Unknown type.| -| TYPE_ULTRALIGHT | 1 | MIFARE Ultralight.| -| TYPE_ULTRALIGHT_C | 2 | MIFARE Ultralight C.| +| **Name** | **Value**| **Description** | +| ----------------- | ----- | ---------------------- | +| TYPE_UNKNOWN | 0 | Unknown type. | +| TYPE_ULTRALIGHT | 1 | MIFARE Ultralight. | +| TYPE_ULTRALIGHT_C | 2 | MIFARE Ultralight C.| + \ No newline at end of file