1# @ohos.reminderAgent (reminderAgent) 2 3The **reminderAgent** module provides APIs for publishing scheduled reminders through the reminder agent. 4 5You 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. 6 7> **NOTE** 8> 9> This module is deprecated since API version 9. You are advised to use [@ohos.reminderAgentManager](js-apis-reminderAgentManager.md) instead. 10> 11> 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. 12 13 14## Modules to Import 15 16```ts 17import reminderAgent from'@ohos.reminderAgent'; 18``` 19 20 21## reminderAgent.publishReminder<sup>(deprecated)</sup> 22 23publishReminder(reminderReq: ReminderRequest, callback: AsyncCallback\<number>): void 24 25Publishes 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). 26 27> **NOTE** 28> 29> 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). 30 31**Required permissions**: ohos.permission.PUBLISH_AGENT_REMINDER 32 33**System capability**: SystemCapability.Notification.ReminderAgent 34 35**Parameters** 36 37 | Name| Type| Mandatory| Description| 38 | -------- | -------- | -------- | -------- | 39 | reminderReq | [ReminderRequest](#reminderrequest) | Yes| Reminder to be published.| 40 | callback | AsyncCallback\<number> | Yes| Callback used to return the published reminder's ID.| 41 42**Example** 43```ts 44import { BusinessError } from '@ohos.base'; 45 46let timer:reminderAgent.ReminderRequestTimer = { 47 reminderType: reminderAgent.ReminderType.REMINDER_TYPE_TIMER, 48 triggerTimeInSeconds: 10 49} 50 51reminderAgent.publishReminder(timer, (err: BusinessError, reminderId: number) => { 52 console.log("callback, reminderId = " + reminderId); 53}); 54``` 55 56 57## reminderAgent.publishReminder<sup>(deprecated)</sup> 58 59publishReminder(reminderReq: ReminderRequest): Promise\<number> 60 61Publishes 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). 62 63> **NOTE** 64> 65> 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). 66 67**Required permissions**: ohos.permission.PUBLISH_AGENT_REMINDER 68 69**System capability**: SystemCapability.Notification.ReminderAgent 70 71**Parameters** 72 | Name| Type| Mandatory| Description| 73 | -------- | -------- | -------- | -------- | 74 | reminderReq | [ReminderRequest](#reminderrequest) | Yes| Reminder to be published.| 75 76**Return value** 77 | Type| Description| 78 | -------- | -------- | 79 | Promise\<number> | Promise used to return the published reminder's ID.| 80 81**Example** 82```ts 83let timer:reminderAgent.ReminderRequestTimer = { 84 reminderType: reminderAgent.ReminderType.REMINDER_TYPE_TIMER, 85 triggerTimeInSeconds: 10 86} 87 88reminderAgent.publishReminder(timer).then((reminderId: number) => { 89 console.log("promise, reminderId = " + reminderId); 90}); 91``` 92 93 94## reminderAgent.cancelReminder<sup>(deprecated)</sup> 95 96cancelReminder(reminderId: number, callback: AsyncCallback\<void>): void 97 98Cancels the reminder with the specified ID. This API uses an asynchronous callback to return the cancellation result. 99 100> **NOTE** 101> 102> 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). 103 104**System capability**: SystemCapability.Notification.ReminderAgent 105 106**Parameters** 107 108| Name| Type| Mandatory| Description| 109| -------- | -------- | -------- | -------- | 110| reminderId | number | Yes| ID of the reminder to cancel. The value is obtained by calling [publishReminder](#reminderagentpublishreminder).| 111| callback | AsyncCallback\<void> | Yes| Callback used to return the result.| 112 113**Example** 114 115```ts 116import { BusinessError } from '@ohos.base'; 117 118reminderAgent.cancelReminder(1, (err: BusinessError, data: void) => { 119 console.log("cancelReminder callback"); 120}); 121``` 122 123 124## reminderAgent.cancelReminder<sup>(deprecated)</sup> 125 126cancelReminder(reminderId: number): Promise\<void> 127 128Cancels the reminder with the specified ID. This API uses a promise to return the cancellation result. 129 130> **NOTE** 131> 132> 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). 133 134**System capability**: SystemCapability.Notification.ReminderAgent 135 136**Parameters** 137 138| Name| Type| Mandatory| Description| 139| -------- | -------- | -------- | -------- | 140| reminderId | number | Yes| ID of the reminder to cancel. The value is obtained by calling [publishReminder](#reminderagentpublishreminder).| 141 142**Return value** 143 144| Type| Description| 145| -------- | -------- | 146| Promise\<void> | Promise used to return the result.| 147 148**Example** 149 150```ts 151reminderAgent.cancelReminder(1).then(() => { 152 console.log("cancelReminder promise"); 153}); 154``` 155 156## reminderAgent.getValidReminders<sup>(deprecated)</sup> 157 158getValidReminders(callback: AsyncCallback\<Array\<ReminderRequest>>): void 159 160Obtains all valid (not yet expired) reminders set by the current application. This API uses an asynchronous callback to return the reminders. 161 162> **NOTE** 163> 164> 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). 165 166**System capability**: SystemCapability.Notification.ReminderAgent 167 168**Parameters** 169 170| Name| Type| Mandatory| Description| 171| -------- | -------- | -------- | -------- | 172| callback | AsyncCallback\<Array\<[ReminderRequest](#reminderrequest)>> | Yes| Callback used to return an array of all valid reminders set by the current application.| 173 174**Example** 175 176```ts 177import { BusinessError } from '@ohos.base'; 178 179reminderAgent.getValidReminders((err: BusinessError, reminders: Array<reminderAgent.ReminderRequest>) => { 180 console.log("callback, getValidReminders length = " + reminders.length); 181 for (let i = 0; i < reminders.length; i++) { 182 console.log("getValidReminders = " + reminders[i]); 183 console.log("getValidReminders, reminderType = " + reminders[i].reminderType); 184 const actionButton = reminders[i].actionButton || []; 185 for (let j = 0; j < actionButton.length; j++) { 186 console.log("getValidReminders, actionButton.title = " + actionButton[j]?.title); 187 console.log("getValidReminders, actionButton.type = " + actionButton[j]?.type); 188 } 189 console.log("getValidReminders, wantAgent.pkgName = " + reminders[i].wantAgent?.pkgName); 190 console.log("getValidReminders, wantAgent.abilityName = " + reminders[i].wantAgent?.abilityName); 191 console.log("getValidReminders, maxScreenWantAgent.pkgName = " + reminders[i].maxScreenWantAgent?.pkgName); 192 console.log("getValidReminders, maxScreenWantAgent.abilityName = " + reminders[i].maxScreenWantAgent?.abilityName); 193 console.log("getValidReminders, ringDuration = " + reminders[i].ringDuration); 194 console.log("getValidReminders, snoozeTimes = " + reminders[i].snoozeTimes); 195 console.log("getValidReminders, timeInterval = " + reminders[i].timeInterval); 196 console.log("getValidReminders, title = " + reminders[i].title); 197 console.log("getValidReminders, content = " + reminders[i].content); 198 console.log("getValidReminders, expiredContent = " + reminders[i].expiredContent); 199 console.log("getValidReminders, snoozeContent = " + reminders[i].snoozeContent); 200 console.log("getValidReminders, notificationId = " + reminders[i].notificationId); 201 console.log("getValidReminders, slotType = " + reminders[i].slotType); 202 } 203}) 204``` 205 206 207## reminderAgent.getValidReminders<sup>(deprecated)</sup> 208 209getValidReminders(): Promise\<Array\<ReminderRequest>> 210 211Obtains all valid (not yet expired) reminders set by the current application. This API uses a promise to return the reminders. 212 213> **NOTE** 214> 215> 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). 216 217**System capability**: SystemCapability.Notification.ReminderAgent 218 219**Return value** 220 221| Type| Description| 222| -------- | -------- | 223| Promise\<Array\<[ReminderRequest](#reminderrequest)>> | Promise used to return an array of all valid reminders set by the current application.| 224 225**Example** 226 227```ts 228reminderAgent.getValidReminders().then((reminders: Array<reminderAgent.ReminderRequest>) => { 229 console.log("promise, getValidReminders length = " + reminders.length); 230 for (let i = 0; i < reminders.length; i++) { 231 console.log("getValidReminders = " + reminders[i]); 232 console.log("getValidReminders, reminderType = " + reminders[i].reminderType); 233 const actionButton = reminders[i].actionButton || []; 234 for (let j = 0; j < actionButton.length; j++) { 235 console.log("getValidReminders, actionButton.title = " + actionButton[j]?.title); 236 console.log("getValidReminders, actionButton.type = " + actionButton[j]?.type); 237 } 238 console.log("getValidReminders, wantAgent.pkgName = " + reminders[i].wantAgent?.pkgName); 239 console.log("getValidReminders, wantAgent.abilityName = " + reminders[i].wantAgent?.abilityName); 240 console.log("getValidReminders, maxScreenWantAgent.pkgName = " + reminders[i].maxScreenWantAgent?.pkgName); 241 console.log("getValidReminders, maxScreenWantAgent.abilityName = " + reminders[i].maxScreenWantAgent?.abilityName); 242 console.log("getValidReminders, ringDuration = " + reminders[i].ringDuration); 243 console.log("getValidReminders, snoozeTimes = " + reminders[i].snoozeTimes); 244 console.log("getValidReminders, timeInterval = " + reminders[i].timeInterval); 245 console.log("getValidReminders, title = " + reminders[i].title); 246 console.log("getValidReminders, content = " + reminders[i].content); 247 console.log("getValidReminders, expiredContent = " + reminders[i].expiredContent); 248 console.log("getValidReminders, snoozeContent = " + reminders[i].snoozeContent); 249 console.log("getValidReminders, notificationId = " + reminders[i].notificationId); 250 console.log("getValidReminders, slotType = " + reminders[i].slotType); 251 } 252}) 253 254``` 255 256 257## reminderAgent.cancelAllReminders<sup>(deprecated)</sup> 258 259cancelAllReminders(callback: AsyncCallback\<void>): void 260 261Cancels all reminders set by the current application. This API uses an asynchronous callback to return the cancellation result. 262 263> **NOTE** 264> 265> 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). 266 267**System capability**: SystemCapability.Notification.ReminderAgent 268 269**Parameters** 270 271| Name| Type| Mandatory| Description| 272| -------- | -------- | -------- | -------- | 273| callback | AsyncCallback\<void> | Yes| Callback used to return the result.| 274 275**Example** 276 277```ts 278import { BusinessError } from '@ohos.base'; 279 280reminderAgent.cancelAllReminders((err: BusinessError, data: void) =>{ 281 console.log("cancelAllReminders callback") 282}) 283``` 284 285 286## reminderAgent.cancelAllReminders<sup>(deprecated)</sup> 287 288cancelAllReminders(): Promise\<void> 289 290Cancels all reminders set by the current application. This API uses a promise to return the cancellation result. 291 292> **NOTE** 293> 294> 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). 295 296**System capability**: SystemCapability.Notification.ReminderAgent 297 298**Return value** 299 300| Type| Description| 301| -------- | -------- | 302| Promise\<void> | Promise used to return the result.| 303 304**Example** 305 306```ts 307reminderAgent.cancelAllReminders().then(() => { 308 console.log("cancelAllReminders promise") 309}) 310``` 311 312## reminderAgent.addNotificationSlot<sup>(deprecated)</sup> 313 314addNotificationSlot(slot: NotificationSlot, callback: AsyncCallback\<void>): void 315 316Adds a notification slot. This API uses an asynchronous callback to return the result. 317 318> **NOTE** 319> 320> 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). 321 322**System capability**: SystemCapability.Notification.ReminderAgent 323 324**Parameters** 325 326| Name| Type| Mandatory| Description| 327| -------- | -------- | -------- | -------- | 328| slot | [NotificationSlot](js-apis-notification.md#notificationslot) | Yes| Notification slot, whose type can be set.| 329| callback | AsyncCallback\<void> | Yes| Callback used to return the result.| 330 331**Example** 332 333```ts 334import notification from '@ohos.notificationManager' 335import { BusinessError } from '@ohos.base'; 336 337let mySlot:notification.NotificationSlot = { 338 type: notification.SlotType.SOCIAL_COMMUNICATION 339} 340reminderAgent.addNotificationSlot(mySlot, (err: BusinessError, data: void) => { 341 console.log("addNotificationSlot callback"); 342}); 343``` 344 345 346## reminderAgent.addNotificationSlot<sup>(deprecated)</sup> 347 348addNotificationSlot(slot: NotificationSlot): Promise\<void> 349 350Adds a notification slot. This API uses a promise to return the result. 351 352> **NOTE** 353> 354> 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). 355 356**System capability**: SystemCapability.Notification.ReminderAgent 357 358**Parameters** 359 360| Name| Type| Mandatory| Description| 361| -------- | -------- | -------- | -------- | 362| slot | [NotificationSlot](js-apis-notification.md#notificationslot) | Yes| Notification slot, whose type can be set.| 363 364**Return value** 365 366| Type| Description| 367| -------- | -------- | 368| Promise\<void> | Promise used to return the result.| 369 370**Example** 371 372```ts 373import notification from '@ohos.notificationManager' 374 375let mySlot:notification.NotificationSlot = { 376 type: notification.SlotType.SOCIAL_COMMUNICATION 377} 378reminderAgent.addNotificationSlot(mySlot).then(() => { 379 console.log("addNotificationSlot promise"); 380}); 381``` 382 383 384## reminderAgent.removeNotificationSlot<sup>(deprecated)</sup> 385 386removeNotificationSlot(slotType: notification.SlotType, callback: AsyncCallback\<void>): void 387 388Removes a notification slot of a specified type. This API uses an asynchronous callback to return the result. 389 390> **NOTE** 391> 392> 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). 393 394**System capability**: SystemCapability.Notification.ReminderAgent 395 396**Parameters** 397 398| Name| Type| Mandatory| Description| 399| -------- | -------- | -------- | -------- | 400| slotType | [notification.SlotType](js-apis-notification.md#slottype) | Yes| Type of the reminder notification slot to remove.| 401| callback | AsyncCallback\<void> | Yes| Callback used to return the result.| 402 403**Example** 404 405```ts 406import notification from '@ohos.notification' 407import { BusinessError } from '@ohos.base'; 408 409reminderAgent.removeNotificationSlot(notification.SlotType.CONTENT_INFORMATION, (err: BusinessError, data: void) => { 410 console.log("removeNotificationSlot callback"); 411}); 412``` 413 414 415## reminderAgent.removeNotificationSlot<sup>(deprecated)</sup> 416 417removeNotificationSlot(slotType: notification.SlotType): Promise\<void> 418 419Removes a notification slot of a specified type. This API uses a promise to return the result. 420 421> **NOTE** 422> 423> 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). 424 425**System capability**: SystemCapability.Notification.ReminderAgent 426 427**Parameters** 428 429| Name| Type| Mandatory| Description| 430| -------- | -------- | -------- | -------- | 431| slotType | [notification.SlotType](js-apis-notification.md#slottype) | Yes| Type of the reminder notification slot to remove.| 432 433**Return value** 434 435| Type| Description| 436| -------- | -------- | 437| Promise\<void> | Promise used to return the result.| 438 439**Example** 440 441```ts 442import notification from '@ohos.notification' 443 444reminderAgent.removeNotificationSlot(notification.SlotType.CONTENT_INFORMATION).then(() => { 445 console.log("removeNotificationSlot promise"); 446}); 447``` 448 449 450## ActionButtonType<sup>(deprecated)</sup> 451 452Enumerates button types. 453 454> **NOTE** 455> 456> 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). 457 458**System capability**: SystemCapability.Notification.ReminderAgent 459 460| Name| Value| Description| 461| -------- | -------- | -------- | 462| ACTION_BUTTON_TYPE_CLOSE | 0 | Button for closing the reminder.| 463| ACTION_BUTTON_TYPE_SNOOZE | 1 | Button for snoozing the reminder.| 464 465 466## ReminderType<sup>(deprecated)</sup> 467 468Enumerates reminder types. 469 470> **NOTE** 471> 472> 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). 473 474**System capability**: SystemCapability.Notification.ReminderAgent 475 476| Name| Value| Description| 477| -------- | -------- | -------- | 478| REMINDER_TYPE_TIMER | 0 | Countdown reminder.| 479| REMINDER_TYPE_CALENDAR | 1 | Calendar reminder.| 480| REMINDER_TYPE_ALARM | 2 | Alarm reminder.| 481 482 483## ActionButton<sup>(deprecated)</sup> 484 485Defines a button displayed in the reminder notification. 486 487> **NOTE** 488> 489> 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). 490 491**System capability**: SystemCapability.Notification.ReminderAgent 492 493| Name| Type| Mandatory| Description| 494| -------- | -------- | -------- | -------- | 495| title | string | Yes| Text on the button.| 496| type | [ActionButtonType](#actionbuttontype) | Yes| Button type.| 497 498 499## WantAgent<sup>(deprecated)</sup> 500 501Sets the package and ability that are redirected to when the reminder notification is clicked. 502 503> **NOTE** 504> 505> 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). 506 507**System capability**: SystemCapability.Notification.ReminderAgent 508 509| Name| Type| Mandatory| Description| 510| -------- | -------- | -------- | -------- | 511| pkgName | string | Yes| Name of the HAP that is redirected to when the reminder notification is clicked.| 512| abilityName | string | Yes| Name of the ability that is redirected to when the reminder notification is clicked.| 513 514 515## MaxScreenWantAgent<sup>(deprecated)</sup> 516 517Provides the information about the target package and ability to start automatically when the reminder is displayed in full-screen mode. This API is reserved. 518 519> **NOTE** 520> 521> 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). 522 523**System capability**: SystemCapability.Notification.ReminderAgent 524 525| Name| Type| Mandatory| Description| 526| -------- | -------- | -------- | -------- | 527| pkgName | string | Yes| Name of the HAP that is automatically started when the reminder arrives and the device is not in use.| 528| abilityName | string | Yes| Name of the ability that is automatically started when the reminder arrives and the device is not in use.| 529 530 531## ReminderRequest<sup>(deprecated)</sup> 532 533Defines the reminder to publish. 534 535> **NOTE** 536> 537> 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). 538 539**System capability**: SystemCapability.Notification.ReminderAgent 540 541| Name| Type| Mandatory| Description| 542| -------- | -------- | -------- | -------- | 543| reminderType | [ReminderType](#remindertype) | Yes| Type of the reminder.| 544| actionButton | [ActionButton](#actionbutton) | No| Button displayed in the reminder notification. (The parameter is optional. Up to two buttons are supported.)| 545| wantAgent | [WantAgent](#wantagent) | No| Information about the ability that is redirected to when the notification is clicked.| 546| 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.| 547| ringDuration | number | No| Ringing duration, in seconds. The default value is **1**.| 548| snoozeTimes | number | No| Number of reminder snooze times. The default value is **0**.| 549| timeInterval | number | No| Reminder snooze interval, in seconds. The default value is **0**.| 550| title | string | No| Reminder title.| 551| content | string | No| Reminder content.| 552| expiredContent | string | No| Content to be displayed after the reminder expires.| 553| snoozeContent | string | No| Content to be displayed when the reminder is snoozing.| 554| 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.| 555| slotType | [notification.SlotType](js-apis-notification.md#slottype) | No| Type of the slot used by the reminder.| 556 557 558## ReminderRequestCalendar<sup>(deprecated)</sup> 559 560 561Defines a reminder for a calendar event. 562 563> **NOTE** 564> 565> 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). 566 567**System capability**: SystemCapability.Notification.ReminderAgent 568 569| Name| Type| Mandatory| Description| 570| -------- | -------- | -------- | -------- | 571| dateTime | [LocalDateTime](#localdatetime) | Yes| Reminder time.| 572| repeatMonths | Array\<number> | No| Month in which the reminder repeats.| 573| repeatDays | Array\<number> | No| Date on which the reminder repeats.| 574 575 576## ReminderRequestAlarm<sup>(deprecated)</sup> 577 578 579Defines a reminder for an alarm. 580 581> **NOTE** 582> 583> 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). 584 585**System capability**: SystemCapability.Notification.ReminderAgent 586 587| Name| Type| Mandatory| Description| 588| -------- | -------- | -------- | -------- | 589| hour | number | Yes| Hour portion of the reminder time.| 590| minute | number | Yes| Minute portion of the reminder time.| 591| 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.| 592 593 594## ReminderRequestTimer<sup>(deprecated)</sup> 595 596Defines a reminder for a scheduled timer. 597 598> **NOTE** 599> 600> 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). 601 602**System capability**: SystemCapability.Notification.ReminderAgent 603 604| Name| Type| Mandatory| Description| 605| -------- | -------- | -------- | -------- | 606| triggerTimeInSeconds | number | Yes| Number of seconds in the countdown timer.| 607 608 609## LocalDateTime<sup>(deprecated)</sup> 610 611Sets the time information for a calendar reminder. 612 613> **NOTE** 614> 615> 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). 616 617**System capability**: SystemCapability.Notification.ReminderAgent 618 619| Name| Type| Mandatory| Description| 620| -------- | -------- | -------- | -------- | 621| year | number | Yes| Year.| 622| month | number | Yes| Month.| 623| day | number | Yes| Date.| 624| hour | number | Yes| Hour.| 625| minute | number | Yes| Minute.| 626| second | number | No| Second.| 627