From 324453862ce9af69f63109e54c14f38481d82447 Mon Sep 17 00:00:00 2001
From: king_he <6384784@qq.com>
Date: Thu, 26 May 2022 08:46:21 +0000
Subject: [PATCH] update
en/application-dev/reference/apis/js-apis-connectedTag.md. Signed-off-by:
king_he <6384784@qq.com>
---
.../reference/apis/js-apis-connectedTag.md | 82 +++++++++----------
1 file changed, 41 insertions(+), 41 deletions(-)
diff --git a/en/application-dev/reference/apis/js-apis-connectedTag.md b/en/application-dev/reference/apis/js-apis-connectedTag.md
index 5e76a59477..f351fb3148 100644
--- a/en/application-dev/reference/apis/js-apis-connectedTag.md
+++ b/en/application-dev/reference/apis/js-apis-connectedTag.md
@@ -1,6 +1,6 @@
# Active Tag
-> ![icon-note.gif](public_sys-resources/icon-note.gif)**NOTE**
+> **NOTE**
> 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.
@@ -22,9 +22,9 @@ Initializes the active tag chip.
**System capability**: SystemCapability.Communication.ConnectedTag
- Return value
- | **Type**| **Description**|
- | -------- | -------- |
- | boolean | Returns **true** if the initialization is successful; returns **false** otherwise.|
+ | **Type** | **Description** |
+ | -------- | -------- |
+ | boolean | Returns **true** if the initialization is successful; returns **false** otherwise. |
## connectedTag.uninit
@@ -38,9 +38,9 @@ Uninitializes the active tag resources.
**System capability**: SystemCapability.Communication.ConnectedTag
- Return value
- | **Type**| **Description**|
- | -------- | -------- |
- | boolean | Returns **true** if the operation is successful; returns **false** otherwise.|
+ | **Type** | **Description** |
+ | -------- | -------- |
+ | boolean | Returns **true** if the operation is successful; returns **false** otherwise. |
## connectedTag.readNdefTag
@@ -54,9 +54,9 @@ Reads the content of this active tag. This method uses a promise to return the r
**System capability**: SystemCapability.Communication.ConnectedTag
- Return value
- | **Type**| **Description**|
- | -------- | -------- |
- | Promise<string> | Promise used to return the content of the active tag.|
+ | **Type** | **Description** |
+ | -------- | -------- |
+ | Promise<string> | Promise used to return the content of the active tag. |
- Example
```
@@ -78,9 +78,9 @@ Reads the content of this active tag. This method uses an asynchronous callback
**System capability**: SystemCapability.Communication.ConnectedTag
- Parameters
- | **Name**| **Type**| **Mandatory**| **Description**|
- | -------- | -------- | -------- | -------- |
- | callback | AsyncCallback<string> | Yes| Callback invoked to return the active tag content obtained.|
+ | **Name** | **Type** | **Mandatory** | **Description** |
+ | -------- | -------- | -------- | -------- |
+ | callback | AsyncCallback<string> | Yes | Callback invoked to return the active tag content obtained. |
- Example
```
@@ -102,14 +102,14 @@ Writes data to this active tag. This method uses a promise to return the result.
**System capability**: SystemCapability.Communication.ConnectedTag
- Parameters
- | **Name**| **Type**| **Mandatory**| **Description**|
- | -------- | -------- | -------- | -------- |
- | data | string | Yes| Data to write. The maximum length is 1024 bytes.|
+ | **Name** | **Type** | **Mandatory** | **Description** |
+ | -------- | -------- | -------- | -------- |
+ | data | string | Yes | Data to write. The maximum length is 1024 bytes. |
- Return value
- | **Type**| **Description**|
- | -------- | -------- |
- | Promise<void> | Promise used to return the result. This method returns no value.|
+ | **Type** | **Description** |
+ | -------- | -------- |
+ | Promise<void> | Promise used to return the result. This method returns no value. |
- Example
```
@@ -136,10 +136,10 @@ Writes data to this active tag. This method uses an asynchronous callback to ret
**System capability**: SystemCapability.Communication.ConnectedTag
- Parameters
- | **Name**| **Type**| **Mandatory**| **Description**|
- | -------- | -------- | -------- | -------- |
- | data | string | Yes| Data to write. The maximum length is 1024 bytes.|
- | callback | AsyncCallback<string> | Yes| Callback invoked to return the operation result.|
+ | **Name** | **Type** | **Mandatory** | **Description** |
+ | -------- | -------- | -------- | -------- |
+ | data | string | Yes | Data to write. The maximum length is 1024 bytes. |
+ | callback | AsyncCallback<string> | Yes | Callback invoked to return the operation result. |
- Example
```
@@ -168,16 +168,16 @@ Registers the NFC field strength state events.
**System capability**: SystemCapability.Communication.ConnectedTag
- Parameters
- | **Name**| **Type**| **Mandatory**| **Description**|
- | -------- | -------- | -------- | -------- |
- | type | string | Yes| Event type. The value is **notify**.|
- | callback | Callback<number> | Yes| Callback invoked to return the field strength state.|
+ | **Name** | **Type** | **Mandatory** | **Description** |
+ | -------- | -------- | -------- | -------- |
+ | type | string | Yes | Event type. The value is **notify**. |
+ | callback | Callback<number> | Yes | Callback invoked to return the field strength state. |
- Enumerates the field strength states.
- | **Value**| **Description**|
- | -------- | -------- |
- | 0 | Field off. |
- | 1 | Field on. |
+ | **Value** | **Description** |
+ | -------- | -------- |
+ | 0 | Field off. |
+ | 1 | Field on. |
## connectedTag.off('notify')
@@ -191,10 +191,10 @@ Unregisters the NFC field strength state events.
**System capability**: SystemCapability.Communication.ConnectedTag
- Parameters
- | **Name**| **Type**| **Mandatory**| **Description**|
- | -------- | -------- | -------- | -------- |
- | type | string | Yes| Event type. The value is **notify**.|
- | callback | Callback<number> | No| Callback used to return the field strength state. If this parameter is not specified, all callbacks associated with the specified event will be unregistered.|
+ | **Name** | **Type** | **Mandatory** | **Description** |
+ | -------- | -------- | -------- | -------- |
+ | type | string | Yes | Event type. The value is **notify**. |
+ | callback | Callback<number> | No | Callback used to return the field strength state. If this parameter is not specified, all callbacks associated with the specified event will be unregistered. |
- Example
```
@@ -206,10 +206,10 @@ Unregisters the NFC field strength state events.
console.info("nfc rf receive state: " + result);
}
- // Register event
+ // Register event notification
connectedTag.on(NFC_RF_NOTIFY, recvNfcRfNotifyFunc);
- // Unregister event
+ // Unregister event notification
connectedTag.off(NFC_RF_NOTIFY, recvNfcRfNotifyFunc);
```
@@ -217,7 +217,7 @@ Unregisters the NFC field strength state events.
Enumerates the NFC states.
-| Name| Default Value| Description|
-| -------- | -------- | -------- |
-| NFC_RF_LEAVE | 0 | Field off. |
-| NFC_RF_ENTER | 1 | Field on. |
+ | Name | Default Value | Description |
+ | -------- | -------- | -------- |
+ | NFC_RF_LEAVE | 0 | Field off. |
+ | NFC_RF_ENTER | 1 | Field on. |
--
GitLab