Publishes 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).
Publishes 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).
...
@@ -33,7 +31,7 @@ Publishes a reminder through the reminder agent. This API uses an asynchronous c
...
@@ -33,7 +31,7 @@ Publishes a reminder through the reminder agent. This API uses an asynchronous c
| Name| Type| Mandatory| Description|
| Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
| -------- | -------- | -------- | -------- |
| reminderReq | [ReminderRequest](#reminderrequest) | Yes| Reminder to be published.|
| reminderReq | [ReminderRequest](#reminderrequest) | Yes| Reminder to be published.|
| callback | AsyncCallback\<number\> | Yes| Callback used to return the published reminder's ID.|
| callback | AsyncCallback<number> | Yes| Callback used to return the published reminder's ID.|
**Error codes**
**Error codes**
...
@@ -45,12 +43,11 @@ For details about the error codes, see [reminderAgentManager Error Codes](../err
...
@@ -45,12 +43,11 @@ For details about the error codes, see [reminderAgentManager Error Codes](../err
| 1700002 | The number of reminders exceeds the limit. |
| 1700002 | The number of reminders exceeds the limit. |
Publishes 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).
Publishes 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).
...
@@ -85,7 +80,7 @@ Publishes a reminder through the reminder agent. This API uses a promise to retu
...
@@ -85,7 +80,7 @@ Publishes a reminder through the reminder agent. This API uses a promise to retu
**Return value**
**Return value**
| Type| Description|
| Type| Description|
| -------- | -------- |
| -------- | -------- |
| Promise\<number\> | Promise used to return the published reminder's ID.|
| Promise<number> | Promise used to return the published reminder's ID.|
**Error codes**
**Error codes**
...
@@ -97,12 +92,11 @@ For details about the error codes, see [reminderAgentManager Error Codes](../err
...
@@ -97,12 +92,11 @@ For details about the error codes, see [reminderAgentManager Error Codes](../err
| 1700002 | The number of reminders exceeds the limit. |
| 1700002 | The number of reminders exceeds the limit. |
Obtains all valid (not yet expired) reminders set by the current application. This API uses an asynchronous callback to return the reminders.
Obtains all valid (not yet expired) reminders set by the current application. This API uses an asynchronous callback to return the reminders.
...
@@ -218,7 +206,7 @@ Obtains all valid (not yet expired) reminders set by the current application. Th
...
@@ -218,7 +206,7 @@ Obtains all valid (not yet expired) reminders set by the current application. Th
| Name| Type| Mandatory| Description|
| Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
| -------- | -------- | -------- | -------- |
| callback | AsyncCallback\<Array\<[ReminderRequest](#reminderrequest)\>\> | Yes| Asynchronous callback used to return an array of all valid reminders set by the current application.|
| callback | AsyncCallback<Array<[ReminderRequest](#reminderrequest)>> | Yes| Asynchronous callback used to return an array of all valid reminders set by the current application.|
**Error codes**
**Error codes**
...
@@ -230,7 +218,7 @@ For details about the error codes, see [reminderAgentManager Error Codes](../err
...
@@ -230,7 +218,7 @@ For details about the error codes, see [reminderAgentManager Error Codes](../err
Obtains all valid (not yet expired) reminders set by the current application. This API uses a promise to return the reminders.
Obtains all valid (not yet expired) reminders set by the current application. This API uses a promise to return the reminders.
...
@@ -279,7 +266,7 @@ Obtains all valid (not yet expired) reminders set by the current application. Th
...
@@ -279,7 +266,7 @@ Obtains all valid (not yet expired) reminders set by the current application. Th
| Type| Description|
| Type| Description|
| -------- | -------- |
| -------- | -------- |
| Promise\<Array\<[ReminderRequest](#reminderrequest)\>\> | Promise used to return an array of all valid reminders set by the current application.|
| Promise<Array<[ReminderRequest](#reminderrequest)>> | Promise used to return an array of all valid reminders set by the current application.|
**Error codes**
**Error codes**
...
@@ -291,7 +278,7 @@ For details about the error codes, see [reminderAgentManager Error Codes](../err
...
@@ -291,7 +278,7 @@ For details about the error codes, see [reminderAgentManager Error Codes](../err
| repeatMonths | Array\<number\> | No| Month in which the reminder repeats.|
| repeatMonths | Array<number> | No| Month in which the reminder repeats.|
| repeatDays | Array\<number\> | No| Date on which the reminder repeats.|
| repeatDays | Array<number> | No| Date on which the reminder repeats.|
## ReminderRequestAlarm
## ReminderRequestAlarm
...
@@ -671,7 +646,7 @@ Defines a reminder for an alarm.
...
@@ -671,7 +646,7 @@ Defines a reminder for an alarm.
| -------- | -------- | -------- | -------- |
| -------- | -------- | -------- | -------- |
| hour | number | Yes| Hour portion of the reminder time.|
| hour | number | Yes| Hour portion of the reminder time.|
| minute | number | Yes| Minute portion of the reminder time.|
| minute | number | Yes| Minute portion of the reminder time.|
| 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.|
| 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.|
## ReminderRequestTimer
## ReminderRequestTimer
...
@@ -696,8 +671,8 @@ Sets the time information for a calendar reminder.
...
@@ -696,8 +671,8 @@ Sets the time information for a calendar reminder.
| Name| Type| Mandatory| Description|
| Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
| -------- | -------- | -------- | -------- |
| year | number | Yes| Year.|
| year | number | Yes| Year.|
| month | number | Yes| Month.|
| month | number | Yes| Month. The value ranges from 1 to 12.|
| day | number | Yes| Date.|
| day | number | Yes| Day. The value ranges from 1 to 31.|
| hour | number | Yes| Hour.|
| hour | number | Yes| Hour. The value ranges from 0 to 23.|
| minute | number | Yes| Minute.|
| minute | number | Yes| Minute. The value ranges from 0 to 59.|
| second | number | No| Second.|
| second | number | No| Second. The value ranges from 0 to 59.|