diff --git a/en/application-dev/reference/apis/js-apis-reminderAgent.md b/en/application-dev/reference/apis/js-apis-reminderAgent.md index c3ee9fdace8184109ddb62d58be87c3c30d99ac7..da7f0ae7bbac41be20f73b958f92317756e4de1e 100644 --- a/en/application-dev/reference/apis/js-apis-reminderAgent.md +++ b/en/application-dev/reference/apis/js-apis-reminderAgent.md @@ -1,250 +1,140 @@ -# Reminder Agent +# Reminder Agent ->**NOTE:** ->The initial APIs of this module are supported since API version 7. Newly added APIs will be marked with a superscript to indicate their earliest API version. +> ![icon-note.gif](public_sys-resources/icon-note.gif) **NOTE** +> The initial APIs of this module are supported since API version 7. Newly added APIs will be marked with a superscript to indicate their earliest API version. -## Modules to Import +## Modules to Import ``` -import reminderAgent from '@ohos.reminderAgent'; +import reminderAgent from'@ohos.reminderAgent'; ``` -## System Capabilities - -SystemCapability.Notification.ReminderAgent - -## Required Permissions - -ohos.permission.PUBLISH\_AGENT\_REMINDER - -## reminderAgent.publishReminder - -publishReminder\(reminderReq: ReminderRequest, callback: AsyncCallback\): void - -Publishes an agent-powered reminder. This method uses an asynchronous callback to return the published reminder's ID. - -- Parameters - - - - - - - - - - - - - - - - - - - -

Name

-

Type

-

Mandatory

-

Description

-

reminderReq

-

ReminderRequest

-

Yes

-

Reminder to be published.

-

callback

-

AsyncCallback<number>

-

Yes

-

Asynchronous callback used to return the result.

-
- -- Example - - ``` - export default { - data: { - timer: { - reminderType: reminderAgent.ReminderType.REMINDER_TYPE_TIMER, - triggerTimeInSeconds: 3 - } - }, - startTimer() { - reminderAgent.publishReminder(timer, (err, reminderId) => { - console.log("reminderId = " + reminderId); - }); - } - } - ``` - - -## reminderAgent.publishReminder - -publishReminder\(reminderReq: ReminderRequest\): Promise - -Publishes an agent-powered reminder. This method uses a promise callback to return the published reminder's ID. - -- Parameters - - - - - - - - - - - - - - -

Name

-

Type

-

Mandatory

-

Description

-

reminderReq

-

ReminderRequest

-

Yes

-

Reminder to be published.

-
- -- Return values - - - - - - - - - - -

Type

-

Description

-

Promise<number>

-

Promise used to return the result.

-
- -- Example - - ``` - export default { - data: { - timer: { - reminderType: reminderAgent.ReminderType.REMINDER_TYPE_TIMER, - triggerTimeInSeconds: 3 - } - }, - startTimer() { - reminderAgent.publishReminder(this.timer).then((reminderId) => { - console.log("reminderId = " + reminderId); - }); - } - } - ``` - - -## reminderAgent.cancelReminder - -cancelReminder\(reminderId: number, callback: AsyncCallback\): void - -Cancels the reminder with the specified ID. This method uses an asynchronous callback to return the cancellation result. - -- Parameters - - - - - - - - - - - - - - - - - - - -

Name

-

Type

-

Mandatory

-

Description

-

reminderId

-

number

-

Yes

-

ID of the reminder to cancel.

-

callback

-

AsyncCallback<void>

-

Yes

-

Asynchronous callback used to return the result.

-
- -- Example + +## Required Permissions + +ohos.permission.PUBLISH_AGENT_REMINDER + + +## reminderAgent.publishReminder + +publishReminder(reminderReq: ReminderRequest, callback: AsyncCallback<number>): void + +Publishes an agent-powered reminder. This API uses an asynchronous callback to return the result. + +- System capability + + SystemCapability.Notification.ReminderAgent + +- Parameters + | Name| Type| Mandatory| Description| + | -------- | -------- | -------- | -------- | + | reminderReq | [ReminderRequest](#reminderrequest) | Yes| Reminder to be published.| + | callback | AsyncCallback<number> | Yes| Asynchronous callback used to return the published reminder's ID.| + +- Example + ``` + export default { data: {timer: { + reminderType: reminderAgent.ReminderType.REMINDER_TYPE_TIMER, + triggerTimeInSeconds: 3 + } + }, + startTimer() { + reminderAgent.publishReminder(timer, (err, reminderId) => { console.log("reminderId = " + reminderId); + }); + } + } + ``` + + +## reminderAgent.publishReminder + +publishReminder(reminderReq: ReminderRequest): Promise<number> + +Publishes an agent-powered reminder. This API uses a promise callback to return the result. + +- System capability + + SystemCapability.Notification.ReminderAgent + +- Parameters + | Name| Type| Mandatory| Description| + | -------- | -------- | -------- | -------- | + | reminderReq | [ReminderRequest](#reminderrequest) | Yes| Reminder to be published.| + +- Return value + | Type| Description| + | -------- | -------- | + | Promise<number> | Promise used to return the published reminder's ID.| + +- Example + ``` + export default { data: {timer: { + reminderType: reminderAgent.ReminderType.REMINDER_TYPE_TIMER, + triggerTimeInSeconds: 3 + } + }, + startTimer() { + reminderAgent.publishReminder(this.timer).then((reminderId) => { + console.log("reminderId = " + reminderId); + }); + } + } + ``` + + +## reminderAgent.cancelReminder + +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. + +- System capability + + SystemCapability.Notification.ReminderAgent + +- Parameters + +| Name| Type| Mandatory| Description| +| -------- | -------- | -------- | -------- | +| reminderId | number | Yes| ID of the reminder to cancel.| +| callback | AsyncCallback<void> | Yes| Asynchronous callback used to return the result.| + +- Example ``` export default { - cancel() { - reminderAgent.cancelReminder(1, (err, data) => { + cancel() { reminderAgent.cancelReminder(1, (err, data) => { console.log("do next"); }); } } ``` -## reminderAgent.cancelReminder - -cancelReminder\(reminderId: number\): Promise - -Cancels the reminder with the specified ID. This method uses a promise to return the cancellation result. - -- Parameters - - - - - - - - - - - - - - -

Name

-

Type

-

Mandatory

-

Description

-

reminderId

-

number

-

Yes

-

ID of the reminder to cancel.

-
- -- Return values - - - - - - - - - - -

Type

-

Description

-

Promise<void>

-

Promise used to return the result.

-
- -- Example + +## reminderAgent.cancelReminder + +cancelReminder(reminderId: number): Promise<void> + +Cancels the reminder with the specified ID. This API uses a promise to return the cancellation result. + +- System capability + + SystemCapability.Notification.ReminderAgent + +- Parameters + +| Name| Type| Mandatory| Description| +| -------- | -------- | -------- | -------- | +| reminderId | number | Yes| ID of the reminder to cancel.| + +- Return value + +| Type| Description| +| -------- | -------- | +| Promise<void> | Promise used to return the result.| + +- Example ``` export default { @@ -256,38 +146,24 @@ export default { } ``` -## reminderAgent.getValidReminders - -getValidReminders\(callback: AsyncCallback\>\): void - -Obtains all valid \(not yet expired\) reminders set by the current application. This method uses an asynchronous callback to return the reminders. - -- Parameters - - - - - - - - - - - - - - -

Name

-

Type

-

Mandatory

-

Description

-

callback

-

AsyncCallback<Array<ReminderRequest>>

-

Yes

-

Asynchronous callback used to return an array of all valid reminders set by the current application.

-
- -- Example + +## reminderAgent.getValidReminders + +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. + +- 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.| + +- Example ``` reminderAgent.getValidReminders((err, reminders) => { @@ -315,30 +191,24 @@ reminderAgent.getValidReminders((err, reminders) => { }) ``` -## reminderAgent.getValidReminders -getValidReminders\(\): Promise\> +## reminderAgent.getValidReminders + +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 method uses a promise to return the reminders. +- System capability -- Return values + SystemCapability.Notification.ReminderAgent - - - - - - - - - -

Type

-

Description

-

Promise<Array<ReminderRequest>>

-

Promise used to return an array of all valid reminders set by the current application.

-
+- Return value -- Example +| Type| Description| +| -------- | -------- | +| Promise<Array<[ReminderRequest](#reminderrequest)>> | Promise used to return an array of all valid reminders set by the current application.| + +- Example ``` reminderAgent.getValidReminders().then((reminders) => { @@ -366,126 +236,79 @@ reminderAgent.getValidReminders().then((reminders) => { }) ``` -## reminderAgent.cancelAllReminders - -cancelAllReminders\(callback: AsyncCallback\): void - -Cancels all reminders set by the current application. This method uses an asynchronous callback to return the cancellation result. - -- Parameters - - - - - - - - - - - - - - -

Name

-

Type

-

Mandatory

-

Description

-

callback

-

AsyncCallback<void>

-

Yes

-

Asynchronous callback used to return the result.

-
- -- Example + +## reminderAgent.cancelAllReminders + +cancelAllReminders(callback: AsyncCallback<void>): void + +Cancels all reminders set by the current application. This API uses an asynchronous callback to return the cancellation result. + +- System capability + + SystemCapability.Notification.ReminderAgent + +- Parameters + +| Name| Type| Mandatory| Description| +| -------- | -------- | -------- | -------- | +| callback | AsyncCallback<void> | Yes| Asynchronous callback used to return the result.| + +- Example ``` reminderAgent.cancelAllReminders((err, data) =>{ - console.log("do next")} -) + console.log("do next")}) ``` -## reminderAgent.cancelAllReminders -cancelAllReminders\(\): Promise +## reminderAgent.cancelAllReminders -Cancels all reminders set by the current application. This method uses a promise to return the cancellation result. +cancelAllReminders(): Promise<void> -- Return values +Cancels all reminders set by the current application. This API uses a promise to return the cancellation result. - - - - - - - - - -

Type

-

Description

-

Promise<void>

-

Promise used to return the result.

-
+- System capability -- Example + SystemCapability.Notification.ReminderAgent + +- Return value + +| Type| Description| +| -------- | -------- | +| Promise<void> | Promise used to return the result.| + +- Example ``` reminderAgent.cancelAllReminders().then(() => { - console.log("do next")} -) + console.log("do next")}) ``` -## reminderAgent.addNotificationSlot - -addNotificationSlot\(slot: NotificationSlot, callback: AsyncCallback\): void - -Adds a reminder notification slot. This method uses an asynchronous callback to return the result. - -- Parameters - - - - - - - - - - - - - - - - - - - -

Name

-

Type

-

Mandatory

-

Description

-

slot

-

NotificationSlot

-

Yes

-

Reminder notification slot to add.

-

callback

-

AsyncCallback<void>

-

Yes

-

Asynchronous callback used to return the result.

-
- -- Example + +## reminderAgent.addNotificationSlot + +addNotificationSlot(slot: NotificationSlot, callback: AsyncCallback<void>): void + +Adds a reminder notification slot. This API uses an asynchronous callback to return the result. + +- System capability + + SystemCapability.Notification.ReminderAgent + +- Parameters + +| Name| Type| Mandatory| Description| +| -------- | -------- | -------- | -------- | +| slot | [NotificationSlot](js-apis-notification.md#notificationslot) | Yes| Reminder notification slot to add.| +| callback | AsyncCallback<void> | Yes| Asynchronous callback used to return the result.| + +- Example ``` -export default { - data: { - mySlot: { +export default { data: { mySlot: { type: 3, sound: "/sdcard/music2.mp3" - } - }, + } }, addSlot() { reminderAgent.addNotificationSlot(this.mySlot, (err, data) => { console.log("do next"); @@ -494,685 +317,246 @@ export default { } ``` -## reminderAgent.addNotificationSlot - -addNotificationSlot\(slot: NotificationSlot\): Promise - -Adds a reminder notification slot. This method uses a promise to return the result. - -- Parameters - - - - - - - - - - - - - - -

Name

-

Type

-

Mandatory

-

Description

-

slot

-

NotificationSlot

-

Yes

-

Reminder notification slot to add.

-
- -- Return values - - - - - - - - - - -

Type

-

Description

-

Promise<void>

-

Promise used to return the result.

-
- -- Example + +## reminderAgent.addNotificationSlot + +addNotificationSlot(slot: NotificationSlot): Promise<void> + +Adds a reminder notification slot. This API uses a promise to return the result. + +- System capability + + SystemCapability.Notification.ReminderAgent + +- Parameters + +| Name| Type| Mandatory| Description| +| -------- | -------- | -------- | -------- | +| slot | [NotificationSlot](js-apis-notification.md#notificationslot) | Yes| Reminder notification slot to add.| + +- Return value + +| Type| Description| +| -------- | -------- | +| Promise<void> | Promise used to return the result.| + +- Example ``` -export default { - data: { - mySlot: { +export default { data: { mySlot: { type: 3, sound: "/sdcard/music2.mp3" - } - }, + } }, addSlot() { reminderAgent.addNotificationSlot(this.mySlot).then(() => { - console.log("do next"); + console.log("do next"); }); } } ``` -## reminderAgent.removeNotificationSlot - -removeNotificationSlot\(slotType: notification.SlotType, callback: AsyncCallback\): void - -Removes a **NotificationSlot** instance of a specified type. This method uses an asynchronous callback to return the result. - -- Parameters - - - - - - - - - - - - - - - - - - - -

Name

-

Type

-

Mandatory

-

Description

-

slotType

-

notification.SlotType

-

Yes

-

Type of the reminder notification slot to remove.

-

callback

-

AsyncCallback<void>

-

Yes

-

Asynchronous callback used to return the result.

-
- -- Example + +## reminderAgent.removeNotificationSlot + +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. + +- 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.| + +- Example ``` export default { - removeSlot() { - reminderAgent.removeNotificationSlot(notification.SlotType.CONTENT_INFORMATION, (err, data) => { + removeSlot() {reminderAgent.removeNotificationSlot(notification.SlotType.CONTENT_INFORMATION, (err, data) => { console.log("do next"); - }); +}); } } ``` -## reminderAgent.removeNotificationSlot - -removeNotificationSlot\(slotType: notification.SlotType\): Promise - -Removes a **NotificationSlot** instance of a specified type. This method uses a promise to return the result. - -- Parameters - - - - - - - - - - - - - - -

Name

-

Type

-

Mandatory

-

Description

-

slotType

-

notification.SlotType

-

Yes

-

Type of the reminder notification slot to remove.

-
- -- Return values - - - - - - - - - - -

Type

-

Description

-

Promise<void>

-

Promise used to return the result.

-
- -- Example + +## reminderAgent.removeNotificationSlot + +removeNotificationSlot(slotType: notification.SlotType): Promise<void> + +Removes a notification slot of a specified type. This API uses a promise to return the result. + +- 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.| + +- Return value + +| Type| Description| +| -------- | -------- | +| Promise<void> | Promise used to return the result.| + +- Example ``` export default { - removeSlot() { - reminderAgent.removeNotificationSlot(notification.SlotType.CONTENT_INFORMATION).then(() => { + removeSlot() { reminderAgent.removeNotificationSlot(notification.SlotType.CONTENT_INFORMATION).then(() => { console.log("do next"); }); } } ``` -## ActionButtonType + +## ActionButtonType Enumerates button types. - - - - - - - - - - - - - - - -

Name

-

Default Value

-

Description

-

ACTION_BUTTON_TYPE_CLOSE

-

0

-

Button for closing the reminder.

-

ACTION_BUTTON_TYPE_SNOOZE

-

1

-

Button for snoozing the reminder.

-
- -## ReminderType +- **System capability**: SystemCapability.Notification.ReminderAgent + +| Name| Default Value| Description| +| -------- | -------- | -------- | +| ACTION_BUTTON_TYPE_CLOSE | 0 | Button for closing the reminder.| +| ACTION_BUTTON_TYPE_SNOOZE | 1 | Button for snoozing the reminder.| + + +## ReminderType Enumerates reminder types. - - - - - - - - - - - - - - - - - - - -

Name

-

Default Value

-

Description

-

REMINDER_TYPE_TIMER

-

0

-

Countdown reminder.

-

REMINDER_TYPE_CALENDAR

-

1

-

Calendar reminder.

-

REMINDER_TYPE_ALARM

-

2

-

Alarm reminder.

-
- -## ActionButton +- **System capability**: SystemCapability.Notification.ReminderAgent + +| Name| Default Value| Description| +| -------- | -------- | -------- | +| REMINDER_TYPE_TIMER | 0 | Countdown reminder.| +| REMINDER_TYPE_CALENDAR | 1 | Calendar reminder.| +| REMINDER_TYPE_ALARM | 2 | Alarm reminder.| + + +## ActionButton Defines a button displayed in the reminder notification. - - - - - - - - - - - - - - - - - - -

Name

-

Type

-

Mandatory

-

Description

-

title

-

string

-

Yes

-

Text on the button.

-

type

-

ActionButtonType

-

Yes

-

Button type.

-
- -## WantAgent +- **System capability**: SystemCapability.Notification.ReminderAgent + +| Name| Type| Mandatory| Description| +| -------- | -------- | -------- | -------- | +| title | string | Yes| Text on the button.| +| type | [ActionButtonType](#actionbuttontype) | Yes| Button type.| + + +## WantAgent Sets the package and ability that are redirected to when the reminder notification is clicked. - - - - - - - - - - - - - - - - - - -

Name

-

Type

-

Mandatory

-

Description

-

pkgName

-

string

-

Yes

-

Name of the package 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 +- **System capability**: SystemCapability.Notification.ReminderAgent + +| Name| Type| Mandatory| Description| +| -------- | -------- | -------- | -------- | +| 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 Sets the name of the target package and ability to start automatically when the reminder arrives and the device is not in use. If the device is in use, a notification will be displayed. - - - - - - - - - - - - - - - - - - -

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.

-

abilityName

-

string

-

Yes

-

Name of the ability that is automatically started when the reminder arrives and the device is not in use.

-
- -## ReminderRequest +- **System capability**: SystemCapability.Notification.ReminderAgent + +| 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.| +| abilityName | string | Yes| Name of the ability that is automatically started when the reminder arrives and the device is not in use.| + + +## ReminderRequest Defines the reminder to publish. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Name

-

Type

-

Mandatory

-

Description

-

reminderType

-

ReminderType

-

Yes

-

Type of the reminder.

-

actionButton

-

[ActionButton?, ActionButton?]

-

No

-

Action button displayed in the reminder notification. (The parameter is optional. Up to two buttons are supported.)

-

wantAgent

-

WantAgent

-

No

-

Information about the ability that is redirected to when the notification is clicked.

-

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.

-

snoozeTimes

-

number

-

No

-

Number of reminder snooze times.

-

timeInterval

-

number

-

No

-

Reminder snooze interval.

-

title

-

string

-

No

-

Reminder title.

-

content

-

string

-

No

-

Reminder content.

-

expiredContent

-

string

-

No

-

Content to be displayed after the reminder expires.

-

snoozeContent

-

string

-

No

-

Content to be displayed when the reminder is snoozing.

-

notificationId

-

number

-

No

-

Notification ID used by the reminder. If there are reminders with the same notification ID, the later one will overwrite the earlier one.

-

slotType

-

notification.SlotType

-

No

-

Type of the slot used by the reminder.

-
- -## ReminderRequestCalendar +- **System capability**: SystemCapability.Notification.ReminderAgent + +| Name| Type| Mandatory| Description| +| -------- | -------- | -------- | -------- | +| reminderType | ReminderType | Yes| Type of the reminder.| +| actionButton | [ActionButton?, ActionButton?] | No| Action button displayed in the reminder notification. (The parameter is optional. Up to two buttons are supported.)| +| wantAgent | WantAgent | No| Information about the ability that is redirected to when the notification is clicked.| +| 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.| +| snoozeTimes | number | No| Number of reminder snooze times.| +| timeInterval | number | No| Reminder snooze interval.| +| title | string | No| Reminder title.| +| content | string | No| Reminder content.| +| expiredContent | string | No| Content to be displayed after the reminder expires.| +| snoozeContent | string | No| Content to be displayed when the reminder is snoozing.| +| notificationId | number | No| Notification ID used by the reminder. If there are reminders with the same notification ID, the later one will overwrite the earlier one.| +| slotType | [notification.SlotType](js-apis-notification.md#slottype) | No| Type of the slot used by the reminder.| + + +## ReminderRequestCalendar ReminderRequestCalendar extends ReminderRequest Defines a reminder for a calendar event. - - - - - - - - - - - - - - - - - - - - - - - -

Name

-

Type

-

Mandatory

-

Description

-

dateTime

-

LocalDateTime

-

Yes

-

Reminder time.

-

repeatMonths

-

Array<number>

-

No

-

Month in which the reminder repeats.

-

repeatDays

-

Array<number>

-

No

-

Date on which the reminder repeats.

-
- -## ReminderRequestAlarm +- **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.| + + +## ReminderRequestAlarm ReminderRequestAlarm extends ReminderRequest -Defines a reminder for the alarm clock. - - - - - - - - - - - - - - - - - - - - - - - - -

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.

-
- -## ReminderRequestTimer - -Defines a **ReminderRequestTimer** instance, which extends **ReminderRequest**. +Defines a reminder for an alarm. + +- **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.| + + +## ReminderRequestTimer + +ReminderRequestTimer extends ReminderRequest Defines a reminder for a scheduled timer. - - - - - - - - - - - - - -

Name

-

Type

-

Mandatory

-

Description

-

triggerTimeInSeconds

-

number

-

Yes

-

Number of seconds in the countdown timer.

-
- -## LocalDateTime +- **System capability**: SystemCapability.Notification.ReminderAgent + +| Name| Type| Mandatory| Description| +| -------- | -------- | -------- | -------- | +| triggerTimeInSeconds | number | Yes| Number of seconds in the countdown timer.| + + +## LocalDateTime Sets the time information for a calendar reminder. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Name

-

Type

-

Mandatory

-

Description

-

year

-

number

-

Yes

-

Year.

-

month

-

number

-

Yes

-

Month.

-

day

-

number

-

Yes

-

Date.

-

hour

-

number

-

Yes

-

Hour.

-

minute

-

number

-

Yes

-

Minute.

-

second

-

number

-

No

-

Second.

-
+- **System capability**: SystemCapability.Notification.ReminderAgent + +| Name| Type| Mandatory| Description| +| -------- | -------- | -------- | -------- | +| year | number | Yes| Year.| +| month | number | Yes| Month.| +| day | number | Yes| Date.| +| hour | number | Yes| Hour.| +| minute | number | Yes| Minute.| +| second | number | No| Second.|