未验证 提交 6be67731 编写于 作者: O openharmony_ci 提交者: Gitee

!13458 翻译完成:11213+12282+12382+12492+12864+12867+12508 提醒代理文档一致性修改

Merge pull request !13458 from wusongqing/TR12213
# reminderAgent # @ohos.reminderAgent
The **reminderAgent** module provides APIs for publishing scheduled reminders through the reminder agent. The **reminderAgent** module provides APIs for publishing scheduled reminders through the reminder agent.
You can set your application to use the reminder agent APIs to create scheduled reminders for countdown timers, calendar events, and alarm clocks. When the created reminders are published, the timing and pop-up notification functions of your application will be taken over by the reminder agent in the background when your application is frozen or exits. You can use the APIs to create scheduled reminders for countdown timers, calendar events, and alarm clocks. When the created reminders are published, the timing and pop-up notification functions of your application will be taken over by the reminder agent in the background when your application is frozen or exits.
> **NOTE** > **NOTE**
> >
...@@ -13,14 +13,16 @@ You can set your application to use the reminder agent APIs to create scheduled ...@@ -13,14 +13,16 @@ You can set your application to use the reminder agent APIs to create scheduled
## Modules to Import ## Modules to Import
```js ```ts
import reminderAgent from'@ohos.reminderAgent'; import reminderAgent from'@ohos.reminderAgent';
``` ```
## reminderAgent.publishReminder ## reminderAgent.publishReminder
publishReminder(reminderReq: ReminderRequest, callback: AsyncCallback<number>): void ```ts
publishReminder(reminderReq: ReminderRequest, callback: AsyncCallback<number>): 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). 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).
...@@ -33,14 +35,15 @@ Publishes a reminder through the reminder agent. This API uses an asynchronous c ...@@ -33,14 +35,15 @@ Publishes a reminder through the reminder agent. This API uses an asynchronous c
| Name| Type| Mandatory| Description| | Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
| reminderReq | [ReminderRequest](#reminderrequest) | Yes| Reminder to be published.| | reminderReq | [ReminderRequest](#reminderrequest) | Yes| Reminder to be published.|
| callback | AsyncCallback&lt;number&gt; | Yes| Asynchronous callback used to return the published reminder's ID.| | callback | AsyncCallback\<number\> | Yes| Callback used to return the published reminder's ID.|
**Example** **Example**
```js ```ts
let timer = { let timer = {
reminderType: reminderAgent.ReminderType.REMINDER_TYPE_TIMER, reminderType: reminderAgent.ReminderType.REMINDER_TYPE_TIMER,
triggerTimeInSeconds: 10 triggerTimeInSeconds: 10
} }
reminderAgent.publishReminder(timer, (err, reminderId) => { reminderAgent.publishReminder(timer, (err, reminderId) => {
console.log("callback, reminderId = " + reminderId); console.log("callback, reminderId = " + reminderId);
}); });
...@@ -49,7 +52,9 @@ Publishes a reminder through the reminder agent. This API uses an asynchronous c ...@@ -49,7 +52,9 @@ Publishes a reminder through the reminder agent. This API uses an asynchronous c
## reminderAgent.publishReminder ## reminderAgent.publishReminder
publishReminder(reminderReq: ReminderRequest): Promise&lt;number&gt; ```ts
publishReminder(reminderReq: ReminderRequest): Promise<number>
```
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). 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).
...@@ -65,14 +70,15 @@ Publishes a reminder through the reminder agent. This API uses a promise to retu ...@@ -65,14 +70,15 @@ Publishes a reminder through the reminder agent. This API uses a promise to retu
**Return value** **Return value**
| Type| Description| | Type| Description|
| -------- | -------- | | -------- | -------- |
| Promise&lt;number&gt; | Promise used to return the published reminder's ID.| | Promise\<number\> | Promise used to return the published reminder's ID.|
**Example** **Example**
```js ```ts
let timer = { let timer = {
reminderType: reminderAgent.ReminderType.REMINDER_TYPE_TIMER, reminderType: reminderAgent.ReminderType.REMINDER_TYPE_TIMER,
triggerTimeInSeconds: 10 triggerTimeInSeconds: 10
} }
reminderAgent.publishReminder(timer).then((reminderId) => { reminderAgent.publishReminder(timer).then((reminderId) => {
console.log("promise, reminderId = " + reminderId); console.log("promise, reminderId = " + reminderId);
}); });
...@@ -81,7 +87,9 @@ Publishes a reminder through the reminder agent. This API uses a promise to retu ...@@ -81,7 +87,9 @@ Publishes a reminder through the reminder agent. This API uses a promise to retu
## reminderAgent.cancelReminder ## reminderAgent.cancelReminder
cancelReminder(reminderId: number, callback: AsyncCallback&lt;void&gt;): void ```ts
cancelReminder(reminderId: number, callback: AsyncCallback<void>): void
```
Cancels the reminder with the specified ID. This API uses an asynchronous callback to return the cancellation result. Cancels the reminder with the specified ID. This API uses an asynchronous callback to return the cancellation result.
...@@ -92,11 +100,11 @@ Cancels the reminder with the specified ID. This API uses an asynchronous callba ...@@ -92,11 +100,11 @@ Cancels the reminder with the specified ID. This API uses an asynchronous callba
| Name| Type| Mandatory| Description| | Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
| reminderId | number | Yes| ID of the reminder to cancel. The value is obtained by calling [publishReminder](#reminderagentpublishreminder).| | reminderId | number | Yes| ID of the reminder to cancel. The value is obtained by calling [publishReminder](#reminderagentpublishreminder).|
| callback | AsyncCallback&lt;void&gt; | Yes| Asynchronous callback used to return the result.| | callback | AsyncCallback\<void\> | Yes| Asynchronous callback used to return the result.|
**Example** **Example**
```js ```ts
reminderAgent.cancelReminder(1, (err, data) => { reminderAgent.cancelReminder(1, (err, data) => {
console.log("cancelReminder callback"); console.log("cancelReminder callback");
}); });
...@@ -105,7 +113,9 @@ reminderAgent.cancelReminder(1, (err, data) => { ...@@ -105,7 +113,9 @@ reminderAgent.cancelReminder(1, (err, data) => {
## reminderAgent.cancelReminder ## reminderAgent.cancelReminder
cancelReminder(reminderId: number): Promise&lt;void&gt; ```ts
cancelReminder(reminderId: number): Promise<void>
```
Cancels the reminder with the specified ID. This API uses a promise to return the cancellation result. Cancels the reminder with the specified ID. This API uses a promise to return the cancellation result.
...@@ -121,20 +131,21 @@ Cancels the reminder with the specified ID. This API uses a promise to return th ...@@ -121,20 +131,21 @@ Cancels the reminder with the specified ID. This API uses a promise to return th
| Type| Description| | Type| Description|
| -------- | -------- | | -------- | -------- |
| Promise&lt;void&gt; | Promise used to return the result.| | Promise\<void\> | Promise used to return the result.|
**Example** **Example**
```js ```ts
reminderAgent.cancelReminder(1).then(() => { reminderAgent.cancelReminder(1).then(() => {
console.log("cancelReminder promise"); console.log("cancelReminder promise");
}); });
``` ```
## reminderAgent.getValidReminders ## reminderAgent.getValidReminders
getValidReminders(callback: AsyncCallback&lt;Array&lt;ReminderRequest&gt;&gt;): void ```ts
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. Obtains all valid (not yet expired) reminders set by the current application. This API uses an asynchronous callback to return the reminders.
...@@ -144,11 +155,11 @@ Obtains all valid (not yet expired) reminders set by the current application. Th ...@@ -144,11 +155,11 @@ Obtains all valid (not yet expired) reminders set by the current application. Th
| Name| Type| Mandatory| Description| | Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
| callback | AsyncCallback&lt;Array&lt;[ReminderRequest](#reminderrequest)&gt;&gt; | Yes| Asynchronous callback used to return an array of all valid reminders set by the current application.| | callback | AsyncCallback\<Array\<[ReminderRequest](#reminderrequest)\>\> | Yes| Asynchronous callback used to return an array of all valid reminders set by the current application.|
**Example** **Example**
```js ```ts
reminderAgent.getValidReminders((err, reminders) => { reminderAgent.getValidReminders((err, reminders) => {
console.log("callback, getValidReminders length = " + reminders.length); console.log("callback, getValidReminders length = " + reminders.length);
for (let i = 0; i < reminders.length; i++) { for (let i = 0; i < reminders.length; i++) {
...@@ -178,7 +189,9 @@ reminderAgent.getValidReminders((err, reminders) => { ...@@ -178,7 +189,9 @@ reminderAgent.getValidReminders((err, reminders) => {
## reminderAgent.getValidReminders ## reminderAgent.getValidReminders
getValidReminders(): Promise&lt;Array&lt;ReminderRequest&gt;&gt; ```ts
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. Obtains all valid (not yet expired) reminders set by the current application. This API uses a promise to return the reminders.
...@@ -188,11 +201,11 @@ Obtains all valid (not yet expired) reminders set by the current application. Th ...@@ -188,11 +201,11 @@ Obtains all valid (not yet expired) reminders set by the current application. Th
| Type| Description| | Type| Description|
| -------- | -------- | | -------- | -------- |
| Promise&lt;Array&lt;[ReminderRequest](#reminderrequest)&gt;&gt; | Promise used to return an array of all valid reminders set by the current application.| | Promise\<Array\<[ReminderRequest](#reminderrequest)\>\> | Promise used to return an array of all valid reminders set by the current application.|
**Example** **Example**
```js ```ts
reminderAgent.getValidReminders().then((reminders) => { reminderAgent.getValidReminders().then((reminders) => {
console.log("promise, getValidReminders length = " + reminders.length); console.log("promise, getValidReminders length = " + reminders.length);
for (let i = 0; i < reminders.length; i++) { for (let i = 0; i < reminders.length; i++) {
...@@ -222,7 +235,9 @@ reminderAgent.getValidReminders().then((reminders) => { ...@@ -222,7 +235,9 @@ reminderAgent.getValidReminders().then((reminders) => {
## reminderAgent.cancelAllReminders ## reminderAgent.cancelAllReminders
cancelAllReminders(callback: AsyncCallback&lt;void&gt;): void ```ts
cancelAllReminders(callback: AsyncCallback<void>): void
```
Cancels all reminders set by the current application. This API uses an asynchronous callback to return the cancellation result. Cancels all reminders set by the current application. This API uses an asynchronous callback to return the cancellation result.
...@@ -232,11 +247,11 @@ Cancels all reminders set by the current application. This API uses an asynchron ...@@ -232,11 +247,11 @@ Cancels all reminders set by the current application. This API uses an asynchron
| Name| Type| Mandatory| Description| | Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
| callback | AsyncCallback&lt;void&gt; | Yes| Asynchronous callback used to return the result.| | callback | AsyncCallback\<void\> | Yes| Asynchronous callback used to return the result.|
**Example** **Example**
```js ```ts
reminderAgent.cancelAllReminders((err, data) =>{ reminderAgent.cancelAllReminders((err, data) =>{
console.log("cancelAllReminders callback") console.log("cancelAllReminders callback")
}) })
...@@ -245,7 +260,9 @@ reminderAgent.cancelAllReminders((err, data) =>{ ...@@ -245,7 +260,9 @@ reminderAgent.cancelAllReminders((err, data) =>{
## reminderAgent.cancelAllReminders ## reminderAgent.cancelAllReminders
cancelAllReminders(): Promise&lt;void&gt; ```ts
cancelAllReminders(): Promise<void>
```
Cancels all reminders set by the current application. This API uses a promise to return the cancellation result. Cancels all reminders set by the current application. This API uses a promise to return the cancellation result.
...@@ -255,20 +272,21 @@ Cancels all reminders set by the current application. This API uses a promise to ...@@ -255,20 +272,21 @@ Cancels all reminders set by the current application. This API uses a promise to
| Type| Description| | Type| Description|
| -------- | -------- | | -------- | -------- |
| Promise&lt;void&gt; | Promise used to return the result.| | Promise\<void\> | Promise used to return the result.|
**Example** **Example**
```js ```ts
reminderAgent.cancelAllReminders().then(() => { reminderAgent.cancelAllReminders().then(() => {
console.log("cancelAllReminders promise") console.log("cancelAllReminders promise")
}) })
``` ```
## reminderAgent.addNotificationSlot ## reminderAgent.addNotificationSlot
addNotificationSlot(slot: NotificationSlot, callback: AsyncCallback&lt;void&gt;): void ```ts
addNotificationSlot(slot: NotificationSlot, callback: AsyncCallback<void>): void
```
Adds a notification slot. This API uses an asynchronous callback to return the result. Adds a notification slot. This API uses an asynchronous callback to return the result.
...@@ -279,11 +297,11 @@ Adds a notification slot. This API uses an asynchronous callback to return the r ...@@ -279,11 +297,11 @@ Adds a notification slot. This API uses an asynchronous callback to return the r
| Name| Type| Mandatory| Description| | Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
| slot | [NotificationSlot](js-apis-notification.md#notificationslot) | Yes| Notification slot, whose type can be set.| | 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\<void\> | Yes| Asynchronous callback used to return the result.|
**Example** **Example**
```js ```ts
import notification from '@ohos.notification' import notification from '@ohos.notification'
let mySlot = { let mySlot = {
...@@ -297,7 +315,9 @@ reminderAgent.addNotificationSlot(mySlot, (err, data) => { ...@@ -297,7 +315,9 @@ reminderAgent.addNotificationSlot(mySlot, (err, data) => {
## reminderAgent.addNotificationSlot ## reminderAgent.addNotificationSlot
addNotificationSlot(slot: NotificationSlot): Promise&lt;void&gt; ```ts
addNotificationSlot(slot: NotificationSlot): Promise<void>
```
Adds a notification slot. This API uses a promise to return the result. Adds a notification slot. This API uses a promise to return the result.
...@@ -313,11 +333,11 @@ Adds a notification slot. This API uses a promise to return the result. ...@@ -313,11 +333,11 @@ Adds a notification slot. This API uses a promise to return the result.
| Type| Description| | Type| Description|
| -------- | -------- | | -------- | -------- |
| Promise&lt;void&gt; | Promise used to return the result.| | Promise\<void\> | Promise used to return the result.|
**Example** **Example**
```js ```ts
import notification from '@ohos.notification' import notification from '@ohos.notification'
let mySlot = { let mySlot = {
...@@ -331,7 +351,9 @@ reminderAgent.addNotificationSlot(mySlot).then(() => { ...@@ -331,7 +351,9 @@ reminderAgent.addNotificationSlot(mySlot).then(() => {
## reminderAgent.removeNotificationSlot ## reminderAgent.removeNotificationSlot
removeNotificationSlot(slotType: notification.SlotType, callback: AsyncCallback&lt;void&gt;): void ```ts
removeNotificationSlot(slotType: notification.SlotType, callback: AsyncCallback<void>): void
```
Removes a notification slot of a specified type. This API uses an asynchronous callback to return the result. Removes a notification slot of a specified type. This API uses an asynchronous callback to return the result.
...@@ -341,12 +363,12 @@ Removes a notification slot of a specified type. This API uses an asynchronous c ...@@ -341,12 +363,12 @@ Removes a notification slot of a specified type. This API uses an asynchronous c
| Name| Type| Mandatory| Description| | Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
| slotType | [notification.SlotType](js-apis-notification.md#slottype) | Yes| Type of the notification slot to remove.| | slotType | [notification.SlotType](js-apis-notification.md#slottype) | Yes| Type of the reminder notification slot to remove.|
| callback | AsyncCallback&lt;void&gt; | Yes| Asynchronous callback used to return the result.| | callback | AsyncCallback\<void\> | Yes| Asynchronous callback used to return the result.|
**Example** **Example**
```js ```ts
import notification from '@ohos.notification' import notification from '@ohos.notification'
reminderAgent.removeNotificationSlot(notification.SlotType.CONTENT_INFORMATION, (err, data) => { reminderAgent.removeNotificationSlot(notification.SlotType.CONTENT_INFORMATION, (err, data) => {
...@@ -357,7 +379,9 @@ reminderAgent.removeNotificationSlot(notification.SlotType.CONTENT_INFORMATION, ...@@ -357,7 +379,9 @@ reminderAgent.removeNotificationSlot(notification.SlotType.CONTENT_INFORMATION,
## reminderAgent.removeNotificationSlot ## reminderAgent.removeNotificationSlot
removeNotificationSlot(slotType: notification.SlotType): Promise&lt;void&gt; ```ts
removeNotificationSlot(slotType: notification.SlotType): Promise<void>
```
Removes a notification slot of a specified type. This API uses a promise to return the result. Removes a notification slot of a specified type. This API uses a promise to return the result.
...@@ -367,17 +391,17 @@ Removes a notification slot of a specified type. This API uses a promise to retu ...@@ -367,17 +391,17 @@ Removes a notification slot of a specified type. This API uses a promise to retu
| Name| Type| Mandatory| Description| | Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
| slotType | [notification.SlotType](js-apis-notification.md#slottype) | Yes| Type of the notification slot to remove.| | slotType | [notification.SlotType](js-apis-notification.md#slottype) | Yes| Type of the reminder notification slot to remove.|
**Return value** **Return value**
| Type| Description| | Type| Description|
| -------- | -------- | | -------- | -------- |
| Promise&lt;void&gt; | Promise used to return the result.| | Promise\<void\> | Promise used to return the result.|
**Example** **Example**
```js ```ts
import notification from '@ohos.notification' import notification from '@ohos.notification'
reminderAgent.removeNotificationSlot(notification.SlotType.CONTENT_INFORMATION).then(() => { reminderAgent.removeNotificationSlot(notification.SlotType.CONTENT_INFORMATION).then(() => {
...@@ -392,7 +416,7 @@ Enumerates button types. ...@@ -392,7 +416,7 @@ Enumerates button types.
**System capability**: SystemCapability.Notification.ReminderAgent **System capability**: SystemCapability.Notification.ReminderAgent
| Name| Default Value| Description| | Name| Value| Description|
| -------- | -------- | -------- | | -------- | -------- | -------- |
| ACTION_BUTTON_TYPE_CLOSE | 0 | Button for closing the reminder.| | ACTION_BUTTON_TYPE_CLOSE | 0 | Button for closing the reminder.|
| ACTION_BUTTON_TYPE_SNOOZE | 1 | Button for snoozing the reminder.| | ACTION_BUTTON_TYPE_SNOOZE | 1 | Button for snoozing the reminder.|
...@@ -404,7 +428,7 @@ Enumerates reminder types. ...@@ -404,7 +428,7 @@ Enumerates reminder types.
**System capability**: SystemCapability.Notification.ReminderAgent **System capability**: SystemCapability.Notification.ReminderAgent
| Name| Default Value| Description| | Name| Value| Description|
| -------- | -------- | -------- | | -------- | -------- | -------- |
| REMINDER_TYPE_TIMER | 0 | Countdown reminder.| | REMINDER_TYPE_TIMER | 0 | Countdown reminder.|
| REMINDER_TYPE_CALENDAR | 1 | Calendar reminder.| | REMINDER_TYPE_CALENDAR | 1 | Calendar reminder.|
...@@ -431,7 +455,7 @@ Sets the package and ability that are redirected to when the reminder notificati ...@@ -431,7 +455,7 @@ Sets the package and ability that are redirected to when the reminder notificati
| Name| Type| Mandatory| Description| | Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
| pkgName | string | Yes| Name of the package that is redirected to when the reminder notification is clicked.| | 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.| | abilityName | string | Yes| Name of the ability that is redirected to when the reminder notification is clicked.|
...@@ -443,7 +467,7 @@ Provides the information about the target package and ability to start automatic ...@@ -443,7 +467,7 @@ Provides the information about the target package and ability to start automatic
| Name| Type| Mandatory| Description| | Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
| pkgName | string | Yes| Name of the package that is automatically started when the reminder arrives and the device is not in use.| | pkgName | string | Yes| Name of the HAP 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.| | abilityName | string | Yes| Name of the ability that is automatically started when the reminder arrives and the device is not in use.|
...@@ -459,9 +483,9 @@ Defines the reminder to publish. ...@@ -459,9 +483,9 @@ Defines the reminder to publish.
| actionButton | [ActionButton](#actionbutton) | No| Button displayed in the reminder notification. (The parameter is optional. Up to two buttons are supported.)| | 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.| | wantAgent | [WantAgent](#wantagent) | No| Information about the ability that is redirected to when the notification 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.| | 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.| | ringDuration | number | No| Ringing duration, in seconds. The default value is **1**.|
| snoozeTimes | number | No| Number of reminder snooze times.| | snoozeTimes | number | No| Number of reminder snooze times. The default value is **0**.|
| timeInterval | number | No| Reminder snooze interval.| | timeInterval | number | No| Reminder snooze interval, in seconds. The default value is **0**.|
| title | string | No| Reminder title.| | title | string | No| Reminder title.|
| content | string | No| Reminder content.| | content | string | No| Reminder content.|
| expiredContent | string | No| Content to be displayed after the reminder expires.| | expiredContent | string | No| Content to be displayed after the reminder expires.|
...@@ -481,8 +505,8 @@ Defines a reminder for a calendar event. ...@@ -481,8 +505,8 @@ Defines a reminder for a calendar event.
| Name| Type| Mandatory| Description| | Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
| dateTime | [LocalDateTime](#localdatetime) | Yes| Reminder time.| | dateTime | [LocalDateTime](#localdatetime) | Yes| Reminder time.|
| repeatMonths | Array&lt;number&gt; | No| Month in which the reminder repeats.| | repeatMonths | Array\<number\> | No| Month in which the reminder repeats.|
| repeatDays | Array&lt;number&gt; | No| Date on which the reminder repeats.| | repeatDays | Array\<number\> | No| Date on which the reminder repeats.|
## ReminderRequestAlarm ## ReminderRequestAlarm
...@@ -497,7 +521,7 @@ Defines a reminder for an alarm. ...@@ -497,7 +521,7 @@ Defines a reminder for an alarm.
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
| hour | number | Yes| Hour portion of the reminder time.| | hour | number | Yes| Hour portion of the reminder time.|
| minute | number | Yes| Minute portion of the reminder time.| | minute | number | Yes| Minute portion of the reminder time.|
| daysOfWeek | Array&lt;number&gt; | No| Days of a week when the reminder repeats.| | 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.|
## ReminderRequestTimer ## ReminderRequestTimer
......
# reminderAgentManager # @ohos.reminderAgentManager
The **reminderAgentManager** module provides APIs for publishing scheduled reminders through the reminder agent. The **reminderAgentManager** module provides APIs for publishing scheduled reminders through the reminder agent.
You can set your application to use the reminder agent APIs to create scheduled reminders for countdown timers, calendar events, and alarm clocks. When the created reminders are published, the timing and pop-up notification functions of your application will be taken over by the reminder agent in the background when your application is frozen or exits. You can use the APIs to create scheduled reminders for countdown timers, calendar events, and alarm clocks. When the created reminders are published, the timing and pop-up notification functions of your application will be taken over by the reminder agent in the background when your application is frozen or exits.
> **NOTE** > **NOTE**
> >
...@@ -11,14 +11,16 @@ You can set your application to use the reminder agent APIs to create scheduled ...@@ -11,14 +11,16 @@ You can set your application to use the reminder agent APIs to create scheduled
## Modules to Import ## Modules to Import
``` ```ts
import reminderAgentManager from'@ohos.reminderAgentManager'; import reminderAgentManager from'@ohos.reminderAgentManager';
``` ```
## reminderAgentManager.publishReminder ## reminderAgentManager.publishReminder
publishReminder(reminderReq: ReminderRequest, callback: AsyncCallback&lt;number&gt;): void ```ts
publishReminder(reminderReq: ReminderRequest, callback: AsyncCallback<number>): 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). 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).
...@@ -31,7 +33,7 @@ Publishes a reminder through the reminder agent. This API uses an asynchronous c ...@@ -31,7 +33,7 @@ Publishes a reminder through the reminder agent. This API uses an asynchronous c
| Name| Type| Mandatory| Description| | Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
| reminderReq | [ReminderRequest](#reminderrequest) | Yes| Reminder to be published.| | reminderReq | [ReminderRequest](#reminderrequest) | Yes| Reminder to be published.|
| callback | AsyncCallback&lt;number&gt; | Yes| Asynchronous callback used to return the published reminder's ID.| | callback | AsyncCallback\<number\> | Yes| Callback used to return the published reminder's ID.|
**Error codes** **Error codes**
...@@ -43,11 +45,12 @@ For details about the error codes, see [reminderAgentManager Error Codes](../err ...@@ -43,11 +45,12 @@ For details about the error codes, see [reminderAgentManager Error Codes](../err
| 1700002 | The number of reminders exceeds the limit. | | 1700002 | The number of reminders exceeds the limit. |
**Example** **Example**
```js ```ts
let timer = { let timer = {
reminderType: reminderAgentManager.ReminderType.REMINDER_TYPE_TIMER, reminderType: reminderAgentManager.ReminderType.REMINDER_TYPE_TIMER,
triggerTimeInSeconds: 10 triggerTimeInSeconds: 10
} }
try { try {
reminderAgentManager.publishReminder(timer, (err, reminderId) => { reminderAgentManager.publishReminder(timer, (err, reminderId) => {
if (err) { if (err) {
...@@ -64,7 +67,9 @@ try { ...@@ -64,7 +67,9 @@ try {
## reminderAgentManager.publishReminder ## reminderAgentManager.publishReminder
publishReminder(reminderReq: ReminderRequest): Promise&lt;number&gt; ```ts
publishReminder(reminderReq: ReminderRequest): Promise<number>
```
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). 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).
...@@ -80,7 +85,7 @@ Publishes a reminder through the reminder agent. This API uses a promise to retu ...@@ -80,7 +85,7 @@ Publishes a reminder through the reminder agent. This API uses a promise to retu
**Return value** **Return value**
| Type| Description| | Type| Description|
| -------- | -------- | | -------- | -------- |
| Promise&lt;number&gt; | Promise used to return the published reminder's ID.| | Promise\<number\> | Promise used to return the published reminder's ID.|
**Error codes** **Error codes**
...@@ -92,11 +97,12 @@ For details about the error codes, see [reminderAgentManager Error Codes](../err ...@@ -92,11 +97,12 @@ For details about the error codes, see [reminderAgentManager Error Codes](../err
| 1700002 | The number of reminders exceeds the limit. | | 1700002 | The number of reminders exceeds the limit. |
**Example** **Example**
```js ```ts
let timer = { let timer = {
reminderType: reminderAgentManager.ReminderType.REMINDER_TYPE_TIMER, reminderType: reminderAgentManager.ReminderType.REMINDER_TYPE_TIMER,
triggerTimeInSeconds: 10 triggerTimeInSeconds: 10
} }
try { try {
reminderAgentManager.publishReminder(timer).then((reminderId) => { reminderAgentManager.publishReminder(timer).then((reminderId) => {
console.log("promise, reminderId = " + reminderId); console.log("promise, reminderId = " + reminderId);
...@@ -111,7 +117,9 @@ try { ...@@ -111,7 +117,9 @@ try {
## reminderAgentManager.cancelReminder ## reminderAgentManager.cancelReminder
cancelReminder(reminderId: number, callback: AsyncCallback&lt;void&gt;): void ```ts
cancelReminder(reminderId: number, callback: AsyncCallback<void>): void
```
Cancels the reminder with the specified ID. This API uses an asynchronous callback to return the cancellation result. Cancels the reminder with the specified ID. This API uses an asynchronous callback to return the cancellation result.
...@@ -122,7 +130,7 @@ Cancels the reminder with the specified ID. This API uses an asynchronous callba ...@@ -122,7 +130,7 @@ Cancels the reminder with the specified ID. This API uses an asynchronous callba
| Name| Type| Mandatory| Description| | Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
| reminderId | number | Yes| ID of the reminder to cancel.| | reminderId | number | Yes| ID of the reminder to cancel.|
| callback | AsyncCallback&lt;void&gt; | Yes| Asynchronous callback used to return the result.| | callback | AsyncCallback\<void\> | Yes| Asynchronous callback used to return the result.|
**Error codes** **Error codes**
...@@ -135,7 +143,7 @@ For details about the error codes, see [reminderAgentManager Error Codes](../err ...@@ -135,7 +143,7 @@ For details about the error codes, see [reminderAgentManager Error Codes](../err
**Example** **Example**
```js ```ts
try { try {
reminderAgentManager.cancelReminder(1, (err, data) => { reminderAgentManager.cancelReminder(1, (err, data) => {
if (err) { if (err) {
...@@ -152,7 +160,9 @@ try { ...@@ -152,7 +160,9 @@ try {
## reminderAgentManager.cancelReminder ## reminderAgentManager.cancelReminder
cancelReminder(reminderId: number): Promise&lt;void&gt; ```ts
cancelReminder(reminderId: number): Promise<void>
```
Cancels the reminder with the specified ID. This API uses a promise to return the cancellation result. Cancels the reminder with the specified ID. This API uses a promise to return the cancellation result.
...@@ -168,7 +178,7 @@ Cancels the reminder with the specified ID. This API uses a promise to return th ...@@ -168,7 +178,7 @@ Cancels the reminder with the specified ID. This API uses a promise to return th
| Type| Description| | Type| Description|
| -------- | -------- | | -------- | -------- |
| Promise&lt;void&gt; | Promise used to return the result.| | Promise\<void\> | Promise used to return the result.|
**Error codes** **Error codes**
...@@ -181,7 +191,7 @@ For details about the error codes, see [reminderAgentManager Error Codes](../err ...@@ -181,7 +191,7 @@ For details about the error codes, see [reminderAgentManager Error Codes](../err
**Example** **Example**
```js ```ts
try { try {
reminderAgentManager.cancelReminder(1).then(() => { reminderAgentManager.cancelReminder(1).then(() => {
console.log("cancelReminder promise"); console.log("cancelReminder promise");
...@@ -193,10 +203,12 @@ try { ...@@ -193,10 +203,12 @@ try {
}; };
``` ```
## reminderAgentManager.getValidReminders ## reminderAgentManager.getValidReminders
getValidReminders(callback: AsyncCallback&lt;Array&lt;ReminderRequest&gt;&gt;): void ```ts
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. Obtains all valid (not yet expired) reminders set by the current application. This API uses an asynchronous callback to return the reminders.
...@@ -206,7 +218,7 @@ Obtains all valid (not yet expired) reminders set by the current application. Th ...@@ -206,7 +218,7 @@ Obtains all valid (not yet expired) reminders set by the current application. Th
| Name| Type| Mandatory| Description| | Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
| callback | AsyncCallback&lt;Array&lt;[ReminderRequest](#reminderrequest)&gt;&gt; | Yes| Asynchronous callback used to return an array of all valid reminders set by the current application.| | callback | AsyncCallback\<Array\<[ReminderRequest](#reminderrequest)\>\> | Yes| Asynchronous callback used to return an array of all valid reminders set by the current application.|
**Error codes** **Error codes**
...@@ -218,7 +230,7 @@ For details about the error codes, see [reminderAgentManager Error Codes](../err ...@@ -218,7 +230,7 @@ For details about the error codes, see [reminderAgentManager Error Codes](../err
**Example** **Example**
```js ```ts
try { try {
reminderAgentManager.getValidReminders((err, reminders) => { reminderAgentManager.getValidReminders((err, reminders) => {
if (err) { if (err) {
...@@ -253,10 +265,11 @@ try { ...@@ -253,10 +265,11 @@ try {
}; };
``` ```
## reminderAgentManager.getValidReminders ## reminderAgentManager.getValidReminders
getValidReminders(): Promise&lt;Array&lt;ReminderRequest&gt;&gt; ```ts
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. Obtains all valid (not yet expired) reminders set by the current application. This API uses a promise to return the reminders.
...@@ -266,7 +279,7 @@ Obtains all valid (not yet expired) reminders set by the current application. Th ...@@ -266,7 +279,7 @@ Obtains all valid (not yet expired) reminders set by the current application. Th
| Type| Description| | Type| Description|
| -------- | -------- | | -------- | -------- |
| Promise&lt;Array&lt;[ReminderRequest](#reminderrequest)&gt;&gt; | Promise used to return an array of all valid reminders set by the current application.| | Promise\<Array\<[ReminderRequest](#reminderrequest)\>\> | Promise used to return an array of all valid reminders set by the current application.|
**Error codes** **Error codes**
...@@ -278,7 +291,7 @@ For details about the error codes, see [reminderAgentManager Error Codes](../err ...@@ -278,7 +291,7 @@ For details about the error codes, see [reminderAgentManager Error Codes](../err
**Example** **Example**
```js ```ts
try { try {
reminderAgentManager.getValidReminders().then((reminders) => { reminderAgentManager.getValidReminders().then((reminders) => {
console.log("promise, getValidReminders length = " + reminders.length); console.log("promise, getValidReminders length = " + reminders.length);
...@@ -314,7 +327,9 @@ try { ...@@ -314,7 +327,9 @@ try {
## reminderAgentManager.cancelAllReminders ## reminderAgentManager.cancelAllReminders
cancelAllReminders(callback: AsyncCallback&lt;void&gt;): void ```ts
cancelAllReminders(callback: AsyncCallback<void>): void
```
Cancels all reminders set by the current application. This API uses an asynchronous callback to return the cancellation result. Cancels all reminders set by the current application. This API uses an asynchronous callback to return the cancellation result.
...@@ -324,7 +339,7 @@ Cancels all reminders set by the current application. This API uses an asynchron ...@@ -324,7 +339,7 @@ Cancels all reminders set by the current application. This API uses an asynchron
| Name| Type| Mandatory| Description| | Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
| callback | AsyncCallback&lt;void&gt; | Yes| Asynchronous callback used to return the result.| | callback | AsyncCallback\<void\> | Yes| Asynchronous callback used to return the result.|
**Error codes** **Error codes**
...@@ -336,7 +351,7 @@ For details about the error codes, see [reminderAgentManager Error Codes](../err ...@@ -336,7 +351,7 @@ For details about the error codes, see [reminderAgentManager Error Codes](../err
**Example** **Example**
```js ```ts
try { try {
reminderAgentManager.cancelAllReminders((err, data) =>{ reminderAgentManager.cancelAllReminders((err, data) =>{
if (err) { if (err) {
...@@ -353,7 +368,9 @@ try { ...@@ -353,7 +368,9 @@ try {
## reminderAgentManager.cancelAllReminders ## reminderAgentManager.cancelAllReminders
cancelAllReminders(): Promise&lt;void&gt; ```ts
cancelAllReminders(): Promise<void>
```
Cancels all reminders set by the current application. This API uses a promise to return the cancellation result. Cancels all reminders set by the current application. This API uses a promise to return the cancellation result.
...@@ -363,7 +380,7 @@ Cancels all reminders set by the current application. This API uses a promise to ...@@ -363,7 +380,7 @@ Cancels all reminders set by the current application. This API uses a promise to
| Type| Description| | Type| Description|
| -------- | -------- | | -------- | -------- |
| Promise&lt;void&gt; | Promise used to return the result.| | Promise\<void\> | Promise used to return the result.|
**Error codes** **Error codes**
...@@ -375,7 +392,7 @@ For details about the error codes, see [reminderAgentManager Error Codes](../err ...@@ -375,7 +392,7 @@ For details about the error codes, see [reminderAgentManager Error Codes](../err
**Example** **Example**
```js ```ts
try { try {
reminderAgentManager.cancelAllReminders().then(() => { reminderAgentManager.cancelAllReminders().then(() => {
console.log("cancelAllReminders promise") console.log("cancelAllReminders promise")
...@@ -390,7 +407,9 @@ try { ...@@ -390,7 +407,9 @@ try {
## reminderAgentManager.addNotificationSlot ## reminderAgentManager.addNotificationSlot
addNotificationSlot(slot: NotificationSlot, callback: AsyncCallback&lt;void&gt;): void ```ts
addNotificationSlot(slot: NotificationSlot, callback: AsyncCallback<void>): void
```
Adds a notification slot. This API uses an asynchronous callback to return the result. Adds a notification slot. This API uses an asynchronous callback to return the result.
...@@ -401,11 +420,11 @@ Adds a notification slot. This API uses an asynchronous callback to return the r ...@@ -401,11 +420,11 @@ Adds a notification slot. This API uses an asynchronous callback to return the r
| Name| Type| Mandatory| Description| | Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
| slot | [NotificationSlot](js-apis-notification.md#notificationslot) | Yes| Notification slot, whose type can be set.| | 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\<void\> | Yes| Asynchronous callback used to return the result.|
**Example** **Example**
```js ```ts
import notification from '@ohos.notification' import notification from '@ohos.notification'
let mySlot = { let mySlot = {
...@@ -427,7 +446,9 @@ try { ...@@ -427,7 +446,9 @@ try {
## reminderAgentManager.addNotificationSlot ## reminderAgentManager.addNotificationSlot
addNotificationSlot(slot: NotificationSlot): Promise&lt;void&gt; ```ts
addNotificationSlot(slot: NotificationSlot): Promise<void>
```
Adds a notification slot. This API uses a promise to return the result. Adds a notification slot. This API uses a promise to return the result.
...@@ -443,11 +464,11 @@ Adds a notification slot. This API uses a promise to return the result. ...@@ -443,11 +464,11 @@ Adds a notification slot. This API uses a promise to return the result.
| Type| Description| | Type| Description|
| -------- | -------- | | -------- | -------- |
| Promise&lt;void&gt; | Promise used to return the result.| | Promise\<void\> | Promise used to return the result.|
**Example** **Example**
```js ```ts
import notification from '@ohos.notification' import notification from '@ohos.notification'
let mySlot = { let mySlot = {
...@@ -467,7 +488,9 @@ try { ...@@ -467,7 +488,9 @@ try {
## reminderAgentManager.removeNotificationSlot ## reminderAgentManager.removeNotificationSlot
removeNotificationSlot(slotType: notification.SlotType, callback: AsyncCallback&lt;void&gt;): void ```ts
removeNotificationSlot(slotType: notification.SlotType, callback: AsyncCallback<void>): void
```
Removes a notification slot of a specified type. This API uses an asynchronous callback to return the result. Removes a notification slot of a specified type. This API uses an asynchronous callback to return the result.
...@@ -478,11 +501,11 @@ Removes a notification slot of a specified type. This API uses an asynchronous c ...@@ -478,11 +501,11 @@ Removes a notification slot of a specified type. This API uses an asynchronous c
| Name| Type| Mandatory| Description| | Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
| slotType | [notification.SlotType](js-apis-notification.md#slottype) | Yes| Type of the notification slot to remove.| | 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\<void\> | Yes| Asynchronous callback used to return the result.|
**Example** **Example**
```js ```ts
import notification from '@ohos.notification' import notification from '@ohos.notification'
try { try {
...@@ -501,7 +524,9 @@ try { ...@@ -501,7 +524,9 @@ try {
## reminderAgentManager.removeNotificationSlot ## reminderAgentManager.removeNotificationSlot
removeNotificationSlot(slotType: notification.SlotType): Promise&lt;void&gt; ```ts
removeNotificationSlot(slotType: notification.SlotType): Promise<void>
```
Removes a notification slot of a specified type. This API uses a promise to return the result. Removes a notification slot of a specified type. This API uses a promise to return the result.
...@@ -517,11 +542,11 @@ Removes a notification slot of a specified type. This API uses a promise to retu ...@@ -517,11 +542,11 @@ Removes a notification slot of a specified type. This API uses a promise to retu
| Type| Description| | Type| Description|
| -------- | -------- | | -------- | -------- |
| Promise&lt;void&gt; | Promise used to return the result.| | Promise\<void\> | Promise used to return the result.|
**Example** **Example**
```js ```ts
import notification from '@ohos.notification' import notification from '@ohos.notification'
try { try {
...@@ -580,7 +605,7 @@ Sets the package and ability that are redirected to when the reminder notificati ...@@ -580,7 +605,7 @@ Sets the package and ability that are redirected to when the reminder notificati
| Name| Type| Mandatory| Description| | Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
| pkgName | string | Yes| Name of the package that is redirected to when the reminder notification is clicked.| | 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.| | abilityName | string | Yes| Name of the ability that is redirected to when the reminder notification is clicked.|
...@@ -592,7 +617,7 @@ Provides the information about the target package and ability to start automatic ...@@ -592,7 +617,7 @@ Provides the information about the target package and ability to start automatic
| Name| Type| Mandatory| Description| | Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
| pkgName | string | Yes| Name of the package that is automatically started when the reminder arrives and the device is not in use.| | pkgName | string | Yes| Name of the HAP 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.| | abilityName | string | Yes| Name of the ability that is automatically started when the reminder arrives and the device is not in use.|
...@@ -608,9 +633,9 @@ Defines the reminder to publish. ...@@ -608,9 +633,9 @@ Defines the reminder to publish.
| actionButton | [ActionButton](#actionbutton) | No| Button displayed in the reminder notification. (The parameter is optional. Up to two buttons are supported.)| | 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.| | wantAgent | [WantAgent](#wantagent) | No| Information about the ability that is redirected to when the notification 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.| | 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.| | ringDuration | number | No| Ringing duration, in seconds. The default value is **1**.|
| snoozeTimes | number | No| Number of reminder snooze times.| | snoozeTimes | number | No| Number of reminder snooze times. The default value is **0**.|
| timeInterval | number | No| Reminder snooze interval, in seconds.| | timeInterval | number | No| Reminder snooze interval, in seconds. The default value is **0**.|
| title | string | No| Reminder title.| | title | string | No| Reminder title.|
| content | string | No| Reminder content.| | content | string | No| Reminder content.|
| expiredContent | string | No| Content to be displayed after the reminder expires.| | expiredContent | string | No| Content to be displayed after the reminder expires.|
...@@ -630,8 +655,8 @@ Defines a reminder for a calendar event. ...@@ -630,8 +655,8 @@ Defines a reminder for a calendar event.
| Name| Type| Mandatory| Description| | Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
| dateTime | [LocalDateTime](#localdatetime) | Yes| Reminder time.| | dateTime | [LocalDateTime](#localdatetime) | Yes| Reminder time.|
| repeatMonths | Array&lt;number&gt; | No| Month in which the reminder repeats.| | repeatMonths | Array\<number\> | No| Month in which the reminder repeats.|
| repeatDays | Array&lt;number&gt; | No| Date on which the reminder repeats.| | repeatDays | Array\<number\> | No| Date on which the reminder repeats.|
## ReminderRequestAlarm ## ReminderRequestAlarm
...@@ -646,7 +671,7 @@ Defines a reminder for an alarm. ...@@ -646,7 +671,7 @@ Defines a reminder for an alarm.
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
| hour | number | Yes| Hour portion of the reminder time.| | hour | number | Yes| Hour portion of the reminder time.|
| minute | number | Yes| Minute portion of the reminder time.| | minute | number | Yes| Minute portion of the reminder time.|
| 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.| | 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.|
## ReminderRequestTimer ## ReminderRequestTimer
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册