From 5fccab6472c2b0690bdee2934faf9634ca24e2b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BB=96=E5=BA=B7=E5=BA=B7?= Date: Tue, 11 Apr 2023 21:00:05 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E9=86=92=E4=BB=A3=E7=90=86=E6=96=87?= =?UTF-8?q?=E6=A1=A3=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 廖康康 --- .../apis/js-apis-reminderAgentManager.md | 16 ++++++++++------ .../errorcodes/errorcode-reminderAgentManager.md | 1 + .../reminder-agent-development.md | 10 +++++----- 3 files changed, 16 insertions(+), 11 deletions(-) diff --git a/zh-cn/application-dev/reference/apis/js-apis-reminderAgentManager.md b/zh-cn/application-dev/reference/apis/js-apis-reminderAgentManager.md index 4f4b71d511..8d6d0b7446 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-reminderAgentManager.md +++ b/zh-cn/application-dev/reference/apis/js-apis-reminderAgentManager.md @@ -570,6 +570,7 @@ try { | -------- | -------- | -------- | | ACTION_BUTTON_TYPE_CLOSE | 0 | 表示关闭提醒的按钮。 | | ACTION_BUTTON_TYPE_SNOOZE | 1 | 表示延迟提醒的按钮。 | +| ACTION_BUTTON_TYPE_CUSTOM10+ | 2 | 表示自定义的按钮。(系统接口) | ## ReminderType @@ -595,18 +596,19 @@ try { | -------- | -------- | -------- | -------- | | title | string | 是 | 按钮显示的标题。 | | type | [ActionButtonType](#actionbuttontype) | 是 | 按钮的类型。 | +| wantAgent10+ | [WantAgent](#wantagent) | 否 | 点击按钮跳转的ability信息。(系统接口) | ## WantAgent -点击提醒通知后跳转的目标`ability`信息。 +跳转目标的ability信息。 **系统能力**:`SystemCapability.Notification.ReminderAgent` | 名称 | 类型 | 必填 | 说明 | | -------- | -------- | -------- | -------- | -| pkgName | string | 是 | 指明点击提醒通知栏后跳转的目标HAP名。 | -| abilityName | string | 是 | 指明点击提醒通知栏后跳转的目标ability名称。 | +| pkgName | string | 是 | 指明跳转的目标包名。 | +| abilityName | string | 是 | 指明跳转的目标ability名称。 | ## MaxScreenWantAgent @@ -617,7 +619,7 @@ try { | 名称 | 类型 | 必填 | 说明 | | -------- | -------- | -------- | -------- | -| pkgName | string | 是 | 指明提醒到达时自动拉起的目标HAP名(如果设备在使用中,则只弹出通知横幅框)。 | +| pkgName | string | 是 | 指明提醒到达时自动拉起的目标包名(如果设备在使用中,则只弹出通知横幅框)。 | | abilityName | string | 是 | 指明提醒到达时自动拉起的目标ability名(如果设备在使用中,则只弹出通知横幅框)。 | @@ -630,18 +632,20 @@ try { | 名称 | 类型 | 必填 | 说明 | | -------- | -------- | -------- | -------- | | reminderType | [ReminderType](#remindertype) | 是 | 指明提醒类型。 | -| actionButton | [ActionButton](#actionbutton) | 否 | 弹出的提醒通知栏中显示的按钮(参数可选,支持0/1/2个按钮)。 | +| actionButton | [ActionButton](#actionbutton) | 否 | 弹出的提醒通知栏中显示的按钮(参数可选,普通应用最多支持两个按钮,系统应用最多支持三个按钮10+)。 | | wantAgent | [WantAgent](#wantagent) | 否 | 点击通知后需要跳转的目标ability信息。 | | maxScreenWantAgent | [MaxScreenWantAgent](#maxscreenwantagent) | 否 | 提醒到达时跳转的目标包。如果设备正在使用中,则弹出一个通知框。 | | ringDuration | number | 否 | 指明响铃时长(单位:秒),默认1秒。 | | snoozeTimes | number | 否 | 指明延迟提醒次数,默认0次。 | -| timeInterval | number | 否 | 执行延迟提醒间隔(单位:秒),默认0秒。 | +| timeInterval | number | 否 | 执行延迟提醒间隔(单位:秒),最少5分钟。 | | title | string | 否 | 指明提醒标题。 | | content | string | 否 | 指明提醒内容。 | | expiredContent | string | 否 | 指明提醒过期后需要显示的内容。 | | snoozeContent | string | 否 | 指明延迟提醒时需要显示的内容。 | | notificationId | number | 否 | 指明提醒使用的通知的id号,相同id号的提醒会覆盖。 | | slotType | [notification.SlotType](js-apis-notification.md#slottype) | 否 | 指明提醒的slot类型。 | +| tapDismissed10+ | boolean | 否 | 通知是否自动清除,同[NotificationRequest.tapDismissed](js-apis-notification.md#notificationRequest)。 | +| autoDeletedTime10+ | number | 否 | 自动清除的时间,同[NotificationRequest.autoDeletedTime](js-apis-notification.md#notificationRequest)。 | ## ReminderRequestCalendar diff --git a/zh-cn/application-dev/reference/errorcodes/errorcode-reminderAgentManager.md b/zh-cn/application-dev/reference/errorcodes/errorcode-reminderAgentManager.md index b2df9dd191..31ecf5be9a 100644 --- a/zh-cn/application-dev/reference/errorcodes/errorcode-reminderAgentManager.md +++ b/zh-cn/application-dev/reference/errorcodes/errorcode-reminderAgentManager.md @@ -38,6 +38,7 @@ The number of reminders exceeds the limit. 1. 当前系统提醒超过2000个。 2. 当前应用提醒超过30个。 +3. 系统应用总提醒超过12000个;当前应用提醒超过限制:普通应用30个,系统应用10000个。10+ **处理步骤** diff --git a/zh-cn/application-dev/task-management/reminder-agent-development.md b/zh-cn/application-dev/task-management/reminder-agent-development.md index ed069b3469..3b4d643ac4 100644 --- a/zh-cn/application-dev/task-management/reminder-agent-development.md +++ b/zh-cn/application-dev/task-management/reminder-agent-development.md @@ -37,7 +37,7 @@ let targetReminderAgent: reminderAgentManager.ReminderRequestTimer = { reminderType: reminderAgentManager.ReminderType.REMINDER_TYPE_TIMER, // 提醒类型为倒计时类型 triggerTimeInSeconds: 10, - actionButton: [ // 设置弹出的提醒通知信息上显示的按钮类型和标题,支持“关闭”和“延迟”两种类型,其中“延迟”按钮类型需要与snoozeTimes和timeInterval参数结合使用 + actionButton: [ // 设置弹出的提醒通知信息上显示的按钮类型和标题 { title: 'close', type: reminderAgentManager.ActionButtonType.ACTION_BUTTON_TYPE_CLOSE @@ -73,7 +73,7 @@ }, repeatMonths: [1], // 指明重复提醒的月份 repeatDays: [1], // 指明重复提醒的日期 - actionButton: [ // 设置弹出的提醒通知信息上显示的按钮类型和标题,支持“关闭”和“延迟”两种类型,其中“延迟”按钮类型需要与snoozeTimes和timeInterval参数结合使用 + actionButton: [ // 设置弹出的提醒通知信息上显示的按钮类型和标题 { title: 'close', type: reminderAgentManager.ActionButtonType.ACTION_BUTTON_TYPE_CLOSE @@ -93,7 +93,7 @@ }, ringDuration: 5, // 指明响铃时长(单位:秒) snoozeTimes: 2, // 指明延迟提醒次数 - timeInterval: 5, // 执行延迟提醒间隔(单位:秒) + timeInterval: 300, // 执行延迟提醒间隔(单位:秒) title: 'this is title', // 指明提醒标题 content: 'this is content', // 指明提醒内容 expiredContent: 'this reminder has expired', // 指明提醒过期后需要显示的内容 @@ -110,7 +110,7 @@ hour: 23, // 指明提醒的目标时刻 minute: 9, // 指明提醒的目标分钟 daysOfWeek: [2], // 指明每周哪几天需要重复提醒 - actionButton: [ // 设置弹出的提醒通知信息上显示的按钮类型和标题,支持“关闭”和“延迟”两种类型,其中“延迟”按钮类型需要与snoozeTimes和timeInterval参数结合使用 + actionButton: [ // 设置弹出的提醒通知信息上显示的按钮类型和标题 { title: 'close', type: reminderAgentManager.ActionButtonType.ACTION_BUTTON_TYPE_CLOSE @@ -130,7 +130,7 @@ }, ringDuration: 5, // 指明响铃时长(单位:秒) snoozeTimes: 2, // 指明延迟提醒次数 - timeInterval: 5, // 执行延迟提醒间隔(单位:秒) + timeInterval: 300, // 执行延迟提醒间隔(单位:秒) title: 'this is title', // 指明提醒标题 content: 'this is content', // 指明提醒内容 expiredContent: 'this reminder has expired', // 指明提醒过期后需要显示的内容 -- GitLab