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