Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Docs
提交
ca23e244
D
Docs
项目概览
OpenHarmony
/
Docs
大约 2 年 前同步成功
通知
161
Star
293
Fork
28
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
Docs
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
ca23e244
编写于
5月 25, 2023
作者:
H
HelloCrease
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update docs
Signed-off-by:
N
HelloCrease
<
lian15@huawei.com
>
上级
7a07062e
变更
2
展开全部
显示空白变更内容
内联
并排
Showing
2 changed file
with
200 addition
and
202 deletion
+200
-202
zh-cn/application-dev/reference/apis/js-apis-cardEmulation.md
...n/application-dev/reference/apis/js-apis-cardEmulation.md
+24
-26
zh-cn/application-dev/reference/apis/js-apis-nfcTag.md
zh-cn/application-dev/reference/apis/js-apis-nfcTag.md
+176
-176
未找到文件。
zh-cn/application-dev/reference/apis/js-apis-cardEmulation.md
浏览文件 @
ca23e244
...
@@ -22,7 +22,7 @@ import cardEmulation from '@ohos.nfc.cardEmulation';
...
@@ -22,7 +22,7 @@ import cardEmulation from '@ohos.nfc.cardEmulation';
**系统能力:**
SystemCapability.Communication.NFC.CardEmulation
**系统能力:**
SystemCapability.Communication.NFC.CardEmulation
| 名称 | 值 | 说明 |
| 名称 | 值 | 说明 |
| ----
---- | ----
---- | -------- |
| ----
|
---- | -------- |
| HCE | 0 | HCE 卡模拟。 |
| HCE | 0 | HCE 卡模拟。 |
| UICC | 1 | SIM 卡模拟。 |
| UICC | 1 | SIM 卡模拟。 |
| ESE | 2 | ESE卡模拟。 |
| ESE | 2 | ESE卡模拟。 |
...
@@ -34,7 +34,7 @@ import cardEmulation from '@ohos.nfc.cardEmulation';
...
@@ -34,7 +34,7 @@ import cardEmulation from '@ohos.nfc.cardEmulation';
**系统能力:**
SystemCapability.Communication.NFC.CardEmulation
**系统能力:**
SystemCapability.Communication.NFC.CardEmulation
| 名称 | 值 | 说明 |
| 名称 | 值 | 说明 |
| -------
- | -------- |
-------- |
| -------
| --------- | ---------
-------- |
| PAYMENT | "payment" | 卡模拟应用所使用的业务是支付类型。 |
| PAYMENT | "payment" | 卡模拟应用所使用的业务是支付类型。 |
| OTHER | "other" | 卡模拟应用所使用的业务是其他类型。 |
| OTHER | "other" | 卡模拟应用所使用的业务是其他类型。 |
...
@@ -52,14 +52,14 @@ isSupported(feature: number): boolean
...
@@ -52,14 +52,14 @@ isSupported(feature: number): boolean
**参数:**
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| 参数名 | 类型 | 必填 | 说明 |
| ------- | ------
-- | ---- |
----------------------- |
| ------- | ------
| ---- | -----------------
----------------------- |
| feature | number | 是 | 卡模拟类型值,详细请见
[
FeatureType
](
#featuretype
)
枚举值。 |
| feature | number | 是 | 卡模拟类型值,详细请见
[
FeatureType
](
#featuretype
)
枚举值。 |
**返回值:**
**返回值:**
|
**类型**
|
**说明**
|
|
**类型**
|
**说明**
|
| -------
- |
-------- |
| -------
| ------------------------------
-------- |
| boolean | true: 支持该类型卡模拟,
false: 不支持该类型卡模拟。|
| boolean | true: 支持该类型卡模拟,
false: 不支持该类型卡模拟。
|
## hasHceCapability<sup>9+</sup>
## hasHceCapability<sup>9+</sup>
...
@@ -74,8 +74,8 @@ hasHceCapability(): boolean
...
@@ -74,8 +74,8 @@ hasHceCapability(): boolean
**返回值:**
**返回值:**
|
**类型**
|
**说明**
|
|
**类型**
|
**说明**
|
| -------
- |
-------- |
| -------
| ------------------------
-------- |
| boolean | true: 支持HCE,
false: 不支持HCE。|
| boolean | true: 支持HCE,
false: 不支持HCE。
|
## isDefaultService<sup>9+</sup>
## isDefaultService<sup>9+</sup>
...
@@ -90,15 +90,15 @@ isDefaultService(elementName: ElementName, type: CardType): boolean
...
@@ -90,15 +90,15 @@ isDefaultService(elementName: ElementName, type: CardType): boolean
**参数:**
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| 参数名 | 类型 | 必填 | 说明 |
| -------
|
-------- | ---- | ----------------------- |
| -------
---- | --------------------------------
-------- | ---- | ----------------------- |
| elementName |
[
ElementName
](
js-apis-bundleManager-elementName.md#elementname
)
| 是 | 应用的描述,由Bundle名称和组件名称组成。 |
| elementName |
[
ElementName
](
js-apis-bundleManager-elementName.md#elementname
)
| 是 | 应用的描述,由Bundle名称和组件名称组成。 |
| type |
[
CardType
](
#cardtype9
)
| 是 | 卡模拟业务类型。 |
| type |
[
CardType
](
#cardtype9
)
| 是 | 卡模拟业务类型。 |
**返回值:**
**返回值:**
|
**类型**
|
**说明**
|
|
**类型**
|
**说明**
|
| -------
- |
-------- |
| -------
| ----------------------------
-------- |
| boolean | true: 是默认支付应用,
false: 不是默认支付应用。|
| boolean | true: 是默认支付应用,
false: 不是默认支付应用。
|
**示例:**
**示例:**
...
@@ -108,13 +108,11 @@ import cardEmulation from '@ohos.nfc.cardEmulation';
...
@@ -108,13 +108,11 @@ import cardEmulation from '@ohos.nfc.cardEmulation';
var
isHceSupported
=
cardEmulation
.
isSupported
(
cardEmulation
.
FeatureType
.
HCE
);
var
isHceSupported
=
cardEmulation
.
isSupported
(
cardEmulation
.
FeatureType
.
HCE
);
if
(
!
isHceSupported
)
{
if
(
!
isHceSupported
)
{
console
.
log
(
'
this device is not supported for HCE, ignore it.
'
);
console
.
log
(
'
this device is not supported for HCE, ignore it.
'
);
return
;
}
}
var
hasHceCap
=
cardEmulation
.
hasHceCapability
();
var
hasHceCap
=
cardEmulation
.
hasHceCapability
();
if
(
!
hasHceCap
)
{
if
(
!
hasHceCap
)
{
console
.
log
(
'
this device hasHceCapability false, ignore it.
'
);
console
.
log
(
'
this device hasHceCapability false, ignore it.
'
);
return
;
}
}
var
elementName
=
{
var
elementName
=
{
...
...
zh-cn/application-dev/reference/apis/js-apis-nfcTag.md
浏览文件 @
ca23e244
此差异已折叠。
点击以展开。
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录