未验证 提交 4dcf69c2 编写于 作者: O openharmony_ci 提交者: Gitee

!12198 【仅md格式规范】Fix nfc apis docs descriptions

Merge pull request !12198 from 张秀平/master
......@@ -15,7 +15,7 @@ import cardEmulation from '@ohos.nfc.cardEmulation';
定义不同的NFC卡模拟类型。
**系统能力**SystemCapability.Communication.NFC.Core
**系统能力:** SystemCapability.Communication.NFC.Core
| 名称 | 值 | 说明 |
| -------- | -------- | -------- |
......@@ -29,7 +29,7 @@ isSupported(feature: number): boolean
是否支持某种类型的卡模拟。
**系统能力**SystemCapability.Communication.NFC.Core
**系统能力:** SystemCapability.Communication.NFC.Core
**参数:**
......@@ -53,9 +53,9 @@ startHCE(aidList: string[]): boolean
启动HCE业务功能。包括设置当前应用为前台优先,动态注册AID列表。
**需要权限**ohos.permission.NFC_CARD_EMULATION
**需要权限:** ohos.permission.NFC_CARD_EMULATION
**系统能力**SystemCapability.Communication.NFC.Core
**系统能力:** SystemCapability.Communication.NFC.Core
**参数:**
......@@ -69,7 +69,7 @@ stopHCE(): boolean
停止HCE业务功能。包括退出当前应用前台优先,释放动态注册的AID列表。
**需要权限**ohos.permission.NFC_CARD_EMULATION
**需要权限:** ohos.permission.NFC_CARD_EMULATION
**系统能力:** SystemCapability.Communication.NFC.Core
......@@ -79,9 +79,9 @@ on(type: "hceCmd", callback: AsyncCallback<number[]>): void;
订阅回调,用于接收对端读卡设备发送的APDU数据。
**需要权限**ohos.permission.NFC_CARD_EMULATION
**需要权限:** ohos.permission.NFC_CARD_EMULATION
**系统能力**SystemCapability.Communication.NFC.Core
**系统能力:** SystemCapability.Communication.NFC.Core
**参数:**
......@@ -96,9 +96,9 @@ sendResponse(responseApdu: number[]): void;
发送APDU数据到对端读卡设备。
**需要权限**ohos.permission.NFC_CARD_EMULATION
**需要权限:** ohos.permission.NFC_CARD_EMULATION
**系统能力**SystemCapability.Communication.NFC.Core
**系统能力:** SystemCapability.Communication.NFC.Core
**参数:**
......
......@@ -15,7 +15,7 @@ import controller from '@ohos.nfc.controller';
定义不同的NFC状态值。
**系统能力**SystemCapability.Communication.NFC.Core
**系统能力:** SystemCapability.Communication.NFC.Core
| 名称 | 值 | 说明 |
| -------- | -------- | -------- |
......@@ -30,7 +30,7 @@ isNfcAvailable(): boolean
查询设备是否有NFC能力。
**系统能力**SystemCapability.Communication.NFC.Core
**系统能力:** SystemCapability.Communication.NFC.Core
**返回值:**
......@@ -45,9 +45,9 @@ openNfc(): boolean
打开NFC开关。
**需要权限**ohos.permission.MANAGE_SECURE_SETTINGS
**需要权限:** ohos.permission.MANAGE_SECURE_SETTINGS
**系统能力**SystemCapability.Communication.NFC.Core
**系统能力:** SystemCapability.Communication.NFC.Core
**返回值:**
......@@ -61,9 +61,9 @@ closeNfc(): boolean
关闭NFC开关。
**需要权限**ohos.permission.MANAGE_SECURE_SETTINGS
**需要权限:** ohos.permission.MANAGE_SECURE_SETTINGS
**系统能力**SystemCapability.Communication.NFC.Core
**系统能力:** SystemCapability.Communication.NFC.Core
**返回值:**
......@@ -77,7 +77,7 @@ isNfcOpen(): boolean
查询NFC是否打开。
**系统能力**SystemCapability.Communication.NFC.Core
**系统能力:** SystemCapability.Communication.NFC.Core
**返回值:**
......@@ -91,7 +91,7 @@ getNfcState(): [NfcState](#nfcstate)
查询NFC状态。
**系统能力**SystemCapability.Communication.NFC.Core
**系统能力:** SystemCapability.Communication.NFC.Core
**返回值:**
......@@ -105,7 +105,7 @@ on(type: "nfcStateChange", callback: Callback&lt;[NfcState](#nfcstate)&gt;): voi
注册NFC开关状态事件,通过Callback方式获取NFC状态的变化通知。
**系统能力**SystemCapability.Communication.NFC.Core
**系统能力:** SystemCapability.Communication.NFC.Core
**参数**
......@@ -120,7 +120,7 @@ off(type: "nfcStateChange", callback?: Callback&lt;[NfcState](#nfcstate)&gt;): v
取消NFC开关状态事件的注册,取消后NFC状态变化时,就不会再收到Callback的通知。
**系统能力**SystemCapability.Communication.NFC.Core
**系统能力:** SystemCapability.Communication.NFC.Core
**参数**
......
......@@ -125,9 +125,9 @@ getNfcATag(tagInfo: [TagInfo](#taginfo)): [NfcATag](js-apis-nfctech.md#nfcatag)
获取NFC A类型Tag对象,通过该对象可访问NfcA技术类型的Tag。
**需要权限**ohos.permission.NFC_TAG
**需要权限:** ohos.permission.NFC_TAG
**系统能力**SystemCapability.Communication.NFC.Core
**系统能力:** SystemCapability.Communication.NFC.Core
**返回值:**
......@@ -141,9 +141,9 @@ getNfcBTag(tagInfo: [TagInfo](#taginfo)): [NfcBTag](js-apis-nfctech.md#nfcbtag)
获取NFC B类型Tag对象,通过该对象可访问NfcB技术类型的Tag。
**需要权限**ohos.permission.NFC_TAG
**需要权限:** ohos.permission.NFC_TAG
**系统能力**SystemCapability.Communication.NFC.Core
**系统能力:** SystemCapability.Communication.NFC.Core
**返回值:**
......@@ -157,9 +157,9 @@ getNfcFTag(tagInfo: [TagInfo](#taginfo)): [NfcFTag](js-apis-nfctech.md#nfcftag)
获取NFC F类型Tag对象,通过该对象可访问NfcF技术类型的Tag。
**需要权限**ohos.permission.NFC_TAG
**需要权限:** ohos.permission.NFC_TAG
**系统能力**SystemCapability.Communication.NFC.Core
**系统能力:** SystemCapability.Communication.NFC.Core
**返回值:**
......@@ -173,9 +173,9 @@ getNfcVTag(tagInfo: [TagInfo](#taginfo)): [NfcVTag](js-apis-nfctech.md#nfcvtag)
获取NFC V类型Tag对象,通过该对象可访问NfcV技术类型的Tag。
**需要权限**ohos.permission.NFC_TAG
**需要权限:** ohos.permission.NFC_TAG
**系统能力**SystemCapability.Communication.NFC.Core
**系统能力:** SystemCapability.Communication.NFC.Core
**返回值:**
......@@ -189,7 +189,7 @@ getIsoDep(tagInfo: [TagInfo](#taginfo)): [IsoDepTag](js-apis-nfctech.md#isoDepTa
获取IsoDep类型Tag对象,通过该对象可访问支持IsoDep技术类型的Tag。
**系统能力**SystemCapability.Communication.NFC.Core
**系统能力:** SystemCapability.Communication.NFC.Core
**参数:**
......@@ -209,7 +209,7 @@ getIsoDep(tagInfo: [TagInfo](#taginfo)): [IsoDepTag](js-apis-nfctech.md#isoDepTa
| 错误码ID | 错误信息|
| ------- | -------|
| 3100201 | Tag running state of service is abnormal. |
| 3100201 | Tag running state is abnormal in service. |
## tag.getNdef<sup>9+</sup>
......@@ -217,7 +217,7 @@ getNdef(tagInfo: [TagInfo](#taginfo)): [NdefTag](js-apis-nfctech.md#ndeftag9)
获取NDEF类型Tag对象,通过该对象可访问支持NDEF技术类型的Tag。
**系统能力**SystemCapability.Communication.NFC.Core
**系统能力:** SystemCapability.Communication.NFC.Core
**参数:**
......@@ -237,7 +237,7 @@ getNdef(tagInfo: [TagInfo](#taginfo)): [NdefTag](js-apis-nfctech.md#ndeftag9)
| 错误码ID | 错误信息|
| ------- | -------|
| 3100201 | Tag running state of service is abnormal. |
| 3100201 | Tag running state is abnormal in service. |
## tag.getMifareClassic<sup>9+</sup>
......@@ -245,7 +245,7 @@ getMifareClassic(tagInfo: [TagInfo](#taginfo)): [MifareClassicTag](js-apis-nfcte
获取MIFARE Classic类型Tag对象,通过该对象访问支持MIFARE Classic技术类型的Tag。
**系统能力**SystemCapability.Communication.NFC.Core
**系统能力:** SystemCapability.Communication.NFC.Core
**参数:**
......@@ -265,7 +265,7 @@ getMifareClassic(tagInfo: [TagInfo](#taginfo)): [MifareClassicTag](js-apis-nfcte
| 错误码ID | 错误信息|
| ------- | -------|
| 3100201 | Tag running state of service is abnormal. |
| 3100201 | Tag running state is abnormal in service. |
## tag.getMifareUltralight<sup>9+</sup>
......@@ -273,7 +273,7 @@ getMifareUltralight(tagInfo: [TagInfo](#taginfo)): [MifareUltralightTag](js-apis
获取MIFARE Ultralight类型Tag对象,通过该对象可访问支持MIFARE Ultralight技术类型的Tag。
**系统能力**SystemCapability.Communication.NFC.Core
**系统能力:** SystemCapability.Communication.NFC.Core
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
......@@ -292,7 +292,7 @@ getMifareUltralight(tagInfo: [TagInfo](#taginfo)): [MifareUltralightTag](js-apis
| 错误码ID | 错误信息|
| ------- | -------|
| 3100201 | Tag running state of service is abnormal. |
| 3100201 | Tag running state is abnormal in service. |
## tag.getNdefFormatable<sup>9+</sup>
......@@ -300,7 +300,7 @@ getNdefFormatable(tagInfo: [TagInfo](#taginfo)): [NdefFormatableTag](js-apis-nfc
获取NDEF Formatable类型Tag对象,通过该对象可访问支持NDEF Formatable技术类型的Tag。
**系统能力**SystemCapability.Communication.NFC.Core
**系统能力:** SystemCapability.Communication.NFC.Core
**返回值:**
......@@ -314,7 +314,7 @@ getNdefFormatable(tagInfo: [TagInfo](#taginfo)): [NdefFormatableTag](js-apis-nfc
| 错误码ID | 错误信息|
| ------- | -------|
| 3100201 | Tag running state of service is abnormal. |
| 3100201 | Tag running state is abnormal in service. |
## tag.getTagInfo<sup>9+</sup>
......@@ -322,7 +322,7 @@ getTagInfo(want: [Want](js-apis-application-Want.md#Want)): [TagInfo](#taginfo)
从Want中获取TagInfo,Want是被NFC服务初始化,包含了TagInfo所需的属性值。
**系统能力**SystemCapability.Communication.NFC.Core
**系统能力:** SystemCapability.Communication.NFC.Core
**参数:**
......@@ -343,7 +343,7 @@ makeUriRecord(uri: string): [NdefRecord](#ndefrecord9);
根据输入的URI,构建NDEF标签的Record数据对象。
**系统能力**SystemCapability.Communication.NFC.Core
**系统能力:** SystemCapability.Communication.NFC.Core
**参数:**
......@@ -382,7 +382,7 @@ makeTextRecord(text: string, locale: string): [NdefRecord](#ndefrecord9);
根据输入的文本数据和编码类型,构建NDEF标签的Record。
**系统能力**SystemCapability.Communication.NFC.Core
**系统能力:** SystemCapability.Communication.NFC.Core
**参数:**
......@@ -424,7 +424,7 @@ makeMimeRecord(mimeType: string, mimeData: number[]): [NdefRecord](#ndefrecord9)
根据输入的MIME数据和类型,构建NDEF标签的Record。
**系统能力**SystemCapability.Communication.NFC.Core
**系统能力:** SystemCapability.Communication.NFC.Core
**参数:**
......@@ -464,7 +464,7 @@ makeExternalRecord(domainName: string, type: string, externalData: number[]): [N
根据应用程序特定的外部数据,构建NDEF标签的Record。
**系统能力**SystemCapability.Communication.NFC.Core
**系统能力:** SystemCapability.Communication.NFC.Core
**参数:**
......@@ -507,7 +507,7 @@ messageToBytes(ndefMessage: [NdefMessage](js-apis-nfctech.md#ndefmessage9)): num
把输入的NDEF消息数据对象,转换为字节格式的数据。
**系统能力**SystemCapability.Communication.NFC.Core
**系统能力:** SystemCapability.Communication.NFC.Core
**参数:**
......@@ -548,7 +548,7 @@ createNdefMessage(data: number[]): [NdefMessage](js-apis-nfctech.md#ndefmessage9
使用原始字节数据创建NDEF标签的Message。该数据必须符合NDEF Record数据格式,如果不符合格式,则返回的NdeMessage数据对象,所包含的NDE Record列表会为空。
**系统能力**SystemCapability.Communication.NFC.Core
**系统能力:** SystemCapability.Communication.NFC.Core
**参数:**
......@@ -582,7 +582,7 @@ createNdefMessage(ndefRecords: NdefRecord[]): [NdefMessage](js-apis-nfctech.md#n
使用NDEF Records列表,创建NDEF Message。
**系统能力**SystemCapability.Communication.NFC.Core
**系统能力:** SystemCapability.Communication.NFC.Core
**参数:**
......@@ -617,22 +617,22 @@ try {
NFC服务在读取到标签时给出的对象,通过改对象属性,应用知道该标签支持哪些技术类型,并使用匹配的技术类型来调用相关接口。
**系统能力**SystemCapability.Communication.NFC.Core
**系统能力:** SystemCapability.Communication.NFC.Core
**需要权限**ohos.permission.NFC_TAG
**需要权限:** ohos.permission.NFC_TAG
| **名称** | **类型** | **可读** | **可写** | **说明** |
| -------- | -------- | -------- | -------- | -------- |
| uid<sup>9+</sup> | number[] | 是 | 否 | 标签的uid,每个number值是十六进制表示,范围是0x00~0xFF。|
| technology<sup>9+</sup> | number[] | 是 | 否 | 支持的技术类型,每个number值表示所支持技术类型的常量值。 |
| supportedProfiles | number[] | 是 | 否 | 支持的技术类型,从API9开始不支持,使用[tag.TagInfo#technology](#taginfo)替代。|
| extrasData | [PacMap](js-apis-dataAbilityHelper.md#pacmap)[] | 是 | 否 | 此属性为系统属性,仅限内部使用。标签所支持技术的扩展属性值。|
| tagRfDiscId | number | 是 | 否 | 此属性为系统属性,仅限内部使用。标签发现时分配的ID值。|
| remoteTagService | [rpc.RemoteObject](js-apis-rpc.md#remoteobject) | 是 | 否 | 此属性为系统属性,仅限内部使用。NFC服务进程的远端对象,用于客户端和服务之间的接口通信。|
| extrasData<sup>9+</sup> | [PacMap](js-apis-dataAbilityHelper.md#pacmap)[] | 是 | 否 | 标签所支持技术的扩展属性值。<br>**系统接口:** 此接口为系统接口。|
| tagRfDiscId<sup>9+</sup> | number | 是 | 否 | 标签发现时分配的ID值。<br>**系统接口:** 此接口为系统接口。|
| remoteTagService<sup>9+</sup> | [rpc.RemoteObject](js-apis-rpc.md#remoteobject) | 是 | 否 | NFC服务进程的远端对象,用于客户端和服务之间的接口通信。<br>**系统接口:** 此接口为系统接口。|
## NdefRecord<sup>9+</sup>
NDEF标签Record属性的定义,参考NDEF标签技术规范《NFCForum-TS-NDEF_1.0》的定义细节。
**系统能力**SystemCapability.Communication.NFC.Core
**系统能力:** SystemCapability.Communication.NFC.Core
| **名称** | **类型** | **可读** | **可写** | **说明** |
| -------- | -------- | -------- | -------- | -------- |
......@@ -644,7 +644,7 @@ NDEF标签Record属性的定义,参考NDEF标签技术规范《NFCForum-TS-NDE
## 技术类型定义
NFC Tag有多种不同的技术类型,定义常量描述不同的技术类型。
**系统能力**SystemCapability.Communication.NFC.Core
**系统能力:** SystemCapability.Communication.NFC.Core
| **名称** | **值** | **说明** |
| -------- | -------- | -------- |
......@@ -661,7 +661,7 @@ NFC Tag有多种不同的技术类型,定义常量描述不同的技术类型
## TnfType<sup>9+</sup>
NDEF Record的TNF(Type Name Field)类型值,参考NDEF标签技术规范《NFCForum-TS-NDEF_1.0》的定义细节。
**系统能力**SystemCapability.Communication.NFC.Core
**系统能力:** SystemCapability.Communication.NFC.Core
| **名称** | **值** | **说明** |
| -------- | -------- | -------- |
......@@ -676,7 +676,7 @@ NDEF Record的TNF(Type Name Field)类型值,参考NDEF标签技术规范《NFC
## NDEF Record RTD类型定义
NDEF Record的RTD(Record Type Definition)类型值,参考NDEF标签技术规范《NFCForum-TS-NDEF_1.0》的定义细节。
**系统能力**SystemCapability.Communication.NFC.Core
**系统能力:** SystemCapability.Communication.NFC.Core
| **名称** | **值** | **说明** |
| -------- | -------- | -------- |
......@@ -686,7 +686,7 @@ NDEF Record的RTD(Record Type Definition)类型值,参考NDEF标签技术规
## NfcForumType<sup>9+</sup>
NFC Forum标准里面Tag类型的定义。
**系统能力**SystemCapability.Communication.NFC.Core
**系统能力:** SystemCapability.Communication.NFC.Core
| **名称** | **值** | **说明** |
| -------- | -------- | -------- |
......@@ -699,7 +699,7 @@ NFC Forum标准里面Tag类型的定义。
## MifareClassicType<sup>9+</sup>
MIFARE Classic标签类型的定义。
**系统能力**SystemCapability.Communication.NFC.Core
**系统能力:** SystemCapability.Communication.NFC.Core
| **名称** | **值** | **说明** |
| -------- | -------- | -------- |
......@@ -711,7 +711,7 @@ MIFARE Classic标签类型的定义。
## MifareClassicSize<sup>9+</sup>
MIFARE Classic标签存储大小的定义。
**系统能力**SystemCapability.Communication.NFC.Core
**系统能力:** SystemCapability.Communication.NFC.Core
| **名称** | **值** | **说明** |
| -------- | -------- | -------- |
......@@ -723,7 +723,7 @@ MIFARE Classic标签存储大小的定义。
## MifareUltralightType<sup>9+</sup>
MIFARE Ultralight标签类型的定义。
**系统能力**SystemCapability.Communication.NFC.Core
**系统能力:** SystemCapability.Communication.NFC.Core
| **名称** | **值** | **说明** |
| -------- | -------- | -------- |
......
......@@ -25,9 +25,9 @@ getSak(): number
获取NFC-A标签的SAK值。
**需要权限**ohos.permission.NFC_TAG
**需要权限:** ohos.permission.NFC_TAG
**系统能力**SystemCapability.Communication.NFC.Core
**系统能力:** SystemCapability.Communication.NFC.Core
**返回值:**
......@@ -51,9 +51,9 @@ getAtqa(): number[]
获取NFC-A标签的Atqa值。
**需要权限**ohos.permission.NFC_TAG
**需要权限:** ohos.permission.NFC_TAG
**系统能力**SystemCapability.Communication.NFC.Core
**系统能力:** SystemCapability.Communication.NFC.Core
**返回值:**
......@@ -85,9 +85,9 @@ getRespAppData(): number[]
获取标签的应用程序数据。
**需要权限**ohos.permission.NFC_TAG
**需要权限:** ohos.permission.NFC_TAG
**系统能力**SystemCapability.Communication.NFC.Core
**系统能力:** SystemCapability.Communication.NFC.Core
**返回值:**
......@@ -111,9 +111,9 @@ getRespProtocol(): number[]
获取标签的协议信息。
**需要权限**ohos.permission.NFC_TAG
**需要权限:** ohos.permission.NFC_TAG
**系统能力**SystemCapability.Communication.NFC.Core
**系统能力:** SystemCapability.Communication.NFC.Core
**返回值:**
......@@ -145,9 +145,9 @@ getSystemCode(): number[]
从标签实例获取系统代码。
**需要权限**ohos.permission.NFC_TAG
**需要权限:** ohos.permission.NFC_TAG
**系统能力**SystemCapability.Communication.NFC.Core
**系统能力:** SystemCapability.Communication.NFC.Core
**返回值:**
......@@ -171,9 +171,9 @@ getPmm(): number[]
从标签实例获取PMm(由IC代码和制造商参数组成)。
**需要权限**ohos.permission.NFC_TAG
**需要权限:** ohos.permission.NFC_TAG
**系统能力**SystemCapability.Communication.NFC.Core
**系统能力:** SystemCapability.Communication.NFC.Core
**返回值:**
......@@ -205,9 +205,9 @@ getResponseFlags(): number
从标签实例实例获取响应标志。
**需要权限**ohos.permission.NFC_TAG
**需要权限:** ohos.permission.NFC_TAG
**系统能力**SystemCapability.Communication.NFC.Core
**系统能力:** SystemCapability.Communication.NFC.Core
**返回值:**
......@@ -231,9 +231,9 @@ getDsfId(): number
从标签实例实例获取数据存储格式标识符(DSFID)。
**需要权限**ohos.permission.NFC_TAG
**需要权限:** ohos.permission.NFC_TAG
**系统能力**SystemCapability.Communication.NFC.Core
**系统能力:** SystemCapability.Communication.NFC.Core
**返回值:**
......@@ -265,7 +265,7 @@ getHistoricalBytes(): number[]
获取标签的历史字节,针对基于NfcA通信技术的IsoDep卡片。
**系统能力**SystemCapability.Communication.NFC.Core
**系统能力:** SystemCapability.Communication.NFC.Core
**返回值:**
......@@ -289,7 +289,7 @@ getHiLayerResponse(): number[]
获取标签的更高层响应字节,针对基于NfcB通信技术的IsoDep卡片。
**系统能力**SystemCapability.Communication.NFC.Core
**系统能力:** SystemCapability.Communication.NFC.Core
**返回值:**
......@@ -313,9 +313,9 @@ isExtendedApduSupported(): Promise&lt;boolean&gt;
检查是否支持扩展的APDU,使用Promise方式作为异步方法。
**需要权限**ohos.permission.NFC_TAG
**需要权限:** ohos.permission.NFC_TAG
**系统能力**SystemCapability.Communication.NFC.Core
**系统能力:** SystemCapability.Communication.NFC.Core
**返回值:**
......@@ -364,9 +364,9 @@ isExtendedApduSupported(callback: AsyncCallback\<boolean>): void
检查是否支持扩展的APDU,使用AsyncCallback方式作为异步方法。
**需要权限**ohos.permission.NFC_TAG
**需要权限:** ohos.permission.NFC_TAG
**系统能力**SystemCapability.Communication.NFC.Core
**系统能力:** SystemCapability.Communication.NFC.Core
**参数:**
......@@ -418,7 +418,7 @@ getNdefRecords(): [tag.NdefRecord](js-apis-nfcTag.md#ndefrecord9)[]
获取NDEF消息中的所有记录。
**系统能力**SystemCapability.Communication.NFC.Core
**系统能力:** SystemCapability.Communication.NFC.Core
**返回值:**
......@@ -453,7 +453,7 @@ getNdefTagType(): [tag.NfcForumType](js-apis-nfcTag.md#nfcforumtype9)
获取NDEF标签的类型。
**系统能力**SystemCapability.Communication.NFC.Core
**系统能力:** SystemCapability.Communication.NFC.Core
**返回值:**
......@@ -477,7 +477,7 @@ getNdefMessage(): [NdefMessage](#ndefmessage9)
获取发现NDEF标签时,从标签读取的Message。
**系统能力**SystemCapability.Communication.NFC.Core
**系统能力:** SystemCapability.Communication.NFC.Core
**返回值:**
......@@ -500,7 +500,7 @@ isNdefWritable(): boolean;
检查NDEF标签是否可写。在调用写数据接口前,需要先判断是否支持写操作。
**系统能力**SystemCapability.Communication.NFC.Core
**系统能力:** SystemCapability.Communication.NFC.Core
**返回值:**
......@@ -524,9 +524,9 @@ readNdef(): Promise\<[NdefMessage](#ndefmessage9)>
读取标签上的NDEF消息,使用Promise方式作为异步方法。
**需要权限**ohos.permission.NFC_TAG
**需要权限:** ohos.permission.NFC_TAG
**系统能力**SystemCapability.Communication.NFC.Core
**系统能力:** SystemCapability.Communication.NFC.Core
**返回值:**
......@@ -574,9 +574,9 @@ readNdef(callback: AsyncCallback\<[NdefMessage](#ndefmessage9)>): void
读取标签上的NDEF消息,使用AsyncCallback方式作为异步方法。
**需要权限**ohos.permission.NFC_TAG
**需要权限:** ohos.permission.NFC_TAG
**系统能力**SystemCapability.Communication.NFC.Core
**系统能力:** SystemCapability.Communication.NFC.Core
**参数:**
......@@ -626,9 +626,9 @@ writeNdef(msg: NdefMessage): Promise\<void>;
将NDEF Messsage数据对象写入标签,使用Promise方式作为异步方法。
**需要权限**ohos.permission.NFC_TAG
**需要权限:** ohos.permission.NFC_TAG
**系统能力**SystemCapability.Communication.NFC.Core
**系统能力:** SystemCapability.Communication.NFC.Core
**参数:**
......@@ -679,9 +679,9 @@ writeNdef(msg: [NdefMessage](#ndefmessage9), callback: AsyncCallback\<void>): vo
将NDEF Message数据对象写入此标签,使用AsyncCallback方式作为异步方法。
**需要权限**ohos.permission.NFC_TAG
**需要权限:** ohos.permission.NFC_TAG
**系统能力**SystemCapability.Communication.NFC.Core
**系统能力:** SystemCapability.Communication.NFC.Core
**参数:**
......@@ -735,9 +735,9 @@ canSetReadOnly(): boolean
检查NDEF标签是否可以设置为只读。
**需要权限**ohos.permission.NFC_TAG
**需要权限:** ohos.permission.NFC_TAG
**系统能力**SystemCapability.Communication.NFC.Core
**系统能力:** SystemCapability.Communication.NFC.Core
**返回值:**
......@@ -769,9 +769,9 @@ setReadOnly(): Promise\<void>
将NDEF标签设置为只读,使用Promise方式作为异步方法。
**需要权限**ohos.permission.NFC_TAG
**需要权限:** ohos.permission.NFC_TAG
**系统能力**SystemCapability.Communication.NFC.Core
**系统能力:** SystemCapability.Communication.NFC.Core
**错误码:**
......@@ -813,9 +813,9 @@ setReadOnly(callback: AsyncCallback\<void>): void
将NDEF标签设置为只读,使用AsyncCallback方式作为异步方法。
**需要权限**ohos.permission.NFC_TAG
**需要权限:** ohos.permission.NFC_TAG
**系统能力**SystemCapability.Communication.NFC.Core
**系统能力:** SystemCapability.Communication.NFC.Core
**参数:**
......@@ -865,7 +865,7 @@ getNdefTagTypeString(type: [tag.NfcForumType](js-apis-nfcTag.md#nfcforumtype9)):
将NFC论坛类型,转换为NFC论坛中定义的字符串描述。
**系统能力**SystemCapability.Communication.NFC.Core
**系统能力:** SystemCapability.Communication.NFC.Core
**参数:**
......@@ -908,9 +908,9 @@ authenticateSector(sectorIndex: number, key: number[], isKeyA: boolean): Promise
使用密钥对扇区进行身份验证,只有身份验证成功的扇区可以进行操作。使用Promise方式作为异步方法。
**需要权限**ohos.permission.NFC_TAG
**需要权限:** ohos.permission.NFC_TAG
**系统能力**SystemCapability.Communication.NFC.Core
**系统能力:** SystemCapability.Communication.NFC.Core
**参数:**
......@@ -962,9 +962,9 @@ authenticateSector(sectorIndex: number, key: number[], isKeyA: boolean, callback
使用密钥对扇区进行身份验证,只有身份验证成功的扇区可以进行操作。使用AsyncCallback方式作为异步方法。
**需要权限**ohos.permission.NFC_TAG
**需要权限:** ohos.permission.NFC_TAG
**系统能力**SystemCapability.Communication.NFC.Core
**系统能力:** SystemCapability.Communication.NFC.Core
**参数:**
......@@ -1018,9 +1018,9 @@ readSingleBlock(blockIndex: number): Promise\<number[]>
读取标签中一个块存储的内容,一个块大小为16字节。使用Promise方式作为异步方法。
**需要权限**ohos.permission.NFC_TAG
**需要权限:** ohos.permission.NFC_TAG
**系统能力**SystemCapability.Communication.NFC.Core
**系统能力:** SystemCapability.Communication.NFC.Core
**参数:**
......@@ -1075,9 +1075,9 @@ readSingleBlock(blockIndex: number, callback: AsyncCallback\<number[]>): void
读取标签中一个块存储的内容,一个块大小为16字节。使用AsyncCallback方式作为异步方法。
**需要权限**ohos.permission.NFC_TAG
**需要权限:** ohos.permission.NFC_TAG
**系统能力**SystemCapability.Communication.NFC.Core
**系统能力:** SystemCapability.Communication.NFC.Core
**参数:**
......@@ -1129,9 +1129,9 @@ writeSingleBlock(blockIndex: number, data: number[]): Promise\<void>
向标签中一个块存储写入内容,一个块大小为16字节。使用Promise方式作为异步方法。
**需要权限**ohos.permission.NFC_TAG
**需要权限:** ohos.permission.NFC_TAG
**系统能力**SystemCapability.Communication.NFC.Core
**系统能力:** SystemCapability.Communication.NFC.Core
**参数:**
......@@ -1183,9 +1183,9 @@ writeSingleBlock(blockIndex: number, data: number[], callback: AsyncCallback\<vo
向标签中一个块存储写入内容,一个块大小为16字节。使用AsyncCallback方式作为异步方法。
**需要权限**ohos.permission.NFC_TAG
**需要权限:** ohos.permission.NFC_TAG
**系统能力**SystemCapability.Communication.NFC.Core
**系统能力:** SystemCapability.Communication.NFC.Core
**参数:**
......@@ -1240,9 +1240,9 @@ incrementBlock(blockIndex: number, value: number): Promise\<void>
对指定块的内容,增加指定的数值。使用Promise方式作为异步方法。
**需要权限**ohos.permission.NFC_TAG
**需要权限:** ohos.permission.NFC_TAG
**系统能力**SystemCapability.Communication.NFC.Core
**系统能力:** SystemCapability.Communication.NFC.Core
**参数:**
......@@ -1293,9 +1293,9 @@ incrementBlock(blockIndex: number, value: number, callback: AsyncCallback\<void>
对指定块的内容,增加指定的数值。使用AsyncCallback方式作为异步方法。
**需要权限**ohos.permission.NFC_TAG
**需要权限:** ohos.permission.NFC_TAG
**系统能力**SystemCapability.Communication.NFC.Core
**系统能力:** SystemCapability.Communication.NFC.Core
**参数:**
......@@ -1349,9 +1349,9 @@ decrementBlock(blockIndex: number, value: number): Promise\<void>
对指定块的内容,减少指定的数值。使用Promise方式作为异步方法。
**需要权限**ohos.permission.NFC_TAG
**需要权限:** ohos.permission.NFC_TAG
**系统能力**SystemCapability.Communication.NFC.Core
**系统能力:** SystemCapability.Communication.NFC.Core
**参数:**
......@@ -1402,9 +1402,9 @@ decrementBlock(blockIndex: number, value: number, callback: AsyncCallback\<void>
对指定块的内容,减少指定的数值。使用AsyncCallback方式作为异步方法。
**需要权限**ohos.permission.NFC_TAG
**需要权限:** ohos.permission.NFC_TAG
**系统能力**SystemCapability.Communication.NFC.Core
**系统能力:** SystemCapability.Communication.NFC.Core
**参数:**
......@@ -1458,9 +1458,9 @@ transferToBlock(blockIndex: number): Promise\<void>
将临时寄存器的值转移到指定的块。使用Promise方式作为异步方法。
**需要权限**ohos.permission.NFC_TAG
**需要权限:** ohos.permission.NFC_TAG
**系统能力**SystemCapability.Communication.NFC.Core
**系统能力:** SystemCapability.Communication.NFC.Core
**参数:**
......@@ -1509,9 +1509,9 @@ transferToBlock(blockIndex: number, callback: AsyncCallback\<void>): void
将临时寄存器的值转移到指定的块。使用AsyncCallback方式作为异步方法。
**需要权限**ohos.permission.NFC_TAG
**需要权限:** ohos.permission.NFC_TAG
**系统能力**SystemCapability.Communication.NFC.Core
**系统能力:** SystemCapability.Communication.NFC.Core
**参数:**
......@@ -1563,9 +1563,9 @@ restoreFromBlock(blockIndex: number): Promise\<void>
将指定块的值复制到临时寄存器。使用Promise方式作为异步方法。
**需要权限**ohos.permission.NFC_TAG
**需要权限:** ohos.permission.NFC_TAG
**系统能力**SystemCapability.Communication.NFC.Core
**系统能力:** SystemCapability.Communication.NFC.Core
**参数:**
......@@ -1614,9 +1614,9 @@ restoreFromBlock(blockIndex: number, callback: AsyncCallback\<void>): void
将指定块的值复制到临时寄存器。使用AsyncCallback方式作为异步方法。
**需要权限**ohos.permission.NFC_TAG
**需要权限:** ohos.permission.NFC_TAG
**系统能力**SystemCapability.Communication.NFC.Core
**系统能力:** SystemCapability.Communication.NFC.Core
**参数:**
......@@ -1668,7 +1668,7 @@ getSectorCount(): number
获取MIFARE Classic标签中的扇区数。
**系统能力**SystemCapability.Communication.NFC.Core
**系统能力:** SystemCapability.Communication.NFC.Core
**返回值:**
......@@ -1692,7 +1692,7 @@ getBlockCountInSector(sectorIndex: number): number
获取指定扇区中的块数。
**系统能力**SystemCapability.Communication.NFC.Core
**系统能力:** SystemCapability.Communication.NFC.Core
**参数:**
......@@ -1728,7 +1728,7 @@ getType(): [tag.MifareClassicType](js-apis-nfcTag.md#mifareclassictype9)
获取MIFARE Classic标签的类型。
**系统能力**SystemCapability.Communication.NFC.Core
**系统能力:** SystemCapability.Communication.NFC.Core
**返回值:**
......@@ -1752,7 +1752,7 @@ getTagSize(): number
获取标签的存储空间大小,具体请参见[MifareClassicSize](js-apis-nfcTag.md#mifareclassicsize9)
**系统能力**SystemCapability.Communication.NFC.Core
**系统能力:** SystemCapability.Communication.NFC.Core
**返回值:**
......@@ -1776,7 +1776,7 @@ isEmulatedTag(): boolean
检查标签是不是被模拟的。
**系统能力**SystemCapability.Communication.NFC.Core
**系统能力:** SystemCapability.Communication.NFC.Core
**返回值:**
......@@ -1800,7 +1800,7 @@ getBlockIndex(sectorIndex: number): number
获取特定扇区的第一个块的序号。
**系统能力**SystemCapability.Communication.NFC.Core
**系统能力:** SystemCapability.Communication.NFC.Core
**参数:**
......@@ -1836,7 +1836,7 @@ getSectorIndex(blockIndex: number): number
获取包含指定块号的扇区序号。
**系统能力**SystemCapability.Communication.NFC.Core
**系统能力:** SystemCapability.Communication.NFC.Core
**参数:**
......@@ -1880,9 +1880,9 @@ readMultiplePages(pageIndex: number): Promise\<number[]>
读取标签的4页数据,共16字节的数据。每个页面数据大小为4字节。使用Promise方式作为异步方法。
**需要权限**ohos.permission.NFC_TAG
**需要权限:** ohos.permission.NFC_TAG
**系统能力**SystemCapability.Communication.NFC.Core
**系统能力:** SystemCapability.Communication.NFC.Core
**参数:**
......@@ -1938,9 +1938,9 @@ readMultiplePages(pageIndex: number, callback: AsyncCallback\<number[]>): void
读取标签的4页数据,共16字节的数据。每个页面数据大小为4字节。使用AsyncCallback方式作为异步方法。
**需要权限**ohos.permission.NFC_TAG
**需要权限:** ohos.permission.NFC_TAG
**系统能力**SystemCapability.Communication.NFC.Core
**系统能力:** SystemCapability.Communication.NFC.Core
**参数:**
......@@ -1992,9 +1992,9 @@ writeSinglePage(pageIndex: number, data: number[]): Promise\<void>
写入一页数据,数据大小为4字节。使用Promise方式作为异步方法。
**需要权限**ohos.permission.NFC_TAG
**需要权限:** ohos.permission.NFC_TAG
**系统能力**SystemCapability.Communication.NFC.Core
**系统能力:** SystemCapability.Communication.NFC.Core
**参数:**
......@@ -2045,9 +2045,9 @@ writeSinglePage(pageIndex: number, data: number[], callback: AsyncCallback\<void
写入一页数据,数据大小为4字节。使用AsyncCallback方式作为异步方法。
**需要权限**ohos.permission.NFC_TAG
**需要权限:** ohos.permission.NFC_TAG
**系统能力**SystemCapability.Communication.NFC.Core
**系统能力:** SystemCapability.Communication.NFC.Core
**参数:**
......@@ -2101,7 +2101,7 @@ getType(): [tag.MifareUltralightType](js-apis-nfcTag.md#mifareultralighttype9)
获取MIFARE Ultralight标签的类型。
**系统能力**SystemCapability.Communication.NFC.Core
**系统能力:** SystemCapability.Communication.NFC.Core
**返回值:**
......@@ -2133,9 +2133,9 @@ format(message: [NdefMessage](#ndefmessage9)): Promise\<void>
将标签格式化为NDEF标签,将NDEF消息写入NDEF标签。使用Promise方式作为异步方法。
**需要权限**ohos.permission.NFC_TAG
**需要权限:** ohos.permission.NFC_TAG
**系统能力**SystemCapability.Communication.NFC.Core
**系统能力:** SystemCapability.Communication.NFC.Core
**参数:**
......@@ -2187,9 +2187,9 @@ format(message: [NdefMessage](#ndefmessage9), callback: AsyncCallback\<void>): v
将标签格式化为NDEF标签,然后将NDEF消息写入NDEF标签。使用AsyncCallback方式作为异步方法。
**需要权限**ohos.permission.NFC_TAG
**需要权限:** ohos.permission.NFC_TAG
**系统能力**SystemCapability.Communication.NFC.Core
**系统能力:** SystemCapability.Communication.NFC.Core
**参数:**
......@@ -2242,9 +2242,9 @@ formatReadOnly(message: [NdefMessage](#ndefmessage9)): Promise\<void>
将标签格式化为NDEF标签,将NDEF消息写入NDEF标签,之后将标签设置为只读。使用Promise方式作为异步方法。
**需要权限**ohos.permission.NFC_TAG
**需要权限:** ohos.permission.NFC_TAG
**系统能力**SystemCapability.Communication.NFC.Core
**系统能力:** SystemCapability.Communication.NFC.Core
**参数:**
......@@ -2296,9 +2296,9 @@ formatReadOnly(message: [NdefMessage](#ndefmessage9), callback: AsyncCallback\<v
将标签格式化为NDEF标签,然后将NDEF消息写入NDEF标签,之后将标签设置为只读。使用callback方式作为异步方法。
**需要权限**ohos.permission.NFC_TAG
**需要权限:** ohos.permission.NFC_TAG
**系统能力**SystemCapability.Communication.NFC.Core
**系统能力:** SystemCapability.Communication.NFC.Core
**参数:**
......
......@@ -25,9 +25,9 @@ getTagInfo(): tag.TagInfo
获取该Tag被分发时,NFC服务所提供的Tag数据对象。
**需要权限**ohos.permission.NFC_TAG
**需要权限:** ohos.permission.NFC_TAG
**系统能力**SystemCapability.Communication.NFC.Core
**系统能力:** SystemCapability.Communication.NFC.Core
**返回值:**
......@@ -53,9 +53,9 @@ connectTag(): boolean;
和标签建立连接。在从标签读取数据或将数据写入标签之前,必须调用此方法。
**需要权限**ohos.permission.NFC_TAG
**需要权限:** ohos.permission.NFC_TAG
**系统能力**SystemCapability.Communication.NFC.Core
**系统能力:** SystemCapability.Communication.NFC.Core
**返回值:**
......@@ -81,9 +81,9 @@ reset(): void
重置与标签的连接。
**需要权限**ohos.permission.NFC_TAG
**需要权限:** ohos.permission.NFC_TAG
**系统能力**SystemCapability.Communication.NFC.Core
**系统能力:** SystemCapability.Communication.NFC.Core
**示例:**
......@@ -102,9 +102,9 @@ isTagConnected(): boolean
检查是否已与标签建立连接。
**需要权限**ohos.permission.NFC_TAG
**需要权限:** ohos.permission.NFC_TAG
**系统能力**SystemCapability.Communication.NFC.Core
**系统能力:** SystemCapability.Communication.NFC.Core
**返回值:**
......@@ -130,9 +130,9 @@ getMaxSendLength(): number
查询可以发送到标签的最大数据长度。
**需要权限**ohos.permission.NFC_TAG
**需要权限:** ohos.permission.NFC_TAG
**系统能力**SystemCapability.Communication.NFC.Core
**系统能力:** SystemCapability.Communication.NFC.Core
**返回值:**
......@@ -157,9 +157,9 @@ getSendDataTimeout(): number
查询发送数据到Tag的等待超时时间,单位是毫秒。
**需要权限**ohos.permission.NFC_TAG
**需要权限:** ohos.permission.NFC_TAG
**系统能力**SystemCapability.Communication.NFC.Core
**系统能力:** SystemCapability.Communication.NFC.Core
**返回值:**
......@@ -185,9 +185,9 @@ setSendDataTimeout(timeout: number): boolean
查询发送数据到Tag的等待超时时间,单位是毫秒。
**需要权限**ohos.permission.NFC_TAG
**需要权限:** ohos.permission.NFC_TAG
**系统能力**SystemCapability.Communication.NFC.Core
**系统能力:** SystemCapability.Communication.NFC.Core
**参数:**
......@@ -220,9 +220,9 @@ sendData(data: number[]): Promise<number[]>
发送指令到Tag上,使用Promise方式作为异步方法。
**需要权限**ohos.permission.NFC_TAG
**需要权限:** ohos.permission.NFC_TAG
**系统能力**SystemCapability.Communication.NFC.Core
**系统能力:** SystemCapability.Communication.NFC.Core
**参数:**
......@@ -266,9 +266,9 @@ sendData(data: number[], callback: AsyncCallback<number[]>): void
发送指令到Tag上,使用AsyncCallback方式作为异步方法。
**需要权限**ohos.permission.NFC_TAG
**需要权限:** ohos.permission.NFC_TAG
**系统能力**SystemCapability.Communication.NFC.Core
**系统能力:** SystemCapability.Communication.NFC.Core
**参数:**
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册