Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Docs
提交
bdebdb8b
D
Docs
项目概览
OpenHarmony
/
Docs
1 年多 前同步成功
通知
159
Star
292
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看板
未验证
提交
bdebdb8b
编写于
3月 13, 2023
作者:
O
openharmony_ci
提交者:
Gitee
3月 13, 2023
浏览文件
操作
浏览文件
下载
差异文件
!15889 update msdp api describe
Merge pull request !15889 from mayunteng/311
上级
c164b139
1697110e
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
17 addition
and
17 deletion
+17
-17
en/application-dev/reference/apis/js-apis-stationary.md
en/application-dev/reference/apis/js-apis-stationary.md
+3
-3
zh-cn/application-dev/reference/apis/js-apis-stationary.md
zh-cn/application-dev/reference/apis/js-apis-stationary.md
+14
-14
未找到文件。
en/application-dev/reference/apis/js-apis-stationary.md
浏览文件 @
bdebdb8b
...
...
@@ -70,7 +70,7 @@ Subscribes to the device status.
**Parameters**
| Name | Type | Mandatory| Description |
|
Parameter
Name | Type | Mandatory| Description |
| -------------------- | -------------------------------------------------- | ---- | ---------------------------- |
| activity |
[
ActivityType
](
#activitytype
)
| Yes | Device status type. |
| event |
[
ActivityEvent
](
#activityevent
)
| Yes | Event type. |
...
...
@@ -96,7 +96,7 @@ Obtains the device status.
**Parameters**
| Name | Type | Mandatory| Description |
|
Parameter
Name | Type | Mandatory| Description |
| -------------------- | -------------------------------------------------- | ---- | ---------------------------- |
| activity |
[
ActivityType
](
#activitytype
)
| Yes | Device status type. |
| callback | Callback<
[
ActivityResponse
](
#activityresponse
)
\>
| Yes | Callback used to receive reported data. |
...
...
@@ -119,7 +119,7 @@ Unsubscribes from the device status.
**Parameters**
| Name | Type | Mandatory| Description |
|
Parameter
Name | Type | Mandatory| Description |
| -------------------- | -------------------------------------------------- | ---- | ---------------------------- |
| activity |
[
ActivityType
](
#activitytype
)
| Yes | Device status type. |
| event |
[
ActivityEvent
](
#activityevent
)
| Yes | Event type. |
...
...
zh-cn/application-dev/reference/apis/js-apis-stationary.md
浏览文件 @
bdebdb8b
...
...
@@ -18,11 +18,11 @@ import stationary from '@ohos.stationary'
服务响应抽象接口。
**系统能力**
SystemCapability.Msdp.DeviceStatus.Stationary
**系统能力**
:
SystemCapability.Msdp.DeviceStatus.Stationary
### 属性
| 名称 |
参数
类型 | 可读 | 可写 | 说明 |
| 名称 | 类型 | 可读 | 可写 | 说明 |
| -------- | -------- | -------- | -------- | -------- |
| state |
[
ActivityState
](
#activitystate
)
| 是 | 否 | 设备状态变化返回值。 |
...
...
@@ -30,9 +30,9 @@ import stationary from '@ohos.stationary'
设备状态类型。
**系统能力**
SystemCapability.Msdp.DeviceStatus.Stationary
**系统能力**
:
SystemCapability.Msdp.DeviceStatus.Stationary
| 名称 | 描述 |
| 名称 | 描述
说明
|
| -------- | -------- |
| still | 绝对静止。 |
| relativeStill | 相对静止。 |
...
...
@@ -41,9 +41,9 @@ import stationary from '@ohos.stationary'
设备状态事件。
**系统能力**
SystemCapability.Msdp.DeviceStatus.Stationary
**系统能力**
:
SystemCapability.Msdp.DeviceStatus.Stationary
|
变量
| 值 | 说明 |
|
名称
| 值 | 说明 |
| ------------------------------ | ---- | ---------------------------------------- |
| ENTER | 1 | 进入。 |
| EXIT | 2 | 退出。 |
...
...
@@ -53,9 +53,9 @@ import stationary from '@ohos.stationary'
设备状态返回值。
**系统能力**
SystemCapability.Msdp.DeviceStatus.Stationary
**系统能力**
:
SystemCapability.Msdp.DeviceStatus.Stationary
|
变量
| 值 | 说明 |
|
名称
| 值 | 说明 |
| ------------------------------ | ---- | ---------------------------------------- |
| ENTER | 1 | 进入。 |
| EXIT | 2 | 退出。 |
...
...
@@ -66,11 +66,11 @@ on(activity: ActivityType, event: ActivityEvent, reportLatencyNs: number, callba
设备状态管理,订阅设备状态服务。
**系统能力**
SystemCapability.Msdp.DeviceStatus.Stationary
**系统能力**
:
SystemCapability.Msdp.DeviceStatus.Stationary
**参数:**
|
名称
| 类型 | 必填 | 说明 |
|
参数名
| 类型 | 必填 | 说明 |
| -------------------- | -------------------------------------------------- | ---- | ---------------------------- |
| activity |
[
ActivityType
](
#activitytype
)
| 是 | 设备状态能力类型。 |
| event |
[
ActivityEvent
](
#activityevent
)
| 是 | 事件类型。 |
...
...
@@ -92,11 +92,11 @@ once(activity: ActivityType, callback: Callback<ActivityResponse>): void
设备状态管理,查询设备状态。
**系统能力**
SystemCapability.Msdp.DeviceStatus.Stationary
**系统能力**
:
SystemCapability.Msdp.DeviceStatus.Stationary
**参数:**
|
名称
| 类型 | 必填 | 说明 |
|
参数名
| 类型 | 必填 | 说明 |
| -------------------- | -------------------------------------------------- | ---- | ---------------------------- |
| activity |
[
ActivityType
](
#activitytype
)
| 是 | 设备状态能力类型。 |
| callback | Callback<
[
ActivityResponse
](
#activityresponse
)
\>
| 是 | 回调函数,接收上报状态变化事件。 |
...
...
@@ -115,11 +115,11 @@ off(activity: ActivityType, event: ActivityEvent, callback?: Callback<Activit
设备状态管理,取消订阅设备状态服务。
**系统能力**
SystemCapability.Msdp.DeviceStatus.Stationary
**系统能力**
:
SystemCapability.Msdp.DeviceStatus.Stationary
**参数:**
|
名称
| 类型 | 必填 | 说明 |
|
参数名
| 类型 | 必填 | 说明 |
| -------------------- | -------------------------------------------------- | ---- | ---------------------------- |
| activity |
[
ActivityType
](
#activitytype
)
| 是 | 设备状态能力类型。 |
| event |
[
ActivityEvent
](
#activityevent
)
| 是 | 事件类型。 |
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录