“9e580631aaa97194434ee514f86e2ba3c35b6c11”上不存在“...math/git@gitcode.net:s920243400/PaddleDetection.git”
提交 6922d80e 编写于 作者: 廖康康

提醒代理错误码修改

Signed-off-by: N廖康康 <liaokangkang@huawei.com>
上级 4cc2dd91
...@@ -63,7 +63,6 @@ ...@@ -63,7 +63,6 @@
- [@ohos.commonEvent (公共事件模块)](js-apis-commonEvent.md) - [@ohos.commonEvent (公共事件模块)](js-apis-commonEvent.md)
- [@ohos.events.emitter (Emitter)](js-apis-emitter.md) - [@ohos.events.emitter (Emitter)](js-apis-emitter.md)
- [@ohos.notification (Notification模块)](js-apis-notification.md) - [@ohos.notification (Notification模块)](js-apis-notification.md)
- [@ohos.reminderAgent (后台代理提醒)](js-apis-reminderAgent.md)
- application/[EventHub (EventHub)](js-apis-eventhub.md) - application/[EventHub (EventHub)](js-apis-eventhub.md)
- 应用程序包管理 - 应用程序包管理
- [@ohos.bundle (Bundle模块)](js-apis-Bundle.md) - [@ohos.bundle (Bundle模块)](js-apis-Bundle.md)
...@@ -119,6 +118,7 @@ ...@@ -119,6 +118,7 @@
- 资源调度 - 资源调度
- [@ohos.backgroundTaskManager (后台任务管理)](js-apis-backgroundTaskManager.md) - [@ohos.backgroundTaskManager (后台任务管理)](js-apis-backgroundTaskManager.md)
- [@ohos.distributedMissionManager (分布式任务管理)](js-apis-distributedMissionManager.md) - [@ohos.distributedMissionManager (分布式任务管理)](js-apis-distributedMissionManager.md)
- [@ohos.reminderAgentManager (后台代理提醒)](js-apis-reminderAgentManager.md)
- [@ohos.workScheduler (延迟任务调度)](js-apis-workScheduler.md) - [@ohos.workScheduler (延迟任务调度)](js-apis-workScheduler.md)
- [@ohos.WorkSchedulerExtensionAbility (延迟任务调度回调)](js-apis-WorkSchedulerExtensionAbility.md) - [@ohos.WorkSchedulerExtensionAbility (延迟任务调度回调)](js-apis-WorkSchedulerExtensionAbility.md)
- 定制管理 - 定制管理
...@@ -284,6 +284,7 @@ ...@@ -284,6 +284,7 @@
- [@system.notification (通知消息)](js-apis-system-notification.md) - [@system.notification (通知消息)](js-apis-system-notification.md)
- [@system.package (应用管理)](js-apis-system-package.md) - [@system.package (应用管理)](js-apis-system-package.md)
- [@system.prompt (弹窗)](js-apis-system-prompt.md) - [@system.prompt (弹窗)](js-apis-system-prompt.md)
- [@ohos.reminderAgent (后台代理提醒)](js-apis-reminderAgent.md)
- [@system.request (上传下载)](js-apis-system-request.md) - [@system.request (上传下载)](js-apis-system-request.md)
- [@system.router (页面路由)](js-apis-system-router.md) - [@system.router (页面路由)](js-apis-system-router.md)
- [@system.sensor (传感器)](js-apis-system-sensor.md) - [@system.sensor (传感器)](js-apis-system-sensor.md)
......
...@@ -4,7 +4,10 @@ ...@@ -4,7 +4,10 @@
开发应用时,开发者可以调用后台提醒发布的接口创建定时提醒,包括倒计时、日历、闹钟三种提醒类型。使用后台代理提醒能力后,应用可以被冻结或退出,计时和弹出提醒的功能将被后台系统服务代理。 开发应用时,开发者可以调用后台提醒发布的接口创建定时提醒,包括倒计时、日历、闹钟三种提醒类型。使用后台代理提醒能力后,应用可以被冻结或退出,计时和弹出提醒的功能将被后台系统服务代理。
> ![icon-note.gif](public_sys-resources/icon-note.gif) **说明:** > **说明:**
>
> 从API Version 9 开始,该接口不再维护,推荐使用新接口[@ohos.reminderAgentManager (后台代理提醒)](js-apis-reminderAgentManager.md)
>
> 本模块首批接口从API version 7开始支持。后续版本的新增接口,采用上角标单独标记接口的起始版本。 > 本模块首批接口从API version 7开始支持。后续版本的新增接口,采用上角标单独标记接口的起始版本。
...@@ -15,14 +18,11 @@ import reminderAgent from'@ohos.reminderAgent'; ...@@ -15,14 +18,11 @@ import reminderAgent from'@ohos.reminderAgent';
``` ```
## reminderAgent.publishReminder<sup>(deprecated)</sup> ## reminderAgent.publishReminder
publishReminder(reminderReq: ReminderRequest, callback: AsyncCallback&lt;number&gt;): void publishReminder(reminderReq: ReminderRequest, callback: AsyncCallback&lt;number&gt;): void
发布一个后台代理提醒,使用callback方式实现异步调用,该方法需要申请通知弹窗[Notification.requestEnableNotification](js-apis-notification.md#notificationrequestenablenotification8)后才能调用。 发布一个后台代理提醒,使用callback方式实现异步调用,该方法需要申请通知弹窗[Notification.requestEnableNotification](js-apis-notification.md#notificationrequestenablenotification8)后才能调用。
> **说明:** 从API version 9开始废弃,建议使用[reminderAgentManager.publishReminder](js-apis-reminderAgentManager.md#reminderagentmanagerpublishreminder9)
>
> 从 API version 7开始支持。
**需要权限**: ohos.permission.PUBLISH_AGENT_REMINDER **需要权限**: ohos.permission.PUBLISH_AGENT_REMINDER
...@@ -47,14 +47,11 @@ publishReminder(reminderReq: ReminderRequest, callback: AsyncCallback&lt;number& ...@@ -47,14 +47,11 @@ publishReminder(reminderReq: ReminderRequest, callback: AsyncCallback&lt;number&
``` ```
## reminderAgent.publishReminder<sup>(deprecated)</sup> ## reminderAgent.publishReminder
publishReminder(reminderReq: ReminderRequest): Promise&lt;number&gt; publishReminder(reminderReq: ReminderRequest): Promise&lt;number&gt;
发布一个后台代理提醒,使用Promise方式实现异步调用,该方法需要申请通知弹窗[Notification.requestEnableNotification](js-apis-notification.md#notificationrequestenablenotification8)后才能调用。 发布一个后台代理提醒,使用Promise方式实现异步调用,该方法需要申请通知弹窗[Notification.requestEnableNotification](js-apis-notification.md#notificationrequestenablenotification8)后才能调用。
> **说明:** 从API version 9开始废弃,建议使用[reminderAgentManager.publishReminder](js-apis-reminderAgentManager.md#reminderagentmanagerpublishreminder9-1)
>
> 从 API version 7开始支持。
**需要权限**: ohos.permission.PUBLISH_AGENT_REMINDER **需要权限**: ohos.permission.PUBLISH_AGENT_REMINDER
...@@ -82,14 +79,11 @@ publishReminder(reminderReq: ReminderRequest): Promise&lt;number&gt; ...@@ -82,14 +79,11 @@ publishReminder(reminderReq: ReminderRequest): Promise&lt;number&gt;
``` ```
## reminderAgent.cancelReminder<sup>(deprecated)</sup> ## reminderAgent.cancelReminder
cancelReminder(reminderId: number, callback: AsyncCallback&lt;void&gt;): void cancelReminder(reminderId: number, callback: AsyncCallback&lt;void&gt;): void
取消指定id的提醒,使用callback方式实现异步调用。 取消指定id的提醒,使用callback方式实现异步调用。
> **说明:** 从API version 9开始废弃,建议使用[reminderAgentManager.cancelReminder](js-apis-reminderAgentManager.md#reminderagentmanagercancelreminder9)
>
> 从 API version 7开始支持。
**系统能力**: SystemCapability.Notification.ReminderAgent **系统能力**: SystemCapability.Notification.ReminderAgent
...@@ -109,14 +103,11 @@ reminderAgent.cancelReminder(1, (err, data) => { ...@@ -109,14 +103,11 @@ reminderAgent.cancelReminder(1, (err, data) => {
``` ```
## reminderAgent.cancelReminder<sup>(deprecated)</sup> ## reminderAgent.cancelReminder
cancelReminder(reminderId: number): Promise&lt;void&gt; cancelReminder(reminderId: number): Promise&lt;void&gt;
取消指定id的提醒,使用Promise方式实现异步调用。 取消指定id的提醒,使用Promise方式实现异步调用。
> **说明:** 从API version 9开始废弃,建议使用[reminderAgentManager.cancelReminder](js-apis-reminderAgentManager.md#reminderagentmanagercancelreminder9-1)
>
> 从 API version 7开始支持。
**系统能力**: SystemCapability.Notification.ReminderAgent **系统能力**: SystemCapability.Notification.ReminderAgent
...@@ -141,14 +132,11 @@ reminderAgent.cancelReminder(1).then(() => { ...@@ -141,14 +132,11 @@ reminderAgent.cancelReminder(1).then(() => {
``` ```
## reminderAgent.getValidReminders<sup>(deprecated)</sup> ## reminderAgent.getValidReminders
getValidReminders(callback: AsyncCallback&lt;Array&lt;ReminderRequest&gt;&gt;): void getValidReminders(callback: AsyncCallback&lt;Array&lt;ReminderRequest&gt;&gt;): void
获取当前应用已设置的所有有效(未过期)的提醒,使用callback方式实现异步调用。 获取当前应用已设置的所有有效(未过期)的提醒,使用callback方式实现异步调用。
> **说明:** 从API version 9开始废弃,建议使用[reminderAgentManager.getValidReminders](js-apis-reminderAgentManager.md#reminderagentmanagergetvalidreminders9)
>
> 从 API version 7开始支持。
**系统能力**: SystemCapability.Notification.ReminderAgent **系统能力**: SystemCapability.Notification.ReminderAgent
...@@ -188,14 +176,11 @@ reminderAgent.getValidReminders((err, reminders) => { ...@@ -188,14 +176,11 @@ reminderAgent.getValidReminders((err, reminders) => {
``` ```
## reminderAgent.getValidReminders<sup>(deprecated)</sup> ## reminderAgent.getValidReminders
getValidReminders(): Promise&lt;Array&lt;ReminderRequest&gt;&gt; getValidReminders(): Promise&lt;Array&lt;ReminderRequest&gt;&gt;
获取当前应用已设置的所有有效(未过期)的提醒,使用Promise方式实现异步调用。 获取当前应用已设置的所有有效(未过期)的提醒,使用Promise方式实现异步调用。
> **说明:** 从API version 9开始废弃,建议使用[reminderAgentManager.getValidReminders](js-apis-reminderAgentManager.md#reminderagentmanagergetvalidreminders9-1)
>
> 从 API version 7开始支持。
**系统能力**: SystemCapability.Notification.ReminderAgent **系统能力**: SystemCapability.Notification.ReminderAgent
...@@ -235,14 +220,11 @@ reminderAgent.getValidReminders().then((reminders) => { ...@@ -235,14 +220,11 @@ reminderAgent.getValidReminders().then((reminders) => {
``` ```
## reminderAgent.cancelAllReminders<sup>(deprecated)</sup> ## reminderAgent.cancelAllReminders
cancelAllReminders(callback: AsyncCallback&lt;void&gt;): void cancelAllReminders(callback: AsyncCallback&lt;void&gt;): void
取消当前应用所有的提醒,使用callback方式实现异步调用。 取消当前应用所有的提醒,使用callback方式实现异步调用。
> **说明:** 从API version 9开始废弃,建议使用[reminderAgentManager.cancelAllReminders](js-apis-reminderAgentManager.md#reminderagentmanagercancelallreminders9)
>
> 从 API version 7开始支持。
**系统能力**: SystemCapability.Notification.ReminderAgent **系统能力**: SystemCapability.Notification.ReminderAgent
...@@ -261,14 +243,11 @@ reminderAgent.cancelAllReminders((err, data) =>{ ...@@ -261,14 +243,11 @@ reminderAgent.cancelAllReminders((err, data) =>{
``` ```
## reminderAgent.cancelAllReminders<sup>(deprecated)</sup> ## reminderAgent.cancelAllReminders
cancelAllReminders(): Promise&lt;void&gt; cancelAllReminders(): Promise&lt;void&gt;
取消当前应用所有的提醒,使用Promise方式实现异步调用。 取消当前应用所有的提醒,使用Promise方式实现异步调用。
> **说明:** 从API version 9开始废弃,建议使用[reminderAgentManager.cancelAllReminders](js-apis-reminderAgentManager.md#reminderagentmanagercancelallreminders9-1)
>
> 从 API version 7开始支持。
**系统能力**: SystemCapability.Notification.ReminderAgent **系统能力**: SystemCapability.Notification.ReminderAgent
...@@ -287,14 +266,11 @@ reminderAgent.cancelAllReminders().then(() => { ...@@ -287,14 +266,11 @@ reminderAgent.cancelAllReminders().then(() => {
``` ```
## reminderAgent.addNotificationSlot<sup>(deprecated)</sup> ## reminderAgent.addNotificationSlot
addNotificationSlot(slot: NotificationSlot, callback: AsyncCallback&lt;void&gt;): void addNotificationSlot(slot: NotificationSlot, callback: AsyncCallback&lt;void&gt;): void
添加一个NotificationSlot,使用callback方式实现异步调用。 添加一个NotificationSlot,使用callback方式实现异步调用。
> **说明:** 从API version 9开始废弃,建议使用[reminderAgentManager.addNotificationSlot](js-apis-reminderAgentManager.md#reminderagentmanageraddnotificationslot9)
>
> 从 API version 7开始支持。
**系统能力**: SystemCapability.Notification.ReminderAgent **系统能力**: SystemCapability.Notification.ReminderAgent
...@@ -319,14 +295,11 @@ reminderAgent.addNotificationSlot(mySlot, (err, data) => { ...@@ -319,14 +295,11 @@ reminderAgent.addNotificationSlot(mySlot, (err, data) => {
``` ```
## reminderAgent.addNotificationSlot<sup>(deprecated)</sup> ## reminderAgent.addNotificationSlot
addNotificationSlot(slot: NotificationSlot): Promise&lt;void&gt; addNotificationSlot(slot: NotificationSlot): Promise&lt;void&gt;
添加一个NotificationSlot,使用Promise方式实现异步调用。 添加一个NotificationSlot,使用Promise方式实现异步调用。
> **说明:** 从API version 9开始废弃,建议使用[reminderAgentManager.addNotificationSlot](js-apis-reminderAgentManager.md#reminderagentmanageraddnotificationslot9-1)
>
> 从 API version 7开始支持。
**系统能力**: SystemCapability.Notification.ReminderAgent **系统能力**: SystemCapability.Notification.ReminderAgent
...@@ -356,14 +329,11 @@ reminderAgent.addNotificationSlot(mySlot).then(() => { ...@@ -356,14 +329,11 @@ reminderAgent.addNotificationSlot(mySlot).then(() => {
``` ```
## reminderAgent.removeNotificationSlot<sup>(deprecated)</sup> ## reminderAgent.removeNotificationSlot
removeNotificationSlot(slotType: notification.SlotType, callback: AsyncCallback&lt;void&gt;): void removeNotificationSlot(slotType: notification.SlotType, callback: AsyncCallback&lt;void&gt;): void
删除目标NotificationSlot,使用callback方式实现异步调用。 删除目标NotificationSlot,使用callback方式实现异步调用。
> **说明:** 从API version 9开始废弃,建议使用[reminderAgentManager.removeNotificationSlot](js-apis-reminderAgentManager.md#reminderagentmanagerremovenotificationslot9)
>
> 从 API version 7开始支持。
**系统能力**: SystemCapability.Notification.ReminderAgent **系统能力**: SystemCapability.Notification.ReminderAgent
...@@ -385,14 +355,11 @@ reminderAgent.removeNotificationSlot(notification.SlotType.CONTENT_INFORMATION, ...@@ -385,14 +355,11 @@ reminderAgent.removeNotificationSlot(notification.SlotType.CONTENT_INFORMATION,
``` ```
## reminderAgent.removeNotificationSlot<sup>(deprecated)</sup> ## reminderAgent.removeNotificationSlot
removeNotificationSlot(slotType: notification.SlotType): Promise&lt;void&gt; removeNotificationSlot(slotType: notification.SlotType): Promise&lt;void&gt;
删除目标NotificationSlot,使用Promise方式实现异步调用。 删除目标NotificationSlot,使用Promise方式实现异步调用。
> **说明:** 从API version 9开始废弃,建议使用[reminderAgentManager.removeNotificationSlot](js-apis-reminderAgentManager.md#reminderagentmanagerremovenotificationslot9-1)
>
> 从 API version 7开始支持。
**系统能力**: SystemCapability.Notification.ReminderAgent **系统能力**: SystemCapability.Notification.ReminderAgent
...@@ -419,12 +386,9 @@ reminderAgent.removeNotificationSlot(notification.SlotType.CONTENT_INFORMATION). ...@@ -419,12 +386,9 @@ reminderAgent.removeNotificationSlot(notification.SlotType.CONTENT_INFORMATION).
``` ```
## ActionButtonType<sup>(deprecated)</sup> ## ActionButtonType
按钮的类型。 按钮的类型。
> **说明:** 从API version 9开始废弃,建议使用[reminderAgentManager.removeNotificationSlot](js-apis-reminderAgentManager.md#actionbuttontype9)
>
> 从 API version 7开始支持。
**系统能力**:以下各项对应的系统能力均为SystemCapability.Notification.ReminderAgent **系统能力**:以下各项对应的系统能力均为SystemCapability.Notification.ReminderAgent
...@@ -434,12 +398,9 @@ reminderAgent.removeNotificationSlot(notification.SlotType.CONTENT_INFORMATION). ...@@ -434,12 +398,9 @@ reminderAgent.removeNotificationSlot(notification.SlotType.CONTENT_INFORMATION).
| ACTION_BUTTON_TYPE_SNOOZE | 1 | 表示延迟提醒的按钮。 | | ACTION_BUTTON_TYPE_SNOOZE | 1 | 表示延迟提醒的按钮。 |
## ReminderType<sup>(deprecated)</sup> ## ReminderType
提醒的类型。 提醒的类型。
> **说明:** 从API version 9开始废弃,建议使用[reminderAgentManager.removeNotificationSlot](js-apis-reminderAgentManager.md#remindertype9)
>
> 从 API version 7开始支持。
**系统能力**:以下各项对应的系统能力均为SystemCapability.Notification.ReminderAgent **系统能力**:以下各项对应的系统能力均为SystemCapability.Notification.ReminderAgent
...@@ -450,12 +411,9 @@ reminderAgent.removeNotificationSlot(notification.SlotType.CONTENT_INFORMATION). ...@@ -450,12 +411,9 @@ reminderAgent.removeNotificationSlot(notification.SlotType.CONTENT_INFORMATION).
| REMINDER_TYPE_ALARM | 2 | 表示提醒类型:闹钟。 | | REMINDER_TYPE_ALARM | 2 | 表示提醒类型:闹钟。 |
## ActionButton<sup>(deprecated)</sup> ## ActionButton
用于设置弹出的提醒通知信息上显示的按钮类型和标题。 用于设置弹出的提醒通知信息上显示的按钮类型和标题。
> **说明:** 从API version 9开始废弃,建议使用[reminderAgentManager.removeNotificationSlot](js-apis-reminderAgentManager.md#actionbutton9)
>
> 从 API version 7开始支持。
**系统能力**:以下各项对应的系统能力均为SystemCapability.Notification.ReminderAgent **系统能力**:以下各项对应的系统能力均为SystemCapability.Notification.ReminderAgent
...@@ -465,12 +423,9 @@ reminderAgent.removeNotificationSlot(notification.SlotType.CONTENT_INFORMATION). ...@@ -465,12 +423,9 @@ reminderAgent.removeNotificationSlot(notification.SlotType.CONTENT_INFORMATION).
| type | [ActionButtonType](#actionbuttontype) | 是 | 按钮的类型。 | | type | [ActionButtonType](#actionbuttontype) | 是 | 按钮的类型。 |
## WantAgent<sup>(deprecated)</sup> ## WantAgent
点击提醒通知后跳转的目标ability信息。 点击提醒通知后跳转的目标ability信息。
> **说明:** 从API version 9开始废弃,建议使用[reminderAgentManager.removeNotificationSlot](js-apis-reminderAgentManager.md#wantagent9)
>
> 从 API version 7开始支持。
**系统能力**:以下各项对应的系统能力均为SystemCapability.Notification.ReminderAgent **系统能力**:以下各项对应的系统能力均为SystemCapability.Notification.ReminderAgent
...@@ -480,12 +435,9 @@ reminderAgent.removeNotificationSlot(notification.SlotType.CONTENT_INFORMATION). ...@@ -480,12 +435,9 @@ reminderAgent.removeNotificationSlot(notification.SlotType.CONTENT_INFORMATION).
| abilityName | string | 是 | 指明点击提醒通知栏后跳转的目标ability名称。 | | abilityName | string | 是 | 指明点击提醒通知栏后跳转的目标ability名称。 |
## MaxScreenWantAgent<sup>(deprecated)</sup> ## MaxScreenWantAgent
全屏显示提醒到达时自动拉起的目标ability信息,该接口预留。 全屏显示提醒到达时自动拉起的目标ability信息,该接口预留。
> **说明:** 从API version 9开始废弃,建议使用[reminderAgentManager.removeNotificationSlot](js-apis-reminderAgentManager.md#maxscreenwantagent9)
>
> 从 API version 7开始支持。
**系统能力**:以下各项对应的系统能力均为SystemCapability.Notification.ReminderAgent **系统能力**:以下各项对应的系统能力均为SystemCapability.Notification.ReminderAgent
...@@ -495,12 +447,9 @@ reminderAgent.removeNotificationSlot(notification.SlotType.CONTENT_INFORMATION). ...@@ -495,12 +447,9 @@ reminderAgent.removeNotificationSlot(notification.SlotType.CONTENT_INFORMATION).
| abilityName | string | 是 | 指明提醒到达时自动拉起的目标ability名(如果设备在使用中,则只弹出通知横幅框)。 | | abilityName | string | 是 | 指明提醒到达时自动拉起的目标ability名(如果设备在使用中,则只弹出通知横幅框)。 |
## ReminderRequest<sup>(deprecated)</sup> ## ReminderRequest
提醒实例对象,用于设置提醒类型、响铃时长等具体信息。 提醒实例对象,用于设置提醒类型、响铃时长等具体信息。
> **说明:** 从API version 9开始废弃,建议使用[reminderAgentManager.removeNotificationSlot](js-apis-reminderAgentManager.md#reminderrequest9)
>
> 从 API version 7开始支持。
**系统能力**:以下各项对应的系统能力均为SystemCapability.Notification.ReminderAgent **系统能力**:以下各项对应的系统能力均为SystemCapability.Notification.ReminderAgent
...@@ -521,14 +470,11 @@ reminderAgent.removeNotificationSlot(notification.SlotType.CONTENT_INFORMATION). ...@@ -521,14 +470,11 @@ reminderAgent.removeNotificationSlot(notification.SlotType.CONTENT_INFORMATION).
| slotType | [notification.SlotType](js-apis-notification.md#slottype) | 否 | 指明提醒的slot类型。 | | slotType | [notification.SlotType](js-apis-notification.md#slottype) | 否 | 指明提醒的slot类型。 |
## ReminderRequestCalendar<sup>(deprecated)</sup> ## ReminderRequestCalendar
ReminderRequestCalendar extends ReminderRequest ReminderRequestCalendar extends ReminderRequest
日历实例对象,用于设置提醒的时间。 日历实例对象,用于设置提醒的时间。
> **说明:** 从API version 9开始废弃,建议使用[reminderAgentManager.removeNotificationSlot](js-apis-reminderAgentManager.md#reminderrequestcalendar9)
>
> 从 API version 7开始支持。
**系统能力**:以下各项对应的系统能力均为SystemCapability.Notification.ReminderAgent **系统能力**:以下各项对应的系统能力均为SystemCapability.Notification.ReminderAgent
...@@ -539,14 +485,11 @@ ReminderRequestCalendar extends ReminderRequest ...@@ -539,14 +485,11 @@ ReminderRequestCalendar extends ReminderRequest
| repeatDays | Array&lt;number&gt; | 否 | 指明重复提醒的日期。 | | repeatDays | Array&lt;number&gt; | 否 | 指明重复提醒的日期。 |
## ReminderRequestAlarm<sup>(deprecated)</sup> ## ReminderRequestAlarm
ReminderRequestAlarm extends ReminderRequest ReminderRequestAlarm extends ReminderRequest
闹钟实例对象,用于设置提醒的时间。 闹钟实例对象,用于设置提醒的时间。
> **说明:** 从API version 9开始废弃,建议使用[reminderAgentManager.removeNotificationSlot](js-apis-reminderAgentManager.md#reminderrequestalarm9)
>
> 从 API version 7开始支持。
**系统能力**:以下各项对应的系统能力均为SystemCapability.Notification.ReminderAgent **系统能力**:以下各项对应的系统能力均为SystemCapability.Notification.ReminderAgent
...@@ -557,14 +500,11 @@ ReminderRequestAlarm extends ReminderRequest ...@@ -557,14 +500,11 @@ ReminderRequestAlarm extends ReminderRequest
| daysOfWeek | Array&lt;number&gt; | 否 | 指明每周哪几天需要重复提醒。 | | daysOfWeek | Array&lt;number&gt; | 否 | 指明每周哪几天需要重复提醒。 |
## ReminderRequestTimer<sup>(deprecated)</sup> ## ReminderRequestTimer
ReminderRequestTimer extends ReminderRequest ReminderRequestTimer extends ReminderRequest
倒计时实例对象,用于设置提醒的时间。 倒计时实例对象,用于设置提醒的时间。
> **说明:** 从API version 9开始废弃,建议使用[reminderAgentManager.removeNotificationSlot](js-apis-reminderAgentManager.md#reminderrequesttimer9)
>
> 从 API version 7开始支持。
**系统能力**:SystemCapability.Notification.ReminderAgent **系统能力**:SystemCapability.Notification.ReminderAgent
...@@ -573,12 +513,9 @@ ReminderRequestTimer extends ReminderRequest ...@@ -573,12 +513,9 @@ ReminderRequestTimer extends ReminderRequest
| triggerTimeInSeconds | number | 是 | 指明倒计时的秒数。 | | triggerTimeInSeconds | number | 是 | 指明倒计时的秒数。 |
## LocalDateTime<sup>(deprecated)</sup> ## LocalDateTime
用于日历类提醒设置时指定时间信息。 用于日历类提醒设置时指定时间信息。
> **说明:** 从API version 9开始废弃,建议使用[reminderAgentManager.removeNotificationSlot](js-apis-reminderAgentManager.md#localdatetime9)
>
> 从 API version 7开始支持。
**系统能力**:以下各项对应的系统能力均为SystemCapability.Notification.ReminderAgent **系统能力**:以下各项对应的系统能力均为SystemCapability.Notification.ReminderAgent
......
...@@ -4,8 +4,9 @@ ...@@ -4,8 +4,9 @@
开发应用时,开发者可以调用后台提醒发布的接口创建定时提醒,包括倒计时、日历、闹钟三种提醒类型。使用后台代理提醒能力后,应用可以被冻结或退出,计时和弹出提醒的功能将被后台系统服务代理。 开发应用时,开发者可以调用后台提醒发布的接口创建定时提醒,包括倒计时、日历、闹钟三种提醒类型。使用后台代理提醒能力后,应用可以被冻结或退出,计时和弹出提醒的功能将被后台系统服务代理。
> ![icon-note.gif](public_sys-resources/icon-note.gif) **说明:** > **说明:**
> 本模块首批接口从API version 7开始支持。后续版本的新增接口,采用上角标单独标记接口的起始版本。 >
> 本模块首批接口从API version 9开始支持。后续版本的新增接口,采用上角标单独标记接口的起始版本。
## 导入模块 ## 导入模块
...@@ -15,7 +16,7 @@ import reminderAgentManager from'@ohos.reminderAgentManager'; ...@@ -15,7 +16,7 @@ import reminderAgentManager from'@ohos.reminderAgentManager';
``` ```
## reminderAgentManager.publishReminder<sup>9+</sup> ## reminderAgentManager.publishReminder
publishReminder(reminderReq: ReminderRequest, callback: AsyncCallback&lt;number&gt;): void publishReminder(reminderReq: ReminderRequest, callback: AsyncCallback&lt;number&gt;): void
...@@ -52,7 +53,7 @@ try { ...@@ -52,7 +53,7 @@ try {
``` ```
## reminderAgentManager.publishReminder<sup>9+</sup> ## reminderAgentManager.publishReminder
publishReminder(reminderReq: ReminderRequest): Promise&lt;number&gt; publishReminder(reminderReq: ReminderRequest): Promise&lt;number&gt;
...@@ -90,7 +91,7 @@ try { ...@@ -90,7 +91,7 @@ try {
``` ```
## reminderAgentManager.cancelReminder<sup>9+</sup> ## reminderAgentManager.cancelReminder
cancelReminder(reminderId: number, callback: AsyncCallback&lt;void&gt;): void cancelReminder(reminderId: number, callback: AsyncCallback&lt;void&gt;): void
...@@ -122,7 +123,7 @@ try { ...@@ -122,7 +123,7 @@ try {
``` ```
## reminderAgentManager.cancelReminder<sup>9+</sup> ## reminderAgentManager.cancelReminder
cancelReminder(reminderId: number): Promise&lt;void&gt; cancelReminder(reminderId: number): Promise&lt;void&gt;
...@@ -157,7 +158,7 @@ try { ...@@ -157,7 +158,7 @@ try {
``` ```
## reminderAgentManager.getValidReminders<sup>9+</sup> ## reminderAgentManager.getValidReminders
getValidReminders(callback: AsyncCallback&lt;Array&lt;ReminderRequest&gt;&gt;): void getValidReminders(callback: AsyncCallback&lt;Array&lt;ReminderRequest&gt;&gt;): void
...@@ -209,7 +210,7 @@ try { ...@@ -209,7 +210,7 @@ try {
``` ```
## reminderAgentManager.getValidReminders<sup>9+</sup> ## reminderAgentManager.getValidReminders
getValidReminders(): Promise&lt;Array&lt;ReminderRequest&gt;&gt; getValidReminders(): Promise&lt;Array&lt;ReminderRequest&gt;&gt;
...@@ -259,7 +260,7 @@ try { ...@@ -259,7 +260,7 @@ try {
``` ```
## reminderAgentManager.cancelAllReminders<sup>9+</sup> ## reminderAgentManager.cancelAllReminders
cancelAllReminders(callback: AsyncCallback&lt;void&gt;): void cancelAllReminders(callback: AsyncCallback&lt;void&gt;): void
...@@ -290,7 +291,7 @@ try { ...@@ -290,7 +291,7 @@ try {
``` ```
## reminderAgentManager.cancelAllReminders<sup>9+</sup> ## reminderAgentManager.cancelAllReminders
cancelAllReminders(): Promise&lt;void&gt; cancelAllReminders(): Promise&lt;void&gt;
...@@ -319,7 +320,7 @@ try { ...@@ -319,7 +320,7 @@ try {
``` ```
## reminderAgentManager.addNotificationSlot<sup>9+</sup> ## reminderAgentManager.addNotificationSlot
addNotificationSlot(slot: NotificationSlot, callback: AsyncCallback&lt;void&gt;): void addNotificationSlot(slot: NotificationSlot, callback: AsyncCallback&lt;void&gt;): void
...@@ -356,7 +357,7 @@ try { ...@@ -356,7 +357,7 @@ try {
``` ```
## reminderAgentManager.addNotificationSlot<sup>9+</sup> ## reminderAgentManager.addNotificationSlot
addNotificationSlot(slot: NotificationSlot): Promise&lt;void&gt; addNotificationSlot(slot: NotificationSlot): Promise&lt;void&gt;
...@@ -396,7 +397,7 @@ try { ...@@ -396,7 +397,7 @@ try {
``` ```
## reminderAgentManager.removeNotificationSlot<sup>9+</sup> ## reminderAgentManager.removeNotificationSlot
removeNotificationSlot(slotType: notification.SlotType, callback: AsyncCallback&lt;void&gt;): void removeNotificationSlot(slotType: notification.SlotType, callback: AsyncCallback&lt;void&gt;): void
...@@ -430,7 +431,7 @@ try { ...@@ -430,7 +431,7 @@ try {
``` ```
## reminderAgentManager.removeNotificationSlot<sup>9+</sup> ## reminderAgentManager.removeNotificationSlot
removeNotificationSlot(slotType: notification.SlotType): Promise&lt;void&gt; removeNotificationSlot(slotType: notification.SlotType): Promise&lt;void&gt;
...@@ -466,7 +467,7 @@ try { ...@@ -466,7 +467,7 @@ try {
}; };
``` ```
## ActionButtonType<sup>9+</sup> ## ActionButtonType
按钮的类型。 按钮的类型。
...@@ -478,7 +479,7 @@ try { ...@@ -478,7 +479,7 @@ try {
| ACTION_BUTTON_TYPE_SNOOZE | 1 | 表示延迟提醒的按钮。 | | ACTION_BUTTON_TYPE_SNOOZE | 1 | 表示延迟提醒的按钮。 |
## ReminderType<sup>9+</sup> ## ReminderType
提醒的类型。 提醒的类型。
...@@ -491,7 +492,7 @@ try { ...@@ -491,7 +492,7 @@ try {
| REMINDER_TYPE_ALARM | 2 | 表示提醒类型:闹钟。 | | REMINDER_TYPE_ALARM | 2 | 表示提醒类型:闹钟。 |
## ActionButton<sup>9+</sup> ## ActionButton
用于设置弹出的提醒通知信息上显示的按钮类型和标题。 用于设置弹出的提醒通知信息上显示的按钮类型和标题。
...@@ -503,7 +504,7 @@ try { ...@@ -503,7 +504,7 @@ try {
| type | [ActionButtonType](#actionbuttontype) | 是 | 按钮的类型。 | | type | [ActionButtonType](#actionbuttontype) | 是 | 按钮的类型。 |
## WantAgent<sup>9+</sup> ## WantAgent
点击提醒通知后跳转的目标ability信息。 点击提醒通知后跳转的目标ability信息。
...@@ -515,7 +516,7 @@ try { ...@@ -515,7 +516,7 @@ try {
| abilityName | string | 是 | 指明点击提醒通知栏后跳转的目标ability名称。 | | abilityName | string | 是 | 指明点击提醒通知栏后跳转的目标ability名称。 |
## MaxScreenWantAgent<sup>9+</sup> ## MaxScreenWantAgent
全屏显示提醒到达时自动拉起的目标ability信息,该接口预留。 全屏显示提醒到达时自动拉起的目标ability信息,该接口预留。
...@@ -527,7 +528,7 @@ try { ...@@ -527,7 +528,7 @@ try {
| abilityName | string | 是 | 指明提醒到达时自动拉起的目标ability名(如果设备在使用中,则只弹出通知横幅框)。 | | abilityName | string | 是 | 指明提醒到达时自动拉起的目标ability名(如果设备在使用中,则只弹出通知横幅框)。 |
## ReminderRequest<sup>9+</sup> ## ReminderRequest
提醒实例对象,用于设置提醒类型、响铃时长等具体信息。 提醒实例对象,用于设置提醒类型、响铃时长等具体信息。
...@@ -550,7 +551,7 @@ try { ...@@ -550,7 +551,7 @@ try {
| slotType | [notification.SlotType](js-apis-notification.md#slottype) | 否 | 指明提醒的slot类型。 | | slotType | [notification.SlotType](js-apis-notification.md#slottype) | 否 | 指明提醒的slot类型。 |
## ReminderRequestCalendar<sup>9+</sup> ## ReminderRequestCalendar
ReminderRequestCalendar extends ReminderRequest ReminderRequestCalendar extends ReminderRequest
...@@ -565,7 +566,7 @@ ReminderRequestCalendar extends ReminderRequest ...@@ -565,7 +566,7 @@ ReminderRequestCalendar extends ReminderRequest
| repeatDays | Array&lt;number&gt; | 否 | 指明重复提醒的日期。 | | repeatDays | Array&lt;number&gt; | 否 | 指明重复提醒的日期。 |
## ReminderRequestAlarm<sup>9+</sup> ## ReminderRequestAlarm
ReminderRequestAlarm extends ReminderRequest ReminderRequestAlarm extends ReminderRequest
...@@ -580,7 +581,7 @@ ReminderRequestAlarm extends ReminderRequest ...@@ -580,7 +581,7 @@ ReminderRequestAlarm extends ReminderRequest
| daysOfWeek | Array&lt;number&gt; | 否 | 指明每周哪几天需要重复提醒。 | | daysOfWeek | Array&lt;number&gt; | 否 | 指明每周哪几天需要重复提醒。 |
## ReminderRequestTimer<sup>9+</sup> ## ReminderRequestTimer
ReminderRequestTimer extends ReminderRequest ReminderRequestTimer extends ReminderRequest
...@@ -593,7 +594,7 @@ ReminderRequestTimer extends ReminderRequest ...@@ -593,7 +594,7 @@ ReminderRequestTimer extends ReminderRequest
| triggerTimeInSeconds | number | 是 | 指明倒计时的秒数。 | | triggerTimeInSeconds | number | 是 | 指明倒计时的秒数。 |
## LocalDateTime<sup>9+</sup> ## LocalDateTime
用于日历类提醒设置时指定时间信息。 用于日历类提醒设置时指定时间信息。
......
...@@ -2,50 +2,78 @@ ...@@ -2,50 +2,78 @@
## 1700001 通知使能未开启 ## 1700001 通知使能未开启
### 错误信息 **错误信息**
Notification does not enable. Notification does not enable.
### 可能原因 **错误描述**
当调用发布提醒接口时,未允许应用发送通知。
**可能原因**
1. 未申请通知使能。 1. 未申请通知使能。
2. 通知使能被关闭。 2. 通知使能被关闭。
### 处理步骤 **处理步骤**
1. 申请通知使能弹窗[Notification.requestEnableNotification](../apis/js-apis-notification.md#notificationrequestenablenotification8) 1. 申请通知使能弹窗[Notification.requestEnableNotification](../apis/js-apis-notification.md#notificationrequestenablenotification8)
2. 检查通知使能是否被关闭。 2. 检查通知使能是否被关闭。
## 1700002 提醒数量超出限制 ## 1700002 提醒数量超出限制
### 错误信息 **错误信息**
The number of reminders exceeds the limit. The number of reminders exceeds the limit.
### 可能原因 **错误描述**
当调用发布提醒接口时,提醒数量超出最大限制。
**可能原因**
1. 当前系统提醒超过2000个。 1. 当前系统提醒超过2000个。
2. 当前应用提醒超过30个。 2. 当前应用提醒超过30个。
### 处理步骤 **处理步骤**
删除不必要的提醒
删除不必要的提醒。
## 1700003 提醒不存在 ## 1700003 提醒不存在
### 错误信息 **错误信息**
The reminder does not exist. The reminder does not exist.
### 可能原因 **错误描述**
当调用取消提醒接口时,未找到对应的提醒。
**可能原因**
1. 提醒已过期。 1. 提醒已过期。
2. 提醒已被删除。 2. 提醒已被删除。
### 处理步骤 **处理步骤**
1. 检查提醒是否有效。 1. 检查提醒是否有效。
2. 检查提醒是否已被删除。 2. 检查提醒是否已被删除。
## 1700004 包名不存在 ## 1700004 包名不存在
### 错误信息 **错误信息**
The package name does not exist. The package name does not exist.
### 可能原因 **错误描述**
未找到传入的包名信息。
**可能原因**
1. 包名不正确。 1. 包名不正确。
2. 应用未安装。 2. 应用未安装。
### 处理步骤 **处理步骤**
检查应用包名是否存在。 检查应用包名是否存在。
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
reminderAgentManager:封装了发布、取消提醒类通知的方法。 reminderAgentManager:封装了发布、取消提醒类通知的方法。
具体后台提醒相关功能接口请见[后台代理提醒](../reference/apis/js-apis-reminderAgent.md) 具体后台提醒相关功能接口请见[后台代理提醒](../reference/apis/js-apis-reminderAgentManager.md)
**表1** reminderAgentManager主要接口 **表1** reminderAgentManager主要接口
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册