1# @ohos.reminderAgentManager (Agent-Powered Reminders) 2 3The **reminderAgentManager** module provides APIs related to agent-powered reminders. When your application is frozen or exits, the timing and notification functions of your application will be taken over by a system service running in the background. You can use the APIs to create scheduled reminders for countdown timers, calendar events, and alarm clocks. 4 5> **NOTE** 6> 7> The initial APIs of this module are supported since API version 9. Newly added APIs will be marked with a superscript to indicate their earliest API version. 8 9 10## Modules to Import 11 12```ts 13import reminderAgentManager from '@ohos.reminderAgentManager'; 14``` 15 16## reminderAgentManager.publishReminder 17 18publishReminder(reminderReq: ReminderRequest, callback: AsyncCallback\<number>): void 19 20Publishes a reminder. This API uses an asynchronous callback to return the result. 21 22> **NOTE** 23> 24> This API can be called only after the [Notification.requestEnableNotification](js-apis-notification.md#notificationrequestenablenotification8) permission is obtained. 25 26**Required permissions**: ohos.permission.PUBLISH_AGENT_REMINDER 27 28**System capability**: SystemCapability.Notification.ReminderAgent 29 30**Parameters** 31 32 | Name| Type| Mandatory| Description| 33 | -------- | -------- | -------- | -------- | 34 | reminderReq | [ReminderRequest](#reminderrequest) | Yes| Request used for publishing the reminder.| 35 | callback | AsyncCallback\<number> | Yes| Callback used to return the published reminder's ID.| 36 37**Error codes** 38 39For details about the error codes, see [reminderAgentManager Error Codes](../errorcodes/errorcode-reminderAgentManager.md). 40 41| ID | Error Message| 42| --------- | ------- | 43| 1700001 | Notification is not enabled. | 44| 1700002 | The number of reminders exceeds the limit. | 45 46**Example** 47```ts 48import { BusinessError } from '@ohos.base'; 49 50let timer: reminderAgentManager.ReminderRequestTimer = { 51 reminderType: reminderAgentManager.ReminderType.REMINDER_TYPE_TIMER, 52 triggerTimeInSeconds: 10 53} 54 55reminderAgentManager.publishReminder(timer, (err: BusinessError, reminderId: number) => { 56 if (err.code) { 57 console.error("callback err code:" + err.code + " message:" + err.message); 58 } else { 59 console.log("callback, reminderId = " + reminderId); 60 } 61}); 62``` 63 64## reminderAgentManager.publishReminder 65 66publishReminder(reminderReq: ReminderRequest): Promise\<number> 67 68Publishes a reminder. This API uses a promise to return the result. 69 70> **NOTE** 71> 72> This API can be called only after the [Notification.requestEnableNotification](js-apis-notification.md#notificationrequestenablenotification8) permission is obtained. 73 74**Required permissions**: ohos.permission.PUBLISH_AGENT_REMINDER 75 76**System capability**: SystemCapability.Notification.ReminderAgent 77 78**Parameters** 79 | Name| Type| Mandatory| Description| 80 | -------- | -------- | -------- | -------- | 81 | reminderReq | [ReminderRequest](#reminderrequest) | Yes| Request used for publishing the reminder.| 82 83**Return value** 84 | Type| Description| 85 | -------- | -------- | 86 | Promise\<number> | Promise used to return the published reminder's ID.| 87 88**Error codes** 89 90For details about the error codes, see [reminderAgentManager Error Codes](../errorcodes/errorcode-reminderAgentManager.md). 91 92| ID | Error Message| 93| --------- | ------- | 94| 1700001 | Notification is not enabled. | 95| 1700002 | The number of reminders exceeds the limit. | 96 97**Example** 98```ts 99import { BusinessError } from '@ohos.base'; 100 101let timer: reminderAgentManager.ReminderRequestTimer = { 102 reminderType: reminderAgentManager.ReminderType.REMINDER_TYPE_TIMER, 103 triggerTimeInSeconds: 10 104} 105 106reminderAgentManager.publishReminder(timer).then((reminderId: number) => { 107 console.log("promise, reminderId = " + reminderId); 108}).catch((err: BusinessError) => { 109 console.error("promise err code:" + err.code + " message:" + err.message); 110}); 111``` 112 113 114## reminderAgentManager.cancelReminder 115 116cancelReminder(reminderId: number, callback: AsyncCallback\<void>): void 117 118Cancels a reminder published. This API uses an asynchronous callback to return the result. 119 120**System capability**: SystemCapability.Notification.ReminderAgent 121 122**Parameters** 123 124| Name| Type| Mandatory| Description| 125| -------- | -------- | -------- | -------- | 126| reminderId | number | Yes| ID of the reminder to cancel.| 127| callback | AsyncCallback\<void> | Yes| Callback used to return the result. If the reminder is canceled, **err** is **undefined**. Otherwise, **err** is an error object.| 128 129**Error codes** 130 131For details about the error codes, see [reminderAgentManager Error Codes](../errorcodes/errorcode-reminderAgentManager.md). 132 133| ID | Error Message| 134| --------- | ------- | 135| 1700003 | The reminder does not exist. | 136| 1700004 | The bundle name does not exist. | 137 138**Example** 139 140```ts 141import { BusinessError } from '@ohos.base'; 142 143let reminderId: number = 1; 144reminderAgentManager.cancelReminder(reminderId, (err: BusinessError) => { 145 if (err.code) { 146 console.error("callback err code:" + err.code + " message:" + err.message); 147 } else { 148 console.log("cancelReminder callback"); 149 } 150}); 151``` 152 153## reminderAgentManager.cancelReminder 154 155cancelReminder(reminderId: number): Promise\<void> 156 157Cancels a reminder published. This API uses a promise to return the result. 158 159**System capability**: SystemCapability.Notification.ReminderAgent 160 161**Parameters** 162 163| Name| Type| Mandatory| Description| 164| -------- | -------- | -------- | -------- | 165| reminderId | number | Yes| ID of the reminder to cancel.| 166 167**Return value** 168 169| Type| Description| 170| -------- | -------- | 171| Promise\<void> | Promise that returns no value.| 172 173**Error codes** 174 175For details about the error codes, see [reminderAgentManager Error Codes](../errorcodes/errorcode-reminderAgentManager.md). 176 177| ID | Error Message| 178| --------- | ------- | 179| 1700003 | The reminder does not exist. | 180| 1700004 | The bundle name does not exist. | 181 182**Example** 183 184```ts 185import { BusinessError } from '@ohos.base'; 186 187let reminderId: number = 1; 188reminderAgentManager.cancelReminder(reminderId).then(() => { 189 console.log("cancelReminder promise"); 190}).catch((err: BusinessError) => { 191 console.error("promise err code:" + err.code + " message:" + err.message); 192}); 193``` 194 195## reminderAgentManager.getValidReminders 196 197getValidReminders(callback: AsyncCallback<Array\<ReminderRequest>>): void 198 199Obtains all valid (not yet expired) reminders set by the current application. This API uses an asynchronous callback to return the result. 200 201> **NOTE** 202> 203> When the preset reminder time arrives, a notification message is displayed in the notification center. The reminder is valid before the user touches the CLOSE button to close the message. 204> 205> For an alarm reminder that repeats every day, the reminder is valid regardless of whether the user touches the CLOSE button. 206 207**System capability**: SystemCapability.Notification.ReminderAgent 208 209**Parameters** 210 211| Name| Type| Mandatory| Description| 212| -------- | -------- | -------- | -------- | 213| callback | AsyncCallback\<Array\<[ReminderRequest](#reminderrequest)>> | Yes| Callback used to return all the valid reminders.| 214 215**Error codes** 216 217For details about the error codes, see [reminderAgentManager Error Codes](../errorcodes/errorcode-reminderAgentManager.md). 218 219| ID | Error Message| 220| --------- | ------- | 221| 1700004 | The bundle name does not exist. | 222 223**Example** 224 225```ts 226import { BusinessError } from '@ohos.base'; 227 228reminderAgentManager.getValidReminders((err: BusinessError, reminders: Array<reminderAgentManager.ReminderRequest>) => { 229 if (err.code) { 230 console.error("callback err code:" + err.code + " message:" + err.message); 231 } else { 232 console.log("callback, getValidReminders length = " + reminders.length); 233 for (let i = 0; i < reminders.length; i++) { 234 console.log("getValidReminders = " + reminders[i]); 235 console.log("getValidReminders, reminderType = " + reminders[i].reminderType); 236 const actionButton = reminders[i].actionButton || []; 237 for (let j = 0; j < actionButton.length; j++) { 238 console.log("getValidReminders, actionButton.title = " + actionButton[j]?.title); 239 console.log("getValidReminders, actionButton.type = " + actionButton[j]?.type); 240 } 241 console.log("getValidReminders, wantAgent.pkgName = " + reminders[i].wantAgent?.pkgName); 242 console.log("getValidReminders, wantAgent.abilityName = " + reminders[i].wantAgent?.abilityName); 243 console.log("getValidReminders, maxScreenWantAgent.pkgName = " + reminders[i].maxScreenWantAgent?.pkgName); 244 console.log("getValidReminders, maxScreenWantAgent.abilityName = " + reminders[i].maxScreenWantAgent?.abilityName); 245 console.log("getValidReminders, ringDuration = " + reminders[i].ringDuration); 246 console.log("getValidReminders, snoozeTimes = " + reminders[i].snoozeTimes); 247 console.log("getValidReminders, timeInterval = " + reminders[i].timeInterval); 248 console.log("getValidReminders, title = " + reminders[i].title); 249 console.log("getValidReminders, content = " + reminders[i].content); 250 console.log("getValidReminders, expiredContent = " + reminders[i].expiredContent); 251 console.log("getValidReminders, snoozeContent = " + reminders[i].snoozeContent); 252 console.log("getValidReminders, notificationId = " + reminders[i].notificationId); 253 console.log("getValidReminders, slotType = " + reminders[i].slotType); 254 } 255 } 256}); 257``` 258 259## reminderAgentManager.getValidReminders 260 261getValidReminders(): Promise\<Array\<ReminderRequest>> 262 263Obtains all valid (not yet expired) reminders set by the current application. This API uses a promise to return the result. 264 265> **NOTE** 266> 267> When the preset reminder time arrives, a notification message is displayed in the notification center. The reminder is valid before the user touches the CLOSE button to close the message. 268> 269> For an alarm reminder that repeats every day, the reminder is valid regardless of whether the user touches the CLOSE button. 270 271**System capability**: SystemCapability.Notification.ReminderAgent 272 273**Return value** 274 275| Type| Description| 276| -------- | -------- | 277| Promise\<Array\<[ReminderRequest](#reminderrequest)>> | Promise used to return all the valid reminders.| 278 279**Error codes** 280 281For details about the error codes, see [reminderAgentManager Error Codes](../errorcodes/errorcode-reminderAgentManager.md). 282 283| ID | Error Message| 284| --------- | ------- | 285| 1700004 | The bundle name does not exist. | 286 287**Example** 288 289```ts 290import { BusinessError } from '@ohos.base'; 291 292reminderAgentManager.getValidReminders().then((reminders: Array<reminderAgentManager.ReminderRequest>) => { 293 console.log("promise, getValidReminders length = " + reminders.length); 294 for (let i = 0; i < reminders.length; i++) { 295 console.log("getValidReminders = " + reminders[i]); 296 console.log("getValidReminders, reminderType = " + reminders[i].reminderType); 297 const actionButton = reminders[i].actionButton || []; 298 for (let j = 0; j < actionButton.length; j++) { 299 console.log("getValidReminders, actionButton.title = " + actionButton[j]?.title); 300 console.log("getValidReminders, actionButton.type = " + actionButton[j]?.type); 301 } 302 console.log("getValidReminders, wantAgent.pkgName = " + reminders[i].wantAgent?.pkgName); 303 console.log("getValidReminders, wantAgent.abilityName = " + reminders[i].wantAgent?.abilityName); 304 console.log("getValidReminders, maxScreenWantAgent.pkgName = " + reminders[i].maxScreenWantAgent?.pkgName); 305 console.log("getValidReminders, maxScreenWantAgent.abilityName = " + reminders[i].maxScreenWantAgent?.abilityName); 306 console.log("getValidReminders, ringDuration = " + reminders[i].ringDuration); 307 console.log("getValidReminders, snoozeTimes = " + reminders[i].snoozeTimes); 308 console.log("getValidReminders, timeInterval = " + reminders[i].timeInterval); 309 console.log("getValidReminders, title = " + reminders[i].title); 310 console.log("getValidReminders, content = " + reminders[i].content); 311 console.log("getValidReminders, expiredContent = " + reminders[i].expiredContent); 312 console.log("getValidReminders, snoozeContent = " + reminders[i].snoozeContent); 313 console.log("getValidReminders, notificationId = " + reminders[i].notificationId); 314 console.log("getValidReminders, slotType = " + reminders[i].slotType); 315 } 316}).catch((err: BusinessError) => { 317 console.error("promise err code:" + err.code + " message:" + err.message); 318}); 319``` 320 321## reminderAgentManager.cancelAllReminders 322 323cancelAllReminders(callback: AsyncCallback\<void>): void 324 325Cancels all reminders set by the current application. This API uses an asynchronous callback to return the result. 326 327**System capability**: SystemCapability.Notification.ReminderAgent 328 329**Parameters** 330 331| Name| Type| Mandatory| Description| 332| -------- | -------- | -------- | -------- | 333| callback | AsyncCallback\<void> | Yes| Callback used to return the result. If all the reminders are canceled, **err** is **undefined**. Otherwise, **err** is an error object. | 334 335**Error codes** 336 337For details about the error codes, see [reminderAgentManager Error Codes](../errorcodes/errorcode-reminderAgentManager.md). 338 339| ID | Error Message| 340| --------- | ------- | 341| 1700004 | The bundle name does not exist. | 342 343**Example** 344 345```ts 346import { BusinessError } from '@ohos.base'; 347 348reminderAgentManager.cancelAllReminders((err: BusinessError) =>{ 349 if (err.code) { 350 console.error("callback err code:" + err.code + " message:" + err.message); 351 } else { 352 console.log("cancelAllReminders callback") 353 } 354}); 355``` 356 357## reminderAgentManager.cancelAllReminders 358 359cancelAllReminders(): Promise\<void> 360 361Cancels all reminders set by the current application. This API uses a promise to return the result. 362 363**System capability**: SystemCapability.Notification.ReminderAgent 364 365**Return value** 366 367| Type| Description| 368| -------- | -------- | 369| Promise\<void> | Promise that returns no value.| 370 371**Error codes** 372 373For details about the error codes, see [reminderAgentManager Error Codes](../errorcodes/errorcode-reminderAgentManager.md). 374 375| ID | Error Message| 376| --------- | ------- | 377| 1700004 | The bundle name does not exist. | 378 379**Example** 380 381```ts 382import { BusinessError } from '@ohos.base'; 383 384reminderAgentManager.cancelAllReminders().then(() => { 385 console.log("cancelAllReminders promise") 386}).catch((err: BusinessError) => { 387 console.error("promise err code:" + err.code + " message:" + err.message); 388}); 389``` 390 391 392## reminderAgentManager.addNotificationSlot 393 394addNotificationSlot(slot: NotificationSlot, callback: AsyncCallback\<void>): void 395 396Adds a notification slot. This API uses an asynchronous callback to return the result. 397 398**System capability**: SystemCapability.Notification.ReminderAgent 399 400**Parameters** 401 402| Name| Type| Mandatory| Description| 403| -------- | -------- | -------- | -------- | 404| slot | [NotificationSlot](js-apis-inner-notification-notificationSlot.md#notificationslot) | Yes| notificationManager\.slot instance. Only **notificationType** can be set.| 405| callback | AsyncCallback\<void> | Yes| Callback used to return the result. If the notification slot is added, **err** is **undefined**. Otherwise, **err** is an error object.| 406 407**Example** 408 409```ts 410import notificationManager from '@ohos.notificationManager' 411import { BusinessError } from '@ohos.base'; 412 413let mySlot: notificationManager.NotificationSlot = { 414 notificationType: notificationManager.SlotType.SOCIAL_COMMUNICATION 415} 416 417reminderAgentManager.addNotificationSlot(mySlot, (err: BusinessError) => { 418 if (err.code) { 419 console.error("callback err code:" + err.code + " message:" + err.message); 420 } else { 421 console.log("addNotificationSlot callback"); 422 } 423}); 424``` 425 426 427## reminderAgentManager.addNotificationSlot 428 429addNotificationSlot(slot: NotificationSlot): Promise\<void> 430 431Adds a notification slot. This API uses a promise to return the result. 432 433**System capability**: SystemCapability.Notification.ReminderAgent 434 435**Parameters** 436 437| Name| Type| Mandatory| Description| 438| -------- | -------- | -------- | -------- | 439| slot | [NotificationSlot](js-apis-inner-notification-notificationSlot.md#notificationslot) | Yes| notificationManager\.slot instance. Only **notificationType** can be set.| 440 441**Return value** 442 443| Type| Description| 444| -------- | -------- | 445| Promise\<void> | Promise that returns no value.| 446 447**Example** 448 449```ts 450import notificationManager from '@ohos.notificationManager' 451import { BusinessError } from '@ohos.base'; 452 453let mySlot: notificationManager.NotificationSlot = { 454 notificationType: notificationManager.SlotType.SOCIAL_COMMUNICATION 455} 456reminderAgentManager.addNotificationSlot(mySlot).then(() => { 457 console.log("addNotificationSlot promise"); 458}).catch((err: BusinessError) => { 459 console.error("promise err code:" + err.code + " message:" + err.message); 460}); 461``` 462 463 464## reminderAgentManager.removeNotificationSlot 465 466removeNotificationSlot(slotType: notification.SlotType, callback: AsyncCallback\<void>): void 467 468Removes a notification slot. This API uses an asynchronous callback to return the result. 469 470**System capability**: SystemCapability.Notification.ReminderAgent 471 472**Parameters** 473 474| Name| Type| Mandatory| Description| 475| -------- | -------- | -------- | -------- | 476| slotType | [notification.SlotType](js-apis-notification.md#slottype) | Yes| Type of the notification slot to remove.| 477| callback | AsyncCallback\<void> | Yes| Callback used to return the result. If the notification slot is removed, **err** is **undefined**. Otherwise, **err** is an error object.| 478 479**Example** 480 481```ts 482import notification from '@ohos.notificationManager' 483import { BusinessError } from '@ohos.base'; 484 485reminderAgentManager.removeNotificationSlot(notification.SlotType.CONTENT_INFORMATION, 486 (err: BusinessError) => { 487 if (err.code) { 488 console.error("callback err code:" + err.code + " message:" + err.message); 489 } else { 490 console.log("removeNotificationSlot callback"); 491 } 492}); 493``` 494 495 496## reminderAgentManager.removeNotificationSlot 497 498removeNotificationSlot(slotType: notification.SlotType): Promise\<void> 499 500Removes a notification slot. This API uses a promise to return the result. 501 502**System capability**: SystemCapability.Notification.ReminderAgent 503 504**Parameters** 505 506| Name| Type| Mandatory| Description| 507| -------- | -------- | -------- | -------- | 508| slotType | [notification.SlotType](js-apis-notification.md#slottype) | Yes| Type of the notification slot to remove.| 509 510**Return value** 511 512| Type| Description| 513| -------- | -------- | 514| Promise\<void> | Promise that returns no value.| 515 516**Example** 517 518```ts 519import notification from '@ohos.notificationManager' 520import { BusinessError } from '@ohos.base'; 521 522reminderAgentManager.removeNotificationSlot(notification.SlotType.CONTENT_INFORMATION).then(() => { 523 console.log("removeNotificationSlot promise"); 524}).catch((err: BusinessError) => { 525 console.error("promise err code:" + err.code + " message:" + err.message); 526}); 527``` 528 529## ActionButtonType 530 531Enumerates the button types. 532 533**System capability**: SystemCapability.Notification.ReminderAgent 534 535| Name| Value| Description| 536| -------- | -------- | -------- | 537| ACTION_BUTTON_TYPE_CLOSE | 0 | Button for closing the reminder.| 538| ACTION_BUTTON_TYPE_SNOOZE | 1 | Button for snoozing the reminder.| 539| ACTION_BUTTON_TYPE_CUSTOM<sup>10+</sup> | 2 | Custom button.<br>**System API**: This is a system API and cannot be called by third-party applications.| 540 541 542## ReminderType 543 544Enumerates the reminder types. 545 546**System capability**: SystemCapability.Notification.ReminderAgent 547 548| Name| Value| Description| 549| -------- | -------- | -------- | 550| REMINDER_TYPE_TIMER | 0 | Countdown reminder.| 551| REMINDER_TYPE_CALENDAR | 1 | Calendar reminder.| 552| REMINDER_TYPE_ALARM | 2 | Alarm reminder.| 553 554 555## ActionButton 556 557Defines the button on the reminder displayed. 558 559**System capability**: SystemCapability.Notification.ReminderAgent 560 561| Name| Type| Mandatory| Description| 562| -------- | -------- | -------- | -------- | 563| title | string | Yes| Text on the button.| 564| titleResource<sup>11+</sup> | string | No| Resource ID of the title. This parameter is used to read the title information after the system language is switched.| 565| type | [ActionButtonType](#actionbuttontype) | Yes| Button type.| 566| wantAgent<sup>10+</sup> | [WantAgent](#wantagent) | No| Information about the ability that is displayed after the button is clicked.<br>**System API**: This is a system API and cannot be called by third-party applications.| 567| dataShareUpdate<sup>11+</sup> | [DataShareUpdate](#datashareupdate11) | No| The application database will be updated after a click on the button.<br>**System API**: This is a system API and cannot be called by third-party applications.| 568 569 570## WantAgent 571 572Defines the information about the redirected-to ability. 573 574**System capability**: SystemCapability.Notification.ReminderAgent 575 576 577| Name| Type| Mandatory| Description| 578| -------- | -------- | -------- | -------- | 579| pkgName | string | Yes| Name of the target package.| 580| abilityName | string | Yes| Name of the target ability.| 581| uri<sup>10+</sup> | string | No| URI of the target ability.<br>**System API**: This is a system API and cannot be called by third-party applications.| 582 583## DataShareUpdate<sup>11+</sup> 584 585Defines the parameter information used to update the database. 586 587The data provider needs to set the ID, read/write permissions, and basic information of the table to be shared under **proxyDatas** in the **module.json5** file. For details about the configuration method, see [Data Proxy](../../database/share-data-by-silent-access.md). 588 589**System capability**: SystemCapability.Notification.ReminderAgent 590 591 592| Name| Type| Mandatory| Description| 593| -------- | -------- | -------- | -------- | 594| uri | string | Yes| URI of the data, which is the unique identifier for cross-application data access.<br>**System API**: This is a system API and cannot be called by third-party applications.| 595| equalTo | Record<string, number \| string \| boolean> | Yes| Filter criteria. Currently, only equal to is supported.<br>**System API**: This is a system API and cannot be called by third-party applications.| 596| value | [ValueBucket](js-apis-data-valuesBucket.md#valuesbucket) | Yes| New data.<br>**System API**: This is a system API and cannot be called by third-party applications.| 597 598 599## MaxScreenWantAgent 600 601Provides the information about the ability that is started automatically and displayed in full-screen mode when the reminder arrives. This API is reserved. 602 603**System capability**: SystemCapability.Notification.ReminderAgent 604 605| Name| Type| Mandatory| Description| 606| -------- | -------- | -------- | -------- | 607| pkgName | string | Yes| Name of the target package. (If the device is in use, only a notification banner is displayed.)| 608| abilityName | string | Yes| Name of the target ability. (If the device is in use, only a notification banner is displayed.)| 609 610 611## ReminderRequest 612 613Defines the request for publishing a reminder. 614 615**System capability**: SystemCapability.Notification.ReminderAgent 616 617| Name| Type| Mandatory| Description| 618| -------- | -------- | -------- | -------- | 619| reminderType | [ReminderType](#remindertype) | Yes| Type of the reminder.| 620| actionButton | [[ActionButton?, ActionButton?, ActionButton?]](#actionbutton) | No| Buttons displayed for the reminder in the notification panel.<br>- For common applications, a maximum of two buttons are supported.<br>- For system applications, a maximum of two buttons are supported in API version 9, and a maximum of three buttons are supported in API version 10 and later versions.| 621| wantAgent | [WantAgent](#wantagent) | No| Information about the ability that is redirected to when the reminder is clicked.| 622| maxScreenWantAgent | [MaxScreenWantAgent](#maxscreenwantagent) | No| Information about the ability that is started automatically and displayed in full-screen mode when the reminder arrives. If the device is in use, only a notification banner is displayed.<br> This API is reserved.| 623| ringDuration | number | No| Ringing duration, in seconds. The default value is **1**.| 624| snoozeTimes | number | No| Number of reminder snooze times. The default value is **0**. (It is not applicable to countdown reminders.)| 625| timeInterval | number | No| Reminder snooze interval, in seconds. The minimum value is 5 minutes. (It is not applicable to countdown reminders.)| 626| title | string | No| Reminder title.| 627| content | string | No| Reminder content.| 628| expiredContent | string | No| Content to be displayed after the reminder expires.| 629| snoozeContent | string | No| Content to be displayed when the reminder is snoozing. (It is not applicable to countdown reminders.)| 630| 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.| 631| groupId<sup>11+</sup> | string | No| Group ID used for the reminder. If "Don't ask again" or similar information is selected for the reminder, other reminders with the same group ID are also canceled.| 632| slotType | [notification.SlotType](js-apis-notificationManager.md#slottype) | No| Type of the slot used by the reminder.| 633| tapDismissed<sup>10+</sup> | boolean | No| Whether the reminder is automatically cleared. For details, see [NotificationRequest.tapDismissed](js-apis-inner-notification-notificationRequest.md#notificationrequest). | 634| autoDeletedTime<sup>10+</sup> | number | No| Time when the reminder is automatically cleared. For details, see [NotificationRequest.autoDeletedTime](js-apis-inner-notification-notificationRequest.md#notificationrequest).| 635| snoozeSlotType<sup>11+</sup> | [notification.SlotType](js-apis-notificationManager.md#slottype) | No| Type of the slot used by the reminder. (It is not applicable to countdown reminders.)| 636| customRingUri<sup>11+</sup> | string | No| URI of the custom prompt tone.| 637 638## ReminderRequestCalendar 639 640ReminderRequestCalendar extends ReminderRequest 641 642Defines a reminder for a calendar event. 643 644**System capability**: SystemCapability.Notification.ReminderAgent 645 646| Name| Type| Mandatory| Description| 647| -------- | -------- | -------- | -------- | 648| dateTime | [LocalDateTime](#localdatetime) | Yes| Reminder time.| 649| repeatMonths | Array\<number> | No| Month in which the reminder repeats.| 650| repeatDays | Array\<number> | No| Date on which the reminder repeats.| 651| daysOfWeek<sup>11+</sup> | 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.| 652 653 654## ReminderRequestAlarm 655 656ReminderRequestAlarm extends ReminderRequest 657 658Defines a reminder for an alarm. 659 660**System capability**: SystemCapability.Notification.ReminderAgent 661 662| Name| Type| Mandatory| Description| 663| -------- | -------- | -------- | -------- | 664| hour | number | Yes| Hour portion of the reminder time.| 665| minute | number | Yes| Minute portion of the reminder time.| 666| 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.| 667 668 669## ReminderRequestTimer 670 671ReminderRequestTimer extends ReminderRequest 672 673Defines a reminder for a scheduled timer. 674 675**System capability**: SystemCapability.Notification.ReminderAgent 676 677| Name| Type| Mandatory| Description| 678| -------- | -------- | -------- | -------- | 679| triggerTimeInSeconds | number | Yes| Number of seconds in the countdown timer.| 680 681 682## LocalDateTime 683 684Sets the time information for a calendar reminder. 685 686**System capability**: SystemCapability.Notification.ReminderAgent 687 688| Name| Type| Mandatory| Description| 689| -------- | -------- | -------- | -------- | 690| year | number | Yes| Year.| 691| month | number | Yes| Month. The value ranges from 1 to 12.| 692| day | number | Yes| Day. The value ranges from 1 to 31.| 693| hour | number | Yes| Hour. The value ranges from 0 to 23.| 694| minute | number | Yes| Minute. The value ranges from 0 to 59.| 695| second | number | No| Second. The value ranges from 0 to 59.| 696