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