提交 eda70d49 编写于 作者: G Gloria

Update docs against 18367

Signed-off-by: wusongqing<wusongqing@huawei.com>
上级 827ee354
# @ohos.reminderAgent (Reminder Agent)
# @ohos.reminderAgent (reminderAgent)
The **reminderAgent** module provides APIs for publishing scheduled reminders through the reminder agent.
......@@ -13,19 +13,21 @@ You can use the APIs to create scheduled reminders for countdown timers, calenda
## Modules to Import
```ts
```js
import reminderAgent from'@ohos.reminderAgent';
```
## reminderAgent.publishReminder
## reminderAgent.publishReminder<sup>(deprecated)</sup>
```ts
publishReminder(reminderReq: ReminderRequest, callback: AsyncCallback<number>): void
```
publishReminder(reminderReq: ReminderRequest, callback: AsyncCallback&lt;number&gt;): void
Publishes a reminder through the reminder agent. This API uses an asynchronous callback to return the result. It can be called only when notification is enabled for the application through [Notification.requestEnableNotification](js-apis-notification.md#notificationrequestenablenotification8).
> **NOTE**
>
> This API is supported since API version 7 and deprecated since API version 9. You are advised to use [reminderAgentManager.publishReminder](js-apis-reminderAgentManager.md#reminderagentmanagerpublishreminder).
**Required permissions**: ohos.permission.PUBLISH_AGENT_REMINDER
**System capability**: SystemCapability.Notification.ReminderAgent
......@@ -35,29 +37,30 @@ Publishes a reminder through the reminder agent. This API uses an asynchronous c
| Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
| reminderReq | [ReminderRequest](#reminderrequest) | Yes| Reminder to be published.|
| callback | AsyncCallback\<number\> | Yes| Callback used to return the published reminder's ID.|
| callback | AsyncCallback&lt;number&gt; | Yes| Callback used to return the published reminder's ID.|
**Example**
```ts
```js
let timer = {
reminderType: reminderAgent.ReminderType.REMINDER_TYPE_TIMER,
triggerTimeInSeconds: 10
}
reminderAgent.publishReminder(timer, (err, reminderId) => {
console.log("callback, reminderId = " + reminderId);
});
```
## reminderAgent.publishReminder
## reminderAgent.publishReminder<sup>(deprecated)</sup>
```ts
publishReminder(reminderReq: ReminderRequest): Promise<number>
```
publishReminder(reminderReq: ReminderRequest): Promise&lt;number&gt;
Publishes a reminder through the reminder agent. This API uses a promise to return the result. It can be called only when notification is enabled for the application through [Notification.requestEnableNotification](js-apis-notification.md#notificationrequestenablenotification8).
> **NOTE**
>
> This API is supported since API version 7 and deprecated since API version 9. You are advised to use [reminderAgentManager.publishReminder](js-apis-reminderAgentManager.md#reminderagentmanagerpublishreminder-1).
**Required permissions**: ohos.permission.PUBLISH_AGENT_REMINDER
**System capability**: SystemCapability.Notification.ReminderAgent
......@@ -70,29 +73,30 @@ Publishes a reminder through the reminder agent. This API uses a promise to retu
**Return value**
| Type| Description|
| -------- | -------- |
| Promise\<number\> | Promise used to return the published reminder's ID.|
| Promise&lt;number&gt; | Promise used to return the published reminder's ID.|
**Example**
```ts
```js
let timer = {
reminderType: reminderAgent.ReminderType.REMINDER_TYPE_TIMER,
triggerTimeInSeconds: 10
}
reminderAgent.publishReminder(timer).then((reminderId) => {
console.log("promise, reminderId = " + reminderId);
});
```
## reminderAgent.cancelReminder
## reminderAgent.cancelReminder<sup>(deprecated)</sup>
```ts
cancelReminder(reminderId: number, callback: AsyncCallback<void>): void
```
cancelReminder(reminderId: number, callback: AsyncCallback&lt;void&gt;): void
Cancels the reminder with the specified ID. This API uses an asynchronous callback to return the cancellation result.
> **NOTE**
>
> This API is supported since API version 7 and deprecated since API version 9. You are advised to use [reminderAgentManager.cancelReminder](js-apis-reminderAgentManager.md#reminderagentmanagercancelreminder).
**System capability**: SystemCapability.Notification.ReminderAgent
**Parameters**
......@@ -100,25 +104,27 @@ Cancels the reminder with the specified ID. This API uses an asynchronous callba
| Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
| reminderId | number | Yes| ID of the reminder to cancel. The value is obtained by calling [publishReminder](#reminderagentpublishreminder).|
| callback | AsyncCallback\<void\> | Yes| Asynchronous callback used to return the result.|
| callback | AsyncCallback&lt;void&gt; | Yes| Callback used to return the result.|
**Example**
```ts
```js
reminderAgent.cancelReminder(1, (err, data) => {
console.log("cancelReminder callback");
});
```
## reminderAgent.cancelReminder
## reminderAgent.cancelReminder<sup>(deprecated)</sup>
```ts
cancelReminder(reminderId: number): Promise<void>
```
cancelReminder(reminderId: number): Promise\<void>
Cancels the reminder with the specified ID. This API uses a promise to return the cancellation result.
> **NOTE**
>
> This API is supported since API version 7 and deprecated since API version 9. You are advised to use [reminderAgentManager.cancelReminder](js-apis-reminderAgentManager.md#reminderagentmanagercancelreminder-1).
**System capability**: SystemCapability.Notification.ReminderAgent
**Parameters**
......@@ -131,35 +137,37 @@ Cancels the reminder with the specified ID. This API uses a promise to return th
| Type| Description|
| -------- | -------- |
| Promise\<void\> | Promise used to return the result.|
| Promise&lt;void&gt; | Promise used to return the result.|
**Example**
```ts
```js
reminderAgent.cancelReminder(1).then(() => {
console.log("cancelReminder promise");
});
```
## reminderAgent.getValidReminders
## reminderAgent.getValidReminders<sup>(deprecated)</sup>
```ts
getValidReminders(callback: AsyncCallback<Array<ReminderRequest>>): void
```
getValidReminders(callback: AsyncCallback\<Array\<ReminderRequest>>): void
Obtains all valid (not yet expired) reminders set by the current application. This API uses an asynchronous callback to return the reminders.
> **NOTE**
>
> This API is supported since API version 7 and deprecated since API version 9. You are advised to use [reminderAgentManager.getValidReminders](js-apis-reminderAgentManager.md#reminderagentmanagergetvalidreminders).
**System capability**: SystemCapability.Notification.ReminderAgent
**Parameters**
| Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
| callback | AsyncCallback\<Array\<[ReminderRequest](#reminderrequest)\>\> | Yes| Asynchronous callback used to return an array of all valid reminders set by the current application.|
| callback | AsyncCallback&lt;Array&lt;[ReminderRequest](#reminderrequest)&gt;&gt; | Yes| Callback used to return an array of all valid reminders set by the current application.|
**Example**
```ts
```js
reminderAgent.getValidReminders((err, reminders) => {
console.log("callback, getValidReminders length = " + reminders.length);
for (let i = 0; i < reminders.length; i++) {
......@@ -187,25 +195,27 @@ reminderAgent.getValidReminders((err, reminders) => {
```
## reminderAgent.getValidReminders
## reminderAgent.getValidReminders<sup>(deprecated)</sup>
```ts
getValidReminders(): Promise<Array<ReminderRequest>>
```
getValidReminders(): Promise\<Array\<ReminderRequest>>
Obtains all valid (not yet expired) reminders set by the current application. This API uses a promise to return the reminders.
> **NOTE**
>
> This API is supported since API version 7 and deprecated since API version 9. You are advised to use [reminderAgentManager.getValidReminders](js-apis-reminderAgentManager.md#reminderagentmanagergetvalidreminders-1).
**System capability**: SystemCapability.Notification.ReminderAgent
**Return value**
| Type| Description|
| -------- | -------- |
| Promise\<Array\<[ReminderRequest](#reminderrequest)\>\> | Promise used to return an array of all valid reminders set by the current application.|
| Promise&lt;Array&lt;[ReminderRequest](#reminderrequest)&gt;&gt; | Promise used to return an array of all valid reminders set by the current application.|
**Example**
```ts
```js
reminderAgent.getValidReminders().then((reminders) => {
console.log("promise, getValidReminders length = " + reminders.length);
for (let i = 0; i < reminders.length; i++) {
......@@ -233,63 +243,70 @@ reminderAgent.getValidReminders().then((reminders) => {
```
## reminderAgent.cancelAllReminders
## reminderAgent.cancelAllReminders<sup>(deprecated)</sup>
```ts
cancelAllReminders(callback: AsyncCallback<void>): void
```
cancelAllReminders(callback: AsyncCallback&lt;void&gt;): void
Cancels all reminders set by the current application. This API uses an asynchronous callback to return the cancellation result.
> **NOTE**
>
> This API is supported since API version 7 and deprecated since API version 9. You are advised to use [reminderAgentManager.cancelAllReminders](js-apis-reminderAgentManager.md#reminderagentmanagercancelallreminders).
**System capability**: SystemCapability.Notification.ReminderAgent
**Parameters**
| Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
| callback | AsyncCallback\<void\> | Yes| Asynchronous callback used to return the result.|
| callback | AsyncCallback&lt;void&gt; | Yes| Callback used to return the result.|
**Example**
```ts
```js
reminderAgent.cancelAllReminders((err, data) =>{
console.log("cancelAllReminders callback")
})
```
## reminderAgent.cancelAllReminders
## reminderAgent.cancelAllReminders<sup>(deprecated)</sup>
```ts
cancelAllReminders(): Promise<void>
```
cancelAllReminders(): Promise\<void>
Cancels all reminders set by the current application. This API uses a promise to return the cancellation result.
> **NOTE**
>
> This API is supported since API version 7 and deprecated since API version 9. You are advised to use [reminderAgentManager.cancelAllReminders](js-apis-reminderAgentManager.md#reminderagentmanagercancelallreminders-1).
**System capability**: SystemCapability.Notification.ReminderAgent
**Return value**
| Type| Description|
| -------- | -------- |
| Promise\<void\> | Promise used to return the result.|
| Promise&lt;void&gt; | Promise used to return the result.|
**Example**
```ts
```js
reminderAgent.cancelAllReminders().then(() => {
console.log("cancelAllReminders promise")
})
```
## reminderAgent.addNotificationSlot
```ts
addNotificationSlot(slot: NotificationSlot, callback: AsyncCallback<void>): void
```
addNotificationSlot(slot: NotificationSlot, callback: AsyncCallback&lt;void&gt;): void
Adds a notification slot. This API uses an asynchronous callback to return the result.
> **NOTE**
>
> This API is supported since API version 7 and deprecated since API version 9. You are advised to use [reminderAgentManager.addNotificationSlot](js-apis-reminderAgentManager.md#reminderagentmanageraddnotificationslot).
**System capability**: SystemCapability.Notification.ReminderAgent
**Parameters**
......@@ -297,11 +314,11 @@ Adds a notification slot. This API uses an asynchronous callback to return the r
| Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
| slot | [NotificationSlot](js-apis-notification.md#notificationslot) | Yes| Notification slot, whose type can be set.|
| callback | AsyncCallback\<void\> | Yes| Asynchronous callback used to return the result.|
| callback | AsyncCallback&lt;void&gt; | Yes| Callback used to return the result.|
**Example**
```ts
```js
import notification from '@ohos.notification'
let mySlot = {
......@@ -313,14 +330,16 @@ reminderAgent.addNotificationSlot(mySlot, (err, data) => {
```
## reminderAgent.addNotificationSlot
## reminderAgent.addNotificationSlot<sup>(deprecated)</sup>
```ts
addNotificationSlot(slot: NotificationSlot): Promise<void>
```
addNotificationSlot(slot: NotificationSlot): Promise\<void>
Adds a notification slot. This API uses a promise to return the result.
> **NOTE**
>
> This API is supported since API version 7 and deprecated since API version 9. You are advised to use [reminderAgentManager.addNotificationSlot](js-apis-reminderAgentManager.md#reminderagentmanageraddnotificationslot-1).
**System capability**: SystemCapability.Notification.ReminderAgent
**Parameters**
......@@ -333,11 +352,11 @@ Adds a notification slot. This API uses a promise to return the result.
| Type| Description|
| -------- | -------- |
| Promise\<void\> | Promise used to return the result.|
| Promise&lt;void&gt; | Promise used to return the result.|
**Example**
```ts
```js
import notification from '@ohos.notification'
let mySlot = {
......@@ -349,26 +368,28 @@ reminderAgent.addNotificationSlot(mySlot).then(() => {
```
## reminderAgent.removeNotificationSlot
## reminderAgent.removeNotificationSlot<sup>(deprecated)</sup>
```ts
removeNotificationSlot(slotType: notification.SlotType, callback: AsyncCallback<void>): void
```
removeNotificationSlot(slotType: notification.SlotType, callback: AsyncCallback&lt;void&gt;): void
Removes a notification slot of a specified type. This API uses an asynchronous callback to return the result.
> **NOTE**
>
> This API is supported since API version 7 and deprecated since API version 9. You are advised to use [reminderAgentManager.removeNotificationSlot](js-apis-reminderAgentManager.md#reminderagentmanagerremovenotificationslot).
**System capability**: SystemCapability.Notification.ReminderAgent
**Parameters**
| Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
| slotType | [notification.SlotType](js-apis-notification.md#slottype) | Yes| Type of the reminder notification slot to remove.|
| callback | AsyncCallback\<void\> | Yes| Asynchronous callback used to return the result.|
| slotType | [notification.SlotType](js-apis-notification.md#slottype) | Yes| Type of the notification slot to remove.|
| callback | AsyncCallback&lt;void&gt; | Yes| Callback used to return the result.|
**Example**
```ts
```js
import notification from '@ohos.notification'
reminderAgent.removeNotificationSlot(notification.SlotType.CONTENT_INFORMATION, (err, data) => {
......@@ -377,31 +398,33 @@ reminderAgent.removeNotificationSlot(notification.SlotType.CONTENT_INFORMATION,
```
## reminderAgent.removeNotificationSlot
## reminderAgent.removeNotificationSlot<sup>(deprecated)</sup>
```ts
removeNotificationSlot(slotType: notification.SlotType): Promise<void>
```
removeNotificationSlot(slotType: notification.SlotType): Promise&lt;void&gt;
Removes a notification slot of a specified type. This API uses a promise to return the result.
> **NOTE**
>
> This API is supported since API version 7 and deprecated since API version 9. You are advised to use [reminderAgentManager.removeNotificationSlot](js-apis-reminderAgentManager.md#reminderagentmanagerremovenotificationslot-1).
**System capability**: SystemCapability.Notification.ReminderAgent
**Parameters**
| Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
| slotType | [notification.SlotType](js-apis-notification.md#slottype) | Yes| Type of the reminder notification slot to remove.|
| slotType | [notification.SlotType](js-apis-notification.md#slottype) | Yes| Type of the notification slot to remove.|
**Return value**
| Type| Description|
| -------- | -------- |
| Promise\<void\> | Promise used to return the result.|
| Promise&lt;void&gt; | Promise used to return the result.|
**Example**
```ts
```js
import notification from '@ohos.notification'
reminderAgent.removeNotificationSlot(notification.SlotType.CONTENT_INFORMATION).then(() => {
......@@ -410,10 +433,14 @@ reminderAgent.removeNotificationSlot(notification.SlotType.CONTENT_INFORMATION).
```
## ActionButtonType
## ActionButtonType<sup>(deprecated)</sup>
Enumerates button types.
> **NOTE**
>
> This API is supported since API version 7 and deprecated since API version 9. You are advised to use [reminderAgentManager.ActionButtonType](js-apis-reminderAgentManager.md#ActionButtonType).
**System capability**: SystemCapability.Notification.ReminderAgent
| Name| Value| Description|
......@@ -422,10 +449,14 @@ Enumerates button types.
| ACTION_BUTTON_TYPE_SNOOZE | 1 | Button for snoozing the reminder.|
## ReminderType
## ReminderType<sup>(deprecated)</sup>
Enumerates reminder types.
> **NOTE**
>
> This API is supported since API version 7 and deprecated since API version 9. You are advised to use [reminderAgentManager.ReminderType](js-apis-reminderAgentManager.md#ReminderType).
**System capability**: SystemCapability.Notification.ReminderAgent
| Name| Value| Description|
......@@ -435,10 +466,14 @@ Enumerates reminder types.
| REMINDER_TYPE_ALARM | 2 | Alarm reminder.|
## ActionButton
## ActionButton<sup>(deprecated)</sup>
Defines a button displayed in the reminder notification.
> **NOTE**
>
> This API is supported since API version 7 and deprecated since API version 9. You are advised to use [reminderAgentManager.ActionButton](js-apis-reminderAgentManager.md#ActionButton).
**System capability**: SystemCapability.Notification.ReminderAgent
| Name| Type| Mandatory| Description|
......@@ -447,34 +482,46 @@ Defines a button displayed in the reminder notification.
| type | [ActionButtonType](#actionbuttontype) | Yes| Button type.|
## WantAgent
## WantAgent<sup>(deprecated)</sup>
Sets the package and ability that are redirected to when the reminder notification is clicked.
> **NOTE**
>
> This API is supported since API version 7 and deprecated since API version 9. You are advised to use [reminderAgentManager.WantAgent](js-apis-reminderAgentManager.md#WantAgent).
**System capability**: SystemCapability.Notification.ReminderAgent
| Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
| pkgName | string | Yes| Name of the HAP that is redirected to when the reminder notification is clicked.|
| pkgName | string | Yes| Name of the package that is redirected to when the reminder notification is clicked.|
| abilityName | string | Yes| Name of the ability that is redirected to when the reminder notification is clicked.|
## MaxScreenWantAgent
## MaxScreenWantAgent<sup>(deprecated)</sup>
Provides the information about the target package and ability to start automatically when the reminder is displayed in full-screen mode. This API is reserved.
> **NOTE**
>
> This API is supported since API version 7 and deprecated since API version 9. You are advised to use [reminderAgentManager.MaxScreenWantAgent](js-apis-reminderAgentManager.md#MaxScreenWantAgent).
**System capability**: SystemCapability.Notification.ReminderAgent
| Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
| pkgName | string | Yes| Name of the HAP that is automatically started when the reminder arrives and the device is not in use.|
| pkgName | string | Yes| Name of the package that is automatically started when the reminder arrives and the device is not in use.|
| abilityName | string | Yes| Name of the ability that is automatically started when the reminder arrives and the device is not in use.|
## ReminderRequest
## ReminderRequest<sup>(deprecated)</sup>
Defines the reminder to publish.
> **NOTE**
>
> This API is supported since API version 7 and deprecated since API version 9. You are advised to use [reminderAgentManager.ReminderRequest](js-apis-reminderAgentManager.md#ReminderRequest).
**System capability**: SystemCapability.Notification.ReminderAgent
| Name| Type| Mandatory| Description|
......@@ -494,42 +541,54 @@ Defines the reminder to publish.
| slotType | [notification.SlotType](js-apis-notification.md#slottype) | No| Type of the slot used by the reminder.|
## ReminderRequestCalendar
## ReminderRequestCalendar<sup>(deprecated)</sup>
ReminderRequestCalendar extends ReminderRequest
Defines a reminder for a calendar event.
> **NOTE**
>
> This API is supported since API version 7 and deprecated since API version 9. You are advised to use [reminderAgentManager.ReminderRequestCalendar](js-apis-reminderAgentManager.md#ReminderRequestCalendar).
**System capability**: SystemCapability.Notification.ReminderAgent
| Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
| dateTime | [LocalDateTime](#localdatetime) | Yes| Reminder time.|
| repeatMonths | Array\<number\> | No| Month in which the reminder repeats.|
| repeatDays | Array\<number\> | No| Date on which the reminder repeats.|
| repeatMonths | Array&lt;number&gt; | No| Month in which the reminder repeats.|
| repeatDays | Array&lt;number&gt; | No| Date on which the reminder repeats.|
## ReminderRequestAlarm
## ReminderRequestAlarm<sup>(deprecated)</sup>
ReminderRequestAlarm extends ReminderRequest
Defines a reminder for an alarm.
> **NOTE**
>
> This API is supported since API version 7 and deprecated since API version 9. You are advised to use [reminderAgentManager.ReminderRequestAlarm](js-apis-reminderAgentManager.md#ReminderRequestAlarm).
**System capability**: SystemCapability.Notification.ReminderAgent
| Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
| hour | number | Yes| Hour portion of the reminder time.|
| minute | number | Yes| Minute portion of the reminder time.|
| daysOfWeek | Array\<number\> | No| Days of a week when the reminder repeats. The value ranges from 1 to 7, corresponding to the data from Monday to Sunday.|
| daysOfWeek | Array&lt;number&gt; | No| Days of a week when the reminder repeats. The value ranges from 1 to 7, corresponding to the data from Monday to Sunday.|
## ReminderRequestTimer
## ReminderRequestTimer<sup>(deprecated)</sup>
ReminderRequestTimer extends ReminderRequest
Defines a reminder for a scheduled timer.
> **NOTE**
>
> This API is supported since API version 7 and deprecated since API version 9. You are advised to use [reminderAgentManager.ReminderRequestTimer](js-apis-reminderAgentManager.md#ReminderRequestTimer).
**System capability**: SystemCapability.Notification.ReminderAgent
| Name| Type| Mandatory| Description|
......@@ -537,10 +596,14 @@ Defines a reminder for a scheduled timer.
| triggerTimeInSeconds | number | Yes| Number of seconds in the countdown timer.|
## LocalDateTime
## LocalDateTime<sup>(deprecated)</sup>
Sets the time information for a calendar reminder.
> **NOTE**
>
> This API is supported since API version 7 and deprecated since API version 9. You are advised to use [reminderAgentManager.LocalDateTime](js-apis-reminderAgentManager.md#LocalDateTime).
**System capability**: SystemCapability.Notification.ReminderAgent
| Name| Type| Mandatory| Description|
......
......@@ -122,7 +122,7 @@ Cancels the reminder with the specified ID. This API uses an asynchronous callba
| Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
| reminderId | number | Yes| ID of the reminder to cancel.|
| callback | AsyncCallback&lt;void&gt; | Yes| Asynchronous callback used to return the result.|
| callback | AsyncCallback&lt;void&gt; | Yes| Callback used to return the result.|
**Error codes**
......@@ -324,7 +324,7 @@ Cancels all reminders set by the current application. This API uses an asynchron
| Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
| callback | AsyncCallback&lt;void&gt; | Yes| Asynchronous callback used to return the result.|
| callback | AsyncCallback&lt;void&gt; | Yes| Callback used to return the result.|
**Error codes**
......@@ -401,7 +401,7 @@ Adds a notification slot. This API uses an asynchronous callback to return the r
| Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
| slot | [NotificationSlot](js-apis-notification.md#notificationslot) | Yes| Notification slot, whose type can be set.|
| callback | AsyncCallback&lt;void&gt; | Yes| Asynchronous callback used to return the result.|
| callback | AsyncCallback&lt;void&gt; | Yes| Callback used to return the result.|
**Example**
......@@ -478,7 +478,7 @@ Removes a notification slot of a specified type. This API uses an asynchronous c
| Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
| slotType | [notification.SlotType](js-apis-notification.md#slottype) | Yes| Type of the notification slot to remove.|
| callback | AsyncCallback&lt;void&gt; | Yes| Asynchronous callback used to return the result.|
| callback | AsyncCallback&lt;void&gt; | Yes| Callback used to return the result.|
**Example**
......@@ -562,7 +562,7 @@ Enumerates reminder types.
## ActionButton
Defines a button displayed in the reminder notification.
Defines a button displayed for the reminder in the notification panel.
**System capability**: SystemCapability.Notification.ReminderAgent
......@@ -580,8 +580,9 @@ Sets the package and ability that are redirected to when the reminder notificati
| Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
| pkgName | string | Yes| Name of the HAP that is redirected to when the reminder notification is clicked.|
| abilityName | string | Yes| Name of the ability that is redirected to when the reminder notification is clicked.|
| pkgName | string | Yes| Name of the target package.|
| abilityName | string | Yes| Name of the target ability.|
| uri | string | No| URI of the target ability. (This is a system API.)|
## MaxScreenWantAgent
......@@ -592,7 +593,7 @@ Provides the information about the target package and ability to start automatic
| Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
| pkgName | string | Yes| Name of the HAP that is automatically started when the reminder arrives and the device is not in use.|
| pkgName | string | Yes| Name of the package that is automatically started when the reminder arrives and the device is not in use.|
| abilityName | string | Yes| Name of the ability that is automatically started when the reminder arrives and the device is not in use.|
......@@ -605,8 +606,8 @@ Defines the reminder to publish.
| Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
| reminderType | [ReminderType](#remindertype) | Yes| Type of the reminder.|
| actionButton | [ActionButton](#actionbutton) | No| Button displayed in the reminder notification. (The parameter is optional. Up to two buttons are supported.)|
| wantAgent | [WantAgent](#wantagent) | No| Information about the ability that is redirected to when the notification is clicked.|
| actionButton | [ActionButton](#actionbutton) | No| Button displayed for the reminder in the notification panel. (A maximum of two buttons are supported.)|
| wantAgent | [WantAgent](#wantagent) | No| Information about the ability that is redirected to when the reminder is clicked.|
| maxScreenWantAgent | [MaxScreenWantAgent](#maxscreenwantagent) | No| Information about the ability that is automatically started when the reminder arrives. If the device is in use, a notification will be displayed.|
| ringDuration | number | No| Ringing duration, in seconds. The default value is **1**.|
| snoozeTimes | number | No| Number of reminder snooze times. The default value is **0**.|
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册