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