未验证 提交 1135c558 编写于 作者: O openharmony_ci 提交者: Gitee

!12672 Fix the nfc new syscap for docs.

Merge pull request !12672 from 张秀平/master
......@@ -16,7 +16,7 @@ import cardEmulation from '@ohos.nfc.cardEmulation';
定义不同的NFC卡模拟类型。
**系统能力:** SystemCapability.Communication.NFC.Core
**系统能力:** SystemCapability.Communication.NFC.CardEmulation
| 名称 | 值 | 说明 |
| -------- | -------- | -------- |
......@@ -24,13 +24,24 @@ import cardEmulation from '@ohos.nfc.cardEmulation';
| UICC | 1 | SIM 卡模拟。 |
| ESE | 2 | ESE卡模拟。 |
## CardType
定义卡模拟应用是支付类型,还是非支付类型。
**系统能力:** SystemCapability.Communication.NFC.CardEmulation
| 名称 | 值 | 说明 |
| -------- | -------- | -------- |
| PAYMENT | "payment" | 卡模拟应用是支付类型。 |
| OTHER | "other" | 卡模拟应用是非支付类型。 |
## cardEmulation.isSupported
isSupported(feature: number): boolean
是否支持某种类型的卡模拟。
**系统能力:** SystemCapability.Communication.NFC.Core
**系统能力:** SystemCapability.Communication.NFC.CardEmulation
**参数:**
......@@ -44,6 +55,27 @@ isSupported(feature: number): boolean
| -------- | -------- |
| boolean | true: 支持该类型卡模拟, false: 不支持该类型卡模拟。|
## cardEmulation.isDefaultService
isDefaultService(elementName: ElementName, type: CardType): boolean
判断指定的应用是否为默认支付应用。
**系统能力:** SystemCapability.Communication.NFC.CardEmulation
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| ------- | -------- | ---- | ----------------------- |
| elementName | [ElementName](js-apis-bundleManager-elementName.md#elementname) | 是 | 应用的描述,由包名和组件名组成。 |
| type | [CardType](#cardtype) | 是 | 应用的描述,由包名和组件名组成。 |
**返回值:**
| **类型** | **说明** |
| -------- | -------- |
| boolean | true: 是默认支付应用, false: 不是默认支付应用。|
## HceService<sup>8+</sup>
提供HCE卡模拟的实现,主要包括接收对端读卡设备的APDU数据,并响应APDU数据到对端读卡设备。使用HCE相关接口前,必须先判断设备是否支持HCE卡模拟能力。
......@@ -56,7 +88,7 @@ startHCE(aidList: string[]): boolean
**需要权限:** ohos.permission.NFC_CARD_EMULATION
**系统能力:** SystemCapability.Communication.NFC.Core
**系统能力:** SystemCapability.Communication.NFC.CardEmulation
**参数:**
......@@ -72,7 +104,7 @@ stopHCE(): boolean
**需要权限:** ohos.permission.NFC_CARD_EMULATION
**系统能力:** SystemCapability.Communication.NFC.Core
**系统能力:** SystemCapability.Communication.NFC.CardEmulation
### on<sup>8+</sup>
......@@ -82,7 +114,7 @@ on(type: "hceCmd", callback: AsyncCallback<number[]>): void;
**需要权限:** ohos.permission.NFC_CARD_EMULATION
**系统能力:** SystemCapability.Communication.NFC.Core
**系统能力:** SystemCapability.Communication.NFC.CardEmulation
**参数:**
......@@ -99,7 +131,7 @@ sendResponse(responseApdu: number[]): void;
**需要权限:** ohos.permission.NFC_CARD_EMULATION
**系统能力:** SystemCapability.Communication.NFC.Core
**系统能力:** SystemCapability.Communication.NFC.CardEmulation
**参数:**
......@@ -118,6 +150,13 @@ if (!isHceSupported) {
return;
}
var elementName = {
"bundleName": "com.test.cardemulation",
"abilityName": "com.test.cardemulation.MainAbility",
};
var isDefaultService = cardEmulation.isDefaultService(elementName, cardEmulation.CardType.PAYMENT);
console.log('is the app is default service for this card type: ' + isDefaultService);
// device supports HCE, transimit APDU with remote nfc reader.
var hceService = new cardEmulation.HceService();
hceService.startHCE([
......
......@@ -128,7 +128,7 @@ getNfcATag(tagInfo: [TagInfo](#taginfo)): [NfcATag](js-apis-nfctech.md#nfcatag)
**需要权限:** ohos.permission.NFC_TAG
**系统能力:** SystemCapability.Communication.NFC.Core
**系统能力:** SystemCapability.Communication.NFC.Tag
**返回值:**
......@@ -144,7 +144,7 @@ getNfcBTag(tagInfo: [TagInfo](#taginfo)): [NfcBTag](js-apis-nfctech.md#nfcbtag)
**需要权限:** ohos.permission.NFC_TAG
**系统能力:** SystemCapability.Communication.NFC.Core
**系统能力:** SystemCapability.Communication.NFC.Tag
**返回值:**
......@@ -160,7 +160,7 @@ getNfcFTag(tagInfo: [TagInfo](#taginfo)): [NfcFTag](js-apis-nfctech.md#nfcftag)
**需要权限:** ohos.permission.NFC_TAG
**系统能力:** SystemCapability.Communication.NFC.Core
**系统能力:** SystemCapability.Communication.NFC.Tag
**返回值:**
......@@ -176,7 +176,7 @@ getNfcVTag(tagInfo: [TagInfo](#taginfo)): [NfcVTag](js-apis-nfctech.md#nfcvtag)
**需要权限:** ohos.permission.NFC_TAG
**系统能力:** SystemCapability.Communication.NFC.Core
**系统能力:** SystemCapability.Communication.NFC.Tag
**返回值:**
......@@ -190,7 +190,7 @@ getIsoDep(tagInfo: [TagInfo](#taginfo)): [IsoDepTag](js-apis-nfctech.md#isoDepTa
获取IsoDep类型Tag对象,通过该对象可访问支持IsoDep技术类型的Tag。
**系统能力:** SystemCapability.Communication.NFC.Core
**系统能力:** SystemCapability.Communication.NFC.Tag
**参数:**
......@@ -218,7 +218,7 @@ getNdef(tagInfo: [TagInfo](#taginfo)): [NdefTag](js-apis-nfctech.md#ndeftag9)
获取NDEF类型Tag对象,通过该对象可访问支持NDEF技术类型的Tag。
**系统能力:** SystemCapability.Communication.NFC.Core
**系统能力:** SystemCapability.Communication.NFC.Tag
**参数:**
......@@ -246,7 +246,7 @@ getMifareClassic(tagInfo: [TagInfo](#taginfo)): [MifareClassicTag](js-apis-nfcte
获取MIFARE Classic类型Tag对象,通过该对象访问支持MIFARE Classic技术类型的Tag。
**系统能力:** SystemCapability.Communication.NFC.Core
**系统能力:** SystemCapability.Communication.NFC.Tag
**参数:**
......@@ -274,7 +274,7 @@ getMifareUltralight(tagInfo: [TagInfo](#taginfo)): [MifareUltralightTag](js-apis
获取MIFARE Ultralight类型Tag对象,通过该对象可访问支持MIFARE Ultralight技术类型的Tag。
**系统能力:** SystemCapability.Communication.NFC.Core
**系统能力:** SystemCapability.Communication.NFC.Tag
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
......@@ -301,7 +301,7 @@ getNdefFormatable(tagInfo: [TagInfo](#taginfo)): [NdefFormatableTag](js-apis-nfc
获取NDEF Formatable类型Tag对象,通过该对象可访问支持NDEF Formatable技术类型的Tag。
**系统能力:** SystemCapability.Communication.NFC.Core
**系统能力:** SystemCapability.Communication.NFC.Tag
**返回值:**
......@@ -323,7 +323,7 @@ getTagInfo(want: [Want](js-apis-app-ability-want.md#Want)): [TagInfo](#taginfo)
从Want中获取TagInfo,Want是被NFC服务初始化,包含了TagInfo所需的属性值。
**系统能力:** SystemCapability.Communication.NFC.Core
**系统能力:** SystemCapability.Communication.NFC.Tag
**参数:**
......@@ -344,7 +344,7 @@ makeUriRecord(uri: string): [NdefRecord](#ndefrecord9);
根据输入的URI,构建NDEF标签的Record数据对象。
**系统能力:** SystemCapability.Communication.NFC.Core
**系统能力:** SystemCapability.Communication.NFC.Tag
**参数:**
......@@ -383,7 +383,7 @@ makeTextRecord(text: string, locale: string): [NdefRecord](#ndefrecord9);
根据输入的文本数据和编码类型,构建NDEF标签的Record。
**系统能力:** SystemCapability.Communication.NFC.Core
**系统能力:** SystemCapability.Communication.NFC.Tag
**参数:**
......@@ -425,7 +425,7 @@ makeMimeRecord(mimeType: string, mimeData: number[]): [NdefRecord](#ndefrecord9)
根据输入的MIME数据和类型,构建NDEF标签的Record。
**系统能力:** SystemCapability.Communication.NFC.Core
**系统能力:** SystemCapability.Communication.NFC.Tag
**参数:**
......@@ -465,7 +465,7 @@ makeExternalRecord(domainName: string, type: string, externalData: number[]): [N
根据应用程序特定的外部数据,构建NDEF标签的Record。
**系统能力:** SystemCapability.Communication.NFC.Core
**系统能力:** SystemCapability.Communication.NFC.Tag
**参数:**
......@@ -508,7 +508,7 @@ messageToBytes(ndefMessage: [NdefMessage](js-apis-nfctech.md#ndefmessage9)): num
把输入的NDEF消息数据对象,转换为字节格式的数据。
**系统能力:** SystemCapability.Communication.NFC.Core
**系统能力:** SystemCapability.Communication.NFC.Tag
**参数:**
......@@ -549,7 +549,7 @@ createNdefMessage(data: number[]): [NdefMessage](js-apis-nfctech.md#ndefmessage9
使用原始字节数据创建NDEF标签的Message。该数据必须符合NDEF Record数据格式,如果不符合格式,则返回的NdeMessage数据对象,所包含的NDE Record列表会为空。
**系统能力:** SystemCapability.Communication.NFC.Core
**系统能力:** SystemCapability.Communication.NFC.Tag
**参数:**
......@@ -583,7 +583,7 @@ createNdefMessage(ndefRecords: NdefRecord[]): [NdefMessage](js-apis-nfctech.md#n
使用NDEF Records列表,创建NDEF Message。
**系统能力:** SystemCapability.Communication.NFC.Core
**系统能力:** SystemCapability.Communication.NFC.Tag
**参数:**
......@@ -618,7 +618,7 @@ try {
NFC服务在读取到标签时给出的对象,通过改对象属性,应用知道该标签支持哪些技术类型,并使用匹配的技术类型来调用相关接口。
**系统能力:** SystemCapability.Communication.NFC.Core
**系统能力:** SystemCapability.Communication.NFC.Tag
**需要权限:** ohos.permission.NFC_TAG
......@@ -633,7 +633,7 @@ NFC服务在读取到标签时给出的对象,通过改对象属性,应用
## NdefRecord<sup>9+</sup>
NDEF标签Record属性的定义,参考NDEF标签技术规范《NFCForum-TS-NDEF_1.0》的定义细节。
**系统能力:** SystemCapability.Communication.NFC.Core
**系统能力:** SystemCapability.Communication.NFC.Tag
| **名称** | **类型** | **可读** | **可写** | **说明** |
| -------- | -------- | -------- | -------- | -------- |
......@@ -645,7 +645,7 @@ NDEF标签Record属性的定义,参考NDEF标签技术规范《NFCForum-TS-NDE
## 技术类型定义
NFC Tag有多种不同的技术类型,定义常量描述不同的技术类型。
**系统能力:** SystemCapability.Communication.NFC.Core
**系统能力:** SystemCapability.Communication.NFC.Tag
| **名称** | **值** | **说明** |
| -------- | -------- | -------- |
......@@ -662,7 +662,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.Tag
| **名称** | **值** | **说明** |
| -------- | -------- | -------- |
......@@ -677,7 +677,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.Tag
| **名称** | **值** | **说明** |
| -------- | -------- | -------- |
......@@ -687,7 +687,7 @@ NDEF Record的RTD(Record Type Definition)类型值,参考NDEF标签技术规
## NfcForumType<sup>9+</sup>
NFC Forum标准里面Tag类型的定义。
**系统能力:** SystemCapability.Communication.NFC.Core
**系统能力:** SystemCapability.Communication.NFC.Tag
| **名称** | **值** | **说明** |
| -------- | -------- | -------- |
......@@ -700,7 +700,7 @@ NFC Forum标准里面Tag类型的定义。
## MifareClassicType<sup>9+</sup>
MIFARE Classic标签类型的定义。
**系统能力:** SystemCapability.Communication.NFC.Core
**系统能力:** SystemCapability.Communication.NFC.Tag
| **名称** | **值** | **说明** |
| -------- | -------- | -------- |
......@@ -712,7 +712,7 @@ MIFARE Classic标签类型的定义。
## MifareClassicSize<sup>9+</sup>
MIFARE Classic标签存储大小的定义。
**系统能力:** SystemCapability.Communication.NFC.Core
**系统能力:** SystemCapability.Communication.NFC.Tag
| **名称** | **值** | **说明** |
| -------- | -------- | -------- |
......@@ -724,7 +724,7 @@ MIFARE Classic标签存储大小的定义。
## MifareUltralightType<sup>9+</sup>
MIFARE Ultralight标签类型的定义。
**系统能力:** SystemCapability.Communication.NFC.Core
**系统能力:** SystemCapability.Communication.NFC.Tag
| **名称** | **值** | **说明** |
| -------- | -------- | -------- |
......
......@@ -28,7 +28,7 @@ getSak(): number
**需要权限:** ohos.permission.NFC_TAG
**系统能力:** SystemCapability.Communication.NFC.Core
**系统能力:** SystemCapability.Communication.NFC.Tag
**返回值:**
......@@ -54,7 +54,7 @@ getAtqa(): number[]
**需要权限:** ohos.permission.NFC_TAG
**系统能力:** SystemCapability.Communication.NFC.Core
**系统能力:** SystemCapability.Communication.NFC.Tag
**返回值:**
......@@ -88,7 +88,7 @@ getRespAppData(): number[]
**需要权限:** ohos.permission.NFC_TAG
**系统能力:** SystemCapability.Communication.NFC.Core
**系统能力:** SystemCapability.Communication.NFC.Tag
**返回值:**
......@@ -114,7 +114,7 @@ getRespProtocol(): number[]
**需要权限:** ohos.permission.NFC_TAG
**系统能力:** SystemCapability.Communication.NFC.Core
**系统能力:** SystemCapability.Communication.NFC.Tag
**返回值:**
......@@ -148,7 +148,7 @@ getSystemCode(): number[]
**需要权限:** ohos.permission.NFC_TAG
**系统能力:** SystemCapability.Communication.NFC.Core
**系统能力:** SystemCapability.Communication.NFC.Tag
**返回值:**
......@@ -174,7 +174,7 @@ getPmm(): number[]
**需要权限:** ohos.permission.NFC_TAG
**系统能力:** SystemCapability.Communication.NFC.Core
**系统能力:** SystemCapability.Communication.NFC.Tag
**返回值:**
......@@ -208,7 +208,7 @@ getResponseFlags(): number
**需要权限:** ohos.permission.NFC_TAG
**系统能力:** SystemCapability.Communication.NFC.Core
**系统能力:** SystemCapability.Communication.NFC.Tag
**返回值:**
......@@ -234,7 +234,7 @@ getDsfId(): number
**需要权限:** ohos.permission.NFC_TAG
**系统能力:** SystemCapability.Communication.NFC.Core
**系统能力:** SystemCapability.Communication.NFC.Tag
**返回值:**
......@@ -266,7 +266,7 @@ getHistoricalBytes(): number[]
获取标签的历史字节,针对基于NfcA通信技术的IsoDep卡片。
**系统能力:** SystemCapability.Communication.NFC.Core
**系统能力:** SystemCapability.Communication.NFC.Tag
**返回值:**
......@@ -290,7 +290,7 @@ getHiLayerResponse(): number[]
获取标签的更高层响应字节,针对基于NfcB通信技术的IsoDep卡片。
**系统能力:** SystemCapability.Communication.NFC.Core
**系统能力:** SystemCapability.Communication.NFC.Tag
**返回值:**
......@@ -316,7 +316,7 @@ isExtendedApduSupported(): Promise&lt;boolean&gt;
**需要权限:** ohos.permission.NFC_TAG
**系统能力:** SystemCapability.Communication.NFC.Core
**系统能力:** SystemCapability.Communication.NFC.Tag
**返回值:**
......@@ -367,7 +367,7 @@ isExtendedApduSupported(callback: AsyncCallback\<boolean>): void
**需要权限:** ohos.permission.NFC_TAG
**系统能力:** SystemCapability.Communication.NFC.Core
**系统能力:** SystemCapability.Communication.NFC.Tag
**参数:**
......@@ -419,7 +419,7 @@ getNdefRecords(): [tag.NdefRecord](js-apis-nfcTag.md#ndefrecord9)[]
获取NDEF消息中的所有记录。
**系统能力:** SystemCapability.Communication.NFC.Core
**系统能力:** SystemCapability.Communication.NFC.Tag
**返回值:**
......@@ -454,7 +454,7 @@ getNdefTagType(): [tag.NfcForumType](js-apis-nfcTag.md#nfcforumtype9)
获取NDEF标签的类型。
**系统能力:** SystemCapability.Communication.NFC.Core
**系统能力:** SystemCapability.Communication.NFC.Tag
**返回值:**
......@@ -478,7 +478,7 @@ getNdefMessage(): [NdefMessage](#ndefmessage9)
获取发现NDEF标签时,从标签读取的Message。
**系统能力:** SystemCapability.Communication.NFC.Core
**系统能力:** SystemCapability.Communication.NFC.Tag
**返回值:**
......@@ -501,7 +501,7 @@ isNdefWritable(): boolean;
检查NDEF标签是否可写。在调用写数据接口前,需要先判断是否支持写操作。
**系统能力:** SystemCapability.Communication.NFC.Core
**系统能力:** SystemCapability.Communication.NFC.Tag
**返回值:**
......@@ -527,7 +527,7 @@ readNdef(): Promise\<[NdefMessage](#ndefmessage9)>
**需要权限:** ohos.permission.NFC_TAG
**系统能力:** SystemCapability.Communication.NFC.Core
**系统能力:** SystemCapability.Communication.NFC.Tag
**返回值:**
......@@ -577,7 +577,7 @@ readNdef(callback: AsyncCallback\<[NdefMessage](#ndefmessage9)>): void
**需要权限:** ohos.permission.NFC_TAG
**系统能力:** SystemCapability.Communication.NFC.Core
**系统能力:** SystemCapability.Communication.NFC.Tag
**参数:**
......@@ -629,7 +629,7 @@ writeNdef(msg: NdefMessage): Promise\<void>;
**需要权限:** ohos.permission.NFC_TAG
**系统能力:** SystemCapability.Communication.NFC.Core
**系统能力:** SystemCapability.Communication.NFC.Tag
**参数:**
......@@ -682,7 +682,7 @@ writeNdef(msg: [NdefMessage](#ndefmessage9), callback: AsyncCallback\<void>): vo
**需要权限:** ohos.permission.NFC_TAG
**系统能力:** SystemCapability.Communication.NFC.Core
**系统能力:** SystemCapability.Communication.NFC.Tag
**参数:**
......@@ -738,7 +738,7 @@ canSetReadOnly(): boolean
**需要权限:** ohos.permission.NFC_TAG
**系统能力:** SystemCapability.Communication.NFC.Core
**系统能力:** SystemCapability.Communication.NFC.Tag
**返回值:**
......@@ -772,7 +772,7 @@ setReadOnly(): Promise\<void>
**需要权限:** ohos.permission.NFC_TAG
**系统能力:** SystemCapability.Communication.NFC.Core
**系统能力:** SystemCapability.Communication.NFC.Tag
**错误码:**
......@@ -816,7 +816,7 @@ setReadOnly(callback: AsyncCallback\<void>): void
**需要权限:** ohos.permission.NFC_TAG
**系统能力:** SystemCapability.Communication.NFC.Core
**系统能力:** SystemCapability.Communication.NFC.Tag
**参数:**
......@@ -866,7 +866,7 @@ getNdefTagTypeString(type: [tag.NfcForumType](js-apis-nfcTag.md#nfcforumtype9)):
将NFC论坛类型,转换为NFC论坛中定义的字符串描述。
**系统能力:** SystemCapability.Communication.NFC.Core
**系统能力:** SystemCapability.Communication.NFC.Tag
**参数:**
......@@ -911,7 +911,7 @@ authenticateSector(sectorIndex: number, key: number[], isKeyA: boolean): Promise
**需要权限:** ohos.permission.NFC_TAG
**系统能力:** SystemCapability.Communication.NFC.Core
**系统能力:** SystemCapability.Communication.NFC.Tag
**参数:**
......@@ -965,7 +965,7 @@ authenticateSector(sectorIndex: number, key: number[], isKeyA: boolean, callback
**需要权限:** ohos.permission.NFC_TAG
**系统能力:** SystemCapability.Communication.NFC.Core
**系统能力:** SystemCapability.Communication.NFC.Tag
**参数:**
......@@ -1021,7 +1021,7 @@ readSingleBlock(blockIndex: number): Promise\<number[]>
**需要权限:** ohos.permission.NFC_TAG
**系统能力:** SystemCapability.Communication.NFC.Core
**系统能力:** SystemCapability.Communication.NFC.Tag
**参数:**
......@@ -1078,7 +1078,7 @@ readSingleBlock(blockIndex: number, callback: AsyncCallback\<number[]>): void
**需要权限:** ohos.permission.NFC_TAG
**系统能力:** SystemCapability.Communication.NFC.Core
**系统能力:** SystemCapability.Communication.NFC.Tag
**参数:**
......@@ -1132,7 +1132,7 @@ writeSingleBlock(blockIndex: number, data: number[]): Promise\<void>
**需要权限:** ohos.permission.NFC_TAG
**系统能力:** SystemCapability.Communication.NFC.Core
**系统能力:** SystemCapability.Communication.NFC.Tag
**参数:**
......@@ -1186,7 +1186,7 @@ writeSingleBlock(blockIndex: number, data: number[], callback: AsyncCallback\<vo
**需要权限:** ohos.permission.NFC_TAG
**系统能力:** SystemCapability.Communication.NFC.Core
**系统能力:** SystemCapability.Communication.NFC.Tag
**参数:**
......@@ -1243,7 +1243,7 @@ incrementBlock(blockIndex: number, value: number): Promise\<void>
**需要权限:** ohos.permission.NFC_TAG
**系统能力:** SystemCapability.Communication.NFC.Core
**系统能力:** SystemCapability.Communication.NFC.Tag
**参数:**
......@@ -1296,7 +1296,7 @@ incrementBlock(blockIndex: number, value: number, callback: AsyncCallback\<void>
**需要权限:** ohos.permission.NFC_TAG
**系统能力:** SystemCapability.Communication.NFC.Core
**系统能力:** SystemCapability.Communication.NFC.Tag
**参数:**
......@@ -1352,7 +1352,7 @@ decrementBlock(blockIndex: number, value: number): Promise\<void>
**需要权限:** ohos.permission.NFC_TAG
**系统能力:** SystemCapability.Communication.NFC.Core
**系统能力:** SystemCapability.Communication.NFC.Tag
**参数:**
......@@ -1405,7 +1405,7 @@ decrementBlock(blockIndex: number, value: number, callback: AsyncCallback\<void>
**需要权限:** ohos.permission.NFC_TAG
**系统能力:** SystemCapability.Communication.NFC.Core
**系统能力:** SystemCapability.Communication.NFC.Tag
**参数:**
......@@ -1461,7 +1461,7 @@ transferToBlock(blockIndex: number): Promise\<void>
**需要权限:** ohos.permission.NFC_TAG
**系统能力:** SystemCapability.Communication.NFC.Core
**系统能力:** SystemCapability.Communication.NFC.Tag
**参数:**
......@@ -1512,7 +1512,7 @@ transferToBlock(blockIndex: number, callback: AsyncCallback\<void>): void
**需要权限:** ohos.permission.NFC_TAG
**系统能力:** SystemCapability.Communication.NFC.Core
**系统能力:** SystemCapability.Communication.NFC.Tag
**参数:**
......@@ -1566,7 +1566,7 @@ restoreFromBlock(blockIndex: number): Promise\<void>
**需要权限:** ohos.permission.NFC_TAG
**系统能力:** SystemCapability.Communication.NFC.Core
**系统能力:** SystemCapability.Communication.NFC.Tag
**参数:**
......@@ -1617,7 +1617,7 @@ restoreFromBlock(blockIndex: number, callback: AsyncCallback\<void>): void
**需要权限:** ohos.permission.NFC_TAG
**系统能力:** SystemCapability.Communication.NFC.Core
**系统能力:** SystemCapability.Communication.NFC.Tag
**参数:**
......@@ -1669,7 +1669,7 @@ getSectorCount(): number
获取MIFARE Classic标签中的扇区数。
**系统能力:** SystemCapability.Communication.NFC.Core
**系统能力:** SystemCapability.Communication.NFC.Tag
**返回值:**
......@@ -1693,7 +1693,7 @@ getBlockCountInSector(sectorIndex: number): number
获取指定扇区中的块数。
**系统能力:** SystemCapability.Communication.NFC.Core
**系统能力:** SystemCapability.Communication.NFC.Tag
**参数:**
......@@ -1729,7 +1729,7 @@ getType(): [tag.MifareClassicType](js-apis-nfcTag.md#mifareclassictype9)
获取MIFARE Classic标签的类型。
**系统能力:** SystemCapability.Communication.NFC.Core
**系统能力:** SystemCapability.Communication.NFC.Tag
**返回值:**
......@@ -1753,7 +1753,7 @@ getTagSize(): number
获取标签的存储空间大小,具体请参见[MifareClassicSize](js-apis-nfcTag.md#mifareclassicsize9)
**系统能力:** SystemCapability.Communication.NFC.Core
**系统能力:** SystemCapability.Communication.NFC.Tag
**返回值:**
......@@ -1777,7 +1777,7 @@ isEmulatedTag(): boolean
检查标签是不是被模拟的。
**系统能力:** SystemCapability.Communication.NFC.Core
**系统能力:** SystemCapability.Communication.NFC.Tag
**返回值:**
......@@ -1801,7 +1801,7 @@ getBlockIndex(sectorIndex: number): number
获取特定扇区的第一个块的序号。
**系统能力:** SystemCapability.Communication.NFC.Core
**系统能力:** SystemCapability.Communication.NFC.Tag
**参数:**
......@@ -1837,7 +1837,7 @@ getSectorIndex(blockIndex: number): number
获取包含指定块号的扇区序号。
**系统能力:** SystemCapability.Communication.NFC.Core
**系统能力:** SystemCapability.Communication.NFC.Tag
**参数:**
......@@ -1883,7 +1883,7 @@ readMultiplePages(pageIndex: number): Promise\<number[]>
**需要权限:** ohos.permission.NFC_TAG
**系统能力:** SystemCapability.Communication.NFC.Core
**系统能力:** SystemCapability.Communication.NFC.Tag
**参数:**
......@@ -1941,7 +1941,7 @@ readMultiplePages(pageIndex: number, callback: AsyncCallback\<number[]>): void
**需要权限:** ohos.permission.NFC_TAG
**系统能力:** SystemCapability.Communication.NFC.Core
**系统能力:** SystemCapability.Communication.NFC.Tag
**参数:**
......@@ -1995,7 +1995,7 @@ writeSinglePage(pageIndex: number, data: number[]): Promise\<void>
**需要权限:** ohos.permission.NFC_TAG
**系统能力:** SystemCapability.Communication.NFC.Core
**系统能力:** SystemCapability.Communication.NFC.Tag
**参数:**
......@@ -2048,7 +2048,7 @@ writeSinglePage(pageIndex: number, data: number[], callback: AsyncCallback\<void
**需要权限:** ohos.permission.NFC_TAG
**系统能力:** SystemCapability.Communication.NFC.Core
**系统能力:** SystemCapability.Communication.NFC.Tag
**参数:**
......@@ -2102,7 +2102,7 @@ getType(): [tag.MifareUltralightType](js-apis-nfcTag.md#mifareultralighttype9)
获取MIFARE Ultralight标签的类型。
**系统能力:** SystemCapability.Communication.NFC.Core
**系统能力:** SystemCapability.Communication.NFC.Tag
**返回值:**
......@@ -2136,7 +2136,7 @@ format(message: [NdefMessage](#ndefmessage9)): Promise\<void>
**需要权限:** ohos.permission.NFC_TAG
**系统能力:** SystemCapability.Communication.NFC.Core
**系统能力:** SystemCapability.Communication.NFC.Tag
**参数:**
......@@ -2190,7 +2190,7 @@ format(message: [NdefMessage](#ndefmessage9), callback: AsyncCallback\<void>): v
**需要权限:** ohos.permission.NFC_TAG
**系统能力:** SystemCapability.Communication.NFC.Core
**系统能力:** SystemCapability.Communication.NFC.Tag
**参数:**
......@@ -2245,7 +2245,7 @@ formatReadOnly(message: [NdefMessage](#ndefmessage9)): Promise\<void>
**需要权限:** ohos.permission.NFC_TAG
**系统能力:** SystemCapability.Communication.NFC.Core
**系统能力:** SystemCapability.Communication.NFC.Tag
**参数:**
......@@ -2299,7 +2299,7 @@ formatReadOnly(message: [NdefMessage](#ndefmessage9), callback: AsyncCallback\<v
**需要权限:** ohos.permission.NFC_TAG
**系统能力:** SystemCapability.Communication.NFC.Core
**系统能力:** SystemCapability.Communication.NFC.Tag
**参数:**
......
......@@ -28,7 +28,7 @@ getTagInfo(): tag.TagInfo
**需要权限:** ohos.permission.NFC_TAG
**系统能力:** SystemCapability.Communication.NFC.Core
**系统能力:** SystemCapability.Communication.NFC.Tag
**返回值:**
......@@ -56,7 +56,7 @@ connectTag(): boolean;
**需要权限:** ohos.permission.NFC_TAG
**系统能力:** SystemCapability.Communication.NFC.Core
**系统能力:** SystemCapability.Communication.NFC.Tag
**返回值:**
......@@ -84,7 +84,7 @@ reset(): void
**需要权限:** ohos.permission.NFC_TAG
**系统能力:** SystemCapability.Communication.NFC.Core
**系统能力:** SystemCapability.Communication.NFC.Tag
**示例:**
......@@ -105,7 +105,7 @@ isTagConnected(): boolean
**需要权限:** ohos.permission.NFC_TAG
**系统能力:** SystemCapability.Communication.NFC.Core
**系统能力:** SystemCapability.Communication.NFC.Tag
**返回值:**
......@@ -133,7 +133,7 @@ getMaxSendLength(): number
**需要权限:** ohos.permission.NFC_TAG
**系统能力:** SystemCapability.Communication.NFC.Core
**系统能力:** SystemCapability.Communication.NFC.Tag
**返回值:**
......@@ -160,7 +160,7 @@ getSendDataTimeout(): number
**需要权限:** ohos.permission.NFC_TAG
**系统能力:** SystemCapability.Communication.NFC.Core
**系统能力:** SystemCapability.Communication.NFC.Tag
**返回值:**
......@@ -188,7 +188,7 @@ setSendDataTimeout(timeout: number): boolean
**需要权限:** ohos.permission.NFC_TAG
**系统能力:** SystemCapability.Communication.NFC.Core
**系统能力:** SystemCapability.Communication.NFC.Tag
**参数:**
......@@ -223,7 +223,7 @@ sendData(data: number[]): Promise<number[]>
**需要权限:** ohos.permission.NFC_TAG
**系统能力:** SystemCapability.Communication.NFC.Core
**系统能力:** SystemCapability.Communication.NFC.Tag
**参数:**
......@@ -269,7 +269,7 @@ sendData(data: number[], callback: AsyncCallback<number[]>): void
**需要权限:** ohos.permission.NFC_TAG
**系统能力:** SystemCapability.Communication.NFC.Core
**系统能力:** SystemCapability.Communication.NFC.Tag
**参数:**
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册