From 4036a0e3691b8ba298ba8aa4414be6ea0f14ff44 Mon Sep 17 00:00:00 2001 From: zhongjianfei Date: Sat, 3 Dec 2022 11:35:45 +0800 Subject: [PATCH] modify docs bugs Signed-off-by: zhongjianfei --- .../notification/notification-enable.md | 13 ++++----- .../notification/progress-bar-notification.md | 1 + zh-cn/application-dev/tools/aa-tool.md | 18 ++++++------ zh-cn/application-dev/tools/anm-tool.md | 14 ++++----- zh-cn/application-dev/tools/cem-tool.md | 29 ++++++++----------- 5 files changed, 33 insertions(+), 42 deletions(-) diff --git a/zh-cn/application-dev/notification/notification-enable.md b/zh-cn/application-dev/notification/notification-enable.md index e8efed0a7c..d9b6a9b338 100644 --- a/zh-cn/application-dev/notification/notification-enable.md +++ b/zh-cn/application-dev/notification/notification-enable.md @@ -3,19 +3,18 @@ 应用需要开启通知开关才能发送通知。开发者可以在通知发布前调用[requestEnableNotification()](../reference/apis/js-apis-notification.md#notificationrequestenablenotification8)方法,弹窗让用户选择是否开启使能开关,仅弹窗一次,后续调用该接口不再弹窗。 - **图1** 使能通知开关示意图 + **图1** 使能通知开关示意图 + ![zh-cn_image_0000001416585590](figures/zh-cn_image_0000001416585590.png) - 点击“允许”后,则表示允许应用发送通知。 - 点击“取消”后,再次调用[requestEnableNotification()](../reference/apis/js-apis-notification.md#notificationrequestenablenotification8)方法,则不再弹窗。此时如需要手动使能通知开关,操作步骤如下所示。 - 1. 从设备左上方下拉,进入通知界面。 - ![zh-cn_image_0000001417062434](figures/zh-cn_image_0000001417062434.png) - 2. 点击右上角“设置”图标,进入通知界面,找到需要打开通知开关的应用。 - ![zh-cn_image_0000001466462297](figures/zh-cn_image_0000001466462297.png) - 3. 打开“允许通知”开关。 - ![zh-cn_image_0000001466782025](figures/zh-cn_image_0000001466782025.png) + + | ①从设备左上方下拉,进入通知界面 | ②点击右上角“设置”图标,进入通知界面,找到需要打开通知开关的应用 | ③打开“允许通知”开关 | + | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | + | ![zh-cn_image_0000001417062434](figures/zh-cn_image_0000001417062434.png) | ![zh-cn_image_0000001466462297](figures/zh-cn_image_0000001466462297.png) | ![zh-cn_image_0000001466782025](figures/zh-cn_image_0000001466782025.png) | ## 接口说明 diff --git a/zh-cn/application-dev/notification/progress-bar-notification.md b/zh-cn/application-dev/notification/progress-bar-notification.md index 5f771077fe..cab1a8bbb1 100644 --- a/zh-cn/application-dev/notification/progress-bar-notification.md +++ b/zh-cn/application-dev/notification/progress-bar-notification.md @@ -4,6 +4,7 @@ 进度条通知也是常见的通知类型,主要应用于文件下载、事务处理进度显示。OpenHarmony提供了进度条模板,发布通知应用设置好进度条模板的属性值,如模板名、模板数据,通过通知子系统发送到通知栏显示。 目前系统模板仅支持进度条模板,通知模板[NotificationTemplate](../reference/apis/js-apis-notification.md#notificationtemplate8)中的data参数为用户自定义数据,用于显示与模块相关的数据,效果示意如下图所示。 + ![zh-cn_image_0000001416903138](figures/zh-cn_image_0000001416903138.png) diff --git a/zh-cn/application-dev/tools/aa-tool.md b/zh-cn/application-dev/tools/aa-tool.md index 2d4a1ff605..fef305b1cd 100644 --- a/zh-cn/application-dev/tools/aa-tool.md +++ b/zh-cn/application-dev/tools/aa-tool.md @@ -7,11 +7,11 @@ Ability assistant(Ability助手,简称为aa),是实现应用及测试用 - help 用于显示aa相关的帮助信息。 - 返回值: + **返回值**: 返回对应的帮助信息。 - 使用方法: + **使用方法**: ```bash @@ -30,11 +30,11 @@ Ability assistant(Ability助手,简称为aa),是实现应用及测试用 | -b | 必选参数,bundleName。 | | -D | 可选参数,调试模式。 | - 返回值: + **返回值**: 当启动成功时,返回"start ability successfully.";当启动失败时,返回"error: failed to start ability.",同时会包含相应的失败信息。 - 使用方法: + **使用方法**: ```bash @@ -51,11 +51,11 @@ Ability assistant(Ability助手,简称为aa),是实现应用及测试用 | -a | 必选参数,abilityName。 | | -b | 必选参数,bundleName。 | - 返回值: + **返回值**: 当成功停止ServiceAbility时,返回"stop service ability successfully.";当停止失败时,返回"error: failed to stop service ability."。 - 使用方法: + **使用方法**: ```bash @@ -75,7 +75,7 @@ Ability assistant(Ability助手,简称为aa),是实现应用及测试用 | -i/--ability | AbilityRecord ID | 打印指定应用组件详细信息。 | | -c/--client | - | 打印应用组件详细信息,需要和其他参数组合使用,例如aa dump -a -c、aa dump -i 21 -c。 | - 使用方法: + **使用方法**: ```bash @@ -101,11 +101,11 @@ Ability assistant(Ability助手,简称为aa),是实现应用及测试用 - force-stop 通过bundleName强制停止一个进程。 - 返回值: + **返回值**: 当成功强制停止该进程时,返回"force stop process successfully.";当强制停止失败时,返回"error: failed to force stop process."。 - 使用方法: + **使用方法**: ```bash diff --git a/zh-cn/application-dev/tools/anm-tool.md b/zh-cn/application-dev/tools/anm-tool.md index 2c0967f353..cef4a3dca5 100644 --- a/zh-cn/application-dev/tools/anm-tool.md +++ b/zh-cn/application-dev/tools/anm-tool.md @@ -10,7 +10,7 @@ Advanced Notification Manager(通知管理工具,简称anm)是实现通知 * 用法 - ``` + ```bash anm help ``` @@ -22,7 +22,7 @@ Advanced Notification Manager(通知管理工具,简称anm)是实现通知 * 用法 - ``` + ```bash anm dump [] ``` @@ -37,14 +37,12 @@ Advanced Notification Manager(通知管理工具,简称anm)是实现通知 | -u/--user-id | 可选参数,设置指定的用户ID打印 | | -h/--help | 帮助信息 | -* 示例 +* 示例:打印活跃的通知信息 - ``` + ```bash anm dump -A ``` - 打印活跃的通知信息。 - ![anm-dump-A](figures/anm-dump-A.png) @@ -68,10 +66,8 @@ anm dump -A | -e/--enable-notification | 设置通知使能开关 | | -h/--help | 帮助信息 | -* 示例 +* 示例:设置保存在内存中的最近通知的最大数为100个 ``` anm setting -c 100 ``` - - 设置保存在内存中的最近通知的最大数为100个。 \ No newline at end of file diff --git a/zh-cn/application-dev/tools/cem-tool.md b/zh-cn/application-dev/tools/cem-tool.md index f0edf2e558..d2be980a82 100644 --- a/zh-cn/application-dev/tools/cem-tool.md +++ b/zh-cn/application-dev/tools/cem-tool.md @@ -39,22 +39,20 @@ Common Event Manager(公共事件管理工具, 简称cem)是实现公共 | -d/--data | 可选参数,公共事件携带数据 | | -h/--help | 帮助信息 | -* 示例 - - ``` -cem publish --event "testevent" - ``` +* 示例: - 发布名称为testevent的公共事件 - - ![cem-publish-event](figures/cem-publish-event.png) - - ``` + ```bash +# 发布名称为testevent的公共事件 + cem publish --event "testevent" +``` + + ![cem-publish-event](figures/cem-publish-event.png) + +```bash + # 发布名称为testevent的粘性有序公共事件,该事件的结果码为100,携带数据内容为“this is data” cem publish -e "testevent" -s -o -c 100 -d "this is data" ``` - 发布名称为testevent的粘性有序公共事件,该事件的结果码为100,携带数据内容为“this is data” - ![cem-publish-all](figures/cem-publish-all.png) ### dump @@ -79,12 +77,9 @@ cem publish -e "testevent" -s -o -c 100 -d "this is data" * 示例 - ``` + ```bash + # 打印公共事件名称为testevent的具体信息 cem dump -e "testevent" ``` -​ 打印公共事件名称为testevent的具体信息。 - ​ ![cem-dump-e](figures/cem-dump-e.png) - - -- GitLab