Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Docs
提交
74432f84
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看板
未验证
提交
74432f84
编写于
9月 29, 2022
作者:
O
openharmony_ci
提交者:
Gitee
9月 29, 2022
浏览文件
操作
浏览文件
下载
差异文件
!10097 Fix the problem of sensitive words
Merge pull request !10097 from yuyaozhi/master
上级
b3466bf4
248673ba
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
103 addition
and
35 deletion
+103
-35
zh-cn/application-dev/reference/apis/js-apis-application-MissionSnapshot.md
...dev/reference/apis/js-apis-application-MissionSnapshot.md
+1
-1
zh-cn/application-dev/reference/apis/js-apis-application-quickFixManager.md
...dev/reference/apis/js-apis-application-quickFixManager.md
+1
-1
zh-cn/application-dev/reference/apis/js-apis-appmanager.md
zh-cn/application-dev/reference/apis/js-apis-appmanager.md
+66
-0
zh-cn/application-dev/reference/apis/js-apis-missionManager.md
.../application-dev/reference/apis/js-apis-missionManager.md
+35
-33
未找到文件。
zh-cn/application-dev/reference/apis/js-apis-application-MissionSnapshot.md
浏览文件 @
74432f84
...
...
@@ -14,7 +14,7 @@ MissionSnapshot模块提供设置与任务对应的任务快照的任务元素
```
js
import
ElementName
from
'
@ohos.bundle
'
;
import
image
from
'
@ohos.multimedia.image
'
;
import
missionManager
from
'
@ohos.application.missionManager
'
import
missionManager
from
'
@ohos.application.missionManager
'
;
missionManager
.
getMissionInfos
(
""
,
10
,
(
error
,
missions
)
=>
{
console
.
log
(
"
getMissionInfos is called, error.code =
"
+
error
.
code
);
...
...
zh-cn/application-dev/reference/apis/js-apis-application-quickFixManager.md
浏览文件 @
74432f84
# quickFixManager
quickFixManager模块提供快速修复的能力,快速修复是
鸿蒙
提供给开发者的一种技术手段,支持开发者以远快于(小时级、分钟级)应用升级的方式进行缺陷修复。
quickFixManager模块提供快速修复的能力,快速修复是
OpenHarmony
提供给开发者的一种技术手段,支持开发者以远快于(小时级、分钟级)应用升级的方式进行缺陷修复。
> **说明:**
>
...
...
zh-cn/application-dev/reference/apis/js-apis-appmanager.md
浏览文件 @
74432f84
...
...
@@ -294,6 +294,9 @@ registerApplicationStateObserver(observer: ApplicationStateObserver): number;
},
onProcessDied
(
processData
)
{
console
.
log
(
'
------------ onProcessDied -----------
'
,
processData
);
},
onProcessStateChanged
(
processData
)
{
console
.
log
(
'
------------ onProcessStateChanged -----------
'
,
processData
);
}
}
const
observerCode
=
app
.
registerApplicationStateObserver
(
applicationStateObserver
);
...
...
@@ -335,6 +338,9 @@ registerApplicationStateObserver(observer: ApplicationStateObserver, bundleNameL
},
onProcessDied
(
processData
)
{
console
.
log
(
'
------------ onProcessDied -----------
'
,
processData
);
},
onProcessStateChanged
(
processData
)
{
console
.
log
(
'
------------ onProcessStateChanged -----------
'
,
processData
);
}
}
var
bundleNameList
=
[
'
bundleName1
'
,
'
bundleName2
'
];
...
...
@@ -707,6 +713,18 @@ onForegroundApplicationChanged(appStateData: AppStateData): void;
var
applicationStateObserver
=
{
onForegroundApplicationChanged
(
appStateData
)
{
console
.
log
(
'
------------ onForegroundApplicationChanged -----------
'
,
appStateData
);
},
onAbilityStateChanged
(
abilityStateData
)
{
console
.
log
(
'
------------ onAbilityStateChanged -----------
'
,
abilityStateData
);
},
onProcessCreated
(
processData
)
{
console
.
log
(
'
------------ onProcessCreated -----------
'
,
processData
);
},
onProcessDied
(
processData
)
{
console
.
log
(
'
------------ onProcessDied -----------
'
,
processData
);
},
onProcessStateChanged
(
processData
)
{
console
.
log
(
'
------------ onProcessStateChanged -----------
'
,
processData
);
}
}
const
observerCode
=
app
.
registerApplicationStateObserver
(
applicationStateObserver
);
...
...
@@ -734,8 +752,20 @@ onAbilityStateChanged(abilityStateData: AbilityStateData): void;
```
js
var
applicationStateObserver
=
{
onForegroundApplicationChanged
(
appStateData
)
{
console
.
log
(
'
------------ onForegroundApplicationChanged -----------
'
,
appStateData
);
},
onAbilityStateChanged
(
abilityStateData
)
{
console
.
log
(
'
------------ onAbilityStateChanged -----------
'
,
abilityStateData
);
},
onProcessCreated
(
processData
)
{
console
.
log
(
'
------------ onProcessCreated -----------
'
,
processData
);
},
onProcessDied
(
processData
)
{
console
.
log
(
'
------------ onProcessDied -----------
'
,
processData
);
},
onProcessStateChanged
(
processData
)
{
console
.
log
(
'
------------ onProcessStateChanged -----------
'
,
processData
);
}
}
const
observerCode
=
app
.
registerApplicationStateObserver
(
applicationStateObserver
);
...
...
@@ -762,8 +792,20 @@ onProcessCreated(processData: ProcessData): void;
```
js
var
applicationStateObserver
=
{
onForegroundApplicationChanged
(
appStateData
)
{
console
.
log
(
'
------------ onForegroundApplicationChanged -----------
'
,
appStateData
);
},
onAbilityStateChanged
(
abilityStateData
)
{
console
.
log
(
'
------------ onAbilityStateChanged -----------
'
,
abilityStateData
);
},
onProcessCreated
(
processData
)
{
console
.
log
(
'
------------ onProcessCreated -----------
'
,
processData
);
},
onProcessDied
(
processData
)
{
console
.
log
(
'
------------ onProcessDied -----------
'
,
processData
);
},
onProcessStateChanged
(
processData
)
{
console
.
log
(
'
------------ onProcessStateChanged -----------
'
,
processData
);
}
}
const
observerCode
=
app
.
registerApplicationStateObserver
(
applicationStateObserver
);
...
...
@@ -790,8 +832,20 @@ onProcessDied(processData: ProcessData): void;
```
js
var
applicationStateObserver
=
{
onForegroundApplicationChanged
(
appStateData
)
{
console
.
log
(
'
------------ onForegroundApplicationChanged -----------
'
,
appStateData
);
},
onAbilityStateChanged
(
abilityStateData
)
{
console
.
log
(
'
------------ onAbilityStateChanged -----------
'
,
abilityStateData
);
},
onProcessCreated
(
processData
)
{
console
.
log
(
'
------------ onProcessCreated -----------
'
,
processData
);
},
onProcessDied
(
processData
)
{
console
.
log
(
'
------------ onProcessDied -----------
'
,
processData
);
},
onProcessStateChanged
(
processData
)
{
console
.
log
(
'
------------ onProcessStateChanged -----------
'
,
processData
);
}
}
const
observerCode
=
app
.
registerApplicationStateObserver
(
applicationStateObserver
);
...
...
@@ -818,6 +872,18 @@ onProcessDied(processData: ProcessData): void;
```
js
var
applicationStateObserver
=
{
onForegroundApplicationChanged
(
appStateData
)
{
console
.
log
(
'
------------ onForegroundApplicationChanged -----------
'
,
appStateData
);
},
onAbilityStateChanged
(
abilityStateData
)
{
console
.
log
(
'
------------ onAbilityStateChanged -----------
'
,
abilityStateData
);
},
onProcessCreated
(
processData
)
{
console
.
log
(
'
------------ onProcessCreated -----------
'
,
processData
);
},
onProcessDied
(
processData
)
{
console
.
log
(
'
------------ onProcessDied -----------
'
,
processData
);
},
onProcessStateChanged
(
processData
)
{
console
.
log
(
'
------------ onProcessStateChanged -----------
'
,
processData
);
}
...
...
zh-cn/application-dev/reference/apis/js-apis-missionManager.md
浏览文件 @
74432f84
...
...
@@ -42,18 +42,18 @@ registerMissionListener(listener: MissionListener): number;
**示例:**
```
js
var
listener
=
{
onMissionCreated
:
function
(
mission
){
"
--------onMissionCreated-------
"
},
onMissionDestroyed
:
function
(
mission
){
"
--------onMissionDestroyed-------
"
},
onMissionSnapshotChanged
:
function
(
mission
){
"
--------onMissionSnapshotChanged-------
"
},
onMissionMovedToFront
:
function
(
mission
){
"
--------onMissionMovedToFront-------
"
},
onMissionIconUpdated
:
function
(
mission
,
icon
){
"
--------onMissionIconUpdated-------
"
}
```
js
var
listener
=
{
onMissionCreated
:
function
(
mission
)
{
console
.
log
(
"
--------onMissionCreated-------
"
)},
onMissionDestroyed
:
function
(
mission
)
{
console
.
log
(
"
--------onMissionDestroyed-------
"
)},
onMissionSnapshotChanged
:
function
(
mission
)
{
console
.
log
(
"
--------onMissionSnapshotChanged-------
"
)},
onMissionMovedToFront
:
function
(
mission
)
{
console
.
log
(
"
--------onMissionMovedToFront-------
"
)},
onMissionIconUpdated
:
function
(
mission
,
icon
)
{
console
.
log
(
"
--------onMissionIconUpdated-------
"
)},
onMissionClosed
:
function
(
mission
)
{
console
.
log
(
"
--------onMissionClosed-------
"
)}
};
console
.
log
(
"
registerMissionListener
"
)
var
listenerid
=
missionManager
.
registerMissionListener
(
listener
);
```
```
## missionManager.unregisterMissionListener
...
...
@@ -77,21 +77,22 @@ unregisterMissionListener(listenerId: number, callback: AsyncCallback<void>
**示例:**
```
js
var
listener
=
{
onMissionCreated
:
function
(
mission
){
"
--------onMissionCreated-------
"
},
onMissionDestroyed
:
function
(
mission
){
"
--------onMissionDestroyed-------
"
},
onMissionSnapshotChanged
:
function
(
mission
){
"
--------onMissionSnapshotChanged-------
"
},
onMissionMovedToFront
:
function
(
mission
){
"
--------onMissionMovedToFront-------
"
},
onMissionIconUpdated
:
function
(
mission
,
icon
){
"
--------onMissionIconUpdated-------
"
}
```
js
var
listener
=
{
onMissionCreated
:
function
(
mission
)
{
console
.
log
(
"
--------onMissionCreated-------
"
)},
onMissionDestroyed
:
function
(
mission
)
{
console
.
log
(
"
--------onMissionDestroyed-------
"
)},
onMissionSnapshotChanged
:
function
(
mission
)
{
console
.
log
(
"
--------onMissionSnapshotChanged-------
"
)},
onMissionMovedToFront
:
function
(
mission
)
{
console
.
log
(
"
--------onMissionMovedToFront-------
"
)},
onMissionIconUpdated
:
function
(
mission
,
icon
)
{
console
.
log
(
"
--------onMissionIconUpdated-------
"
)},
onMissionClosed
:
function
(
mission
)
{
console
.
log
(
"
--------onMissionClosed-------
"
)}
};
console
.
log
(
"
registerMissionListener
"
)
var
listenerid
=
missionManager
.
registerMissionListener
(
listener
);
missionManager
.
unregisterMissionListener
(
listenerid
,
(
error
)
=>
{
console
.
log
(
"
unregisterMissionListener
"
);
console
.
log
(
"
unregisterMissionListener
"
);
})
```
```
## missionManager.unregisterMissionListener
...
...
@@ -120,21 +121,22 @@ unregisterMissionListener(listenerId: number): Promise<void>;
**示例:**
```
js
var
listener
=
{
onMissionCreated
:
function
(
mission
){
"
--------onMissionCreated-------
"
},
onMissionDestroyed
:
function
(
mission
){
"
--------onMissionDestroyed-------
"
},
onMissionSnapshotChanged
:
function
(
mission
){
"
--------onMissionSnapshotChanged-------
"
},
onMissionMovedToFront
:
function
(
mission
){
"
--------onMissionMovedToFront-------
"
},
onMissionIconUpdated
:
function
(
mission
,
icon
){
"
--------onMissionIconUpdated-------
"
}
};
console
.
log
(
"
registerMissionListener
"
)
var
listenerid
=
missionManager
.
registerMissionListener
(
listener
);
missionManager
.
unregisterMissionListener
(
listenerid
).
catch
(
function
(
err
){
console
.
log
(
err
);
});
```
```
js
var
listener
=
{
onMissionCreated
:
function
(
mission
)
{
console
.
log
(
"
--------onMissionCreated-------
"
)},
onMissionDestroyed
:
function
(
mission
)
{
console
.
log
(
"
--------onMissionDestroyed-------
"
)},
onMissionSnapshotChanged
:
function
(
mission
)
{
console
.
log
(
"
--------onMissionSnapshotChanged-------
"
)},
onMissionMovedToFront
:
function
(
mission
)
{
console
.
log
(
"
--------onMissionMovedToFront-------
"
)},
onMissionIconUpdated
:
function
(
mission
,
icon
)
{
console
.
log
(
"
--------onMissionIconUpdated-------
"
)},
onMissionClosed
:
function
(
mission
)
{
console
.
log
(
"
--------onMissionClosed-------
"
)}
};
console
.
log
(
"
registerMissionListener
"
)
var
listenerid
=
missionManager
.
registerMissionListener
(
listener
);
missionManager
.
unregisterMissionListener
(
listenerid
).
catch
(
function
(
err
)
{
console
.
log
(
err
);
});
```
## missionManager.getMissionInfo
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录