未验证 提交 43439caa 编写于 作者: O openharmony_ci 提交者: Gitee

!3796 3698处理完成:刷新Readme

Merge pull request !3796 from ester.zhou/TR-3698
# Agent-Powered Scheduled Reminders # Agent-Powered Scheduled Reminder
- [Overview](background-agent-scheduled-reminder-overview.md) - [Agent-Powered Scheduled Reminder Overview](background-agent-scheduled-reminder-overview.md)
- [Development Guidelines](background-agent-scheduled-reminder-guide.md) - [Agent-Powered Scheduled Reminder Development](background-agent-scheduled-reminder-guide.md)
# Development Guidelines<a name="EN-US_TOPIC_0000001185364575"></a> # Agent-Powered Scheduled Reminder Development<a name="EN-US_TOPIC_0000001185364575"></a>
## When to Use<a name="section18502174174019"></a> ## When to Use<a name="section18502174174019"></a>
...@@ -350,7 +350,7 @@ You can set your application to call the **ReminderRequest** class to create s ...@@ -350,7 +350,7 @@ You can set your application to call the **ReminderRequest** class to create s
**ReminderRequestCalendar** extends **ReminderRequest** and defines a reminder for a calendar event. **ReminderRequestCalendar** extends **ReminderRequest** and defines a reminder for a calendar event.
For the application to run properly, if both **repeatMonths** and **repeatDays** are not specified, the earliest reminder time must be later than the current time. For the application to run properly, if both **repeatMonths** and **repeatDays** are not specified, the earliest reminder time must be later than the current time.
**Table 8** ReminderRequestCalendar instance **Table 8** ReminderRequestCalendar instance
...@@ -542,7 +542,7 @@ For the application to run properly, if both **repeatMonths** and **repeatDays** ...@@ -542,7 +542,7 @@ For the application to run properly, if both **repeatMonths** and **repeatDays**
## How to Develop<a name="section4207112818418"></a> ## How to Develop<a name="section4207112818418"></a>
>![](../public_sys-resources/icon-note.gif) **NOTE:** >![](../public_sys-resources/icon-note.gif) **NOTE:**
>To publish a reminder, your application needs to apply for the **ohos.permission.PUBLISH\_AGENT\_REMINDER** permission. >To publish a reminder, your application needs to apply for the **ohos.permission.PUBLISH\_AGENT\_REMINDER** permission.
Publish a 10-second countdown reminder. Publish a 10-second countdown reminder.
...@@ -553,7 +553,10 @@ Publish a 10-second countdown reminder. ...@@ -553,7 +553,10 @@ Publish a 10-second countdown reminder.
import reminderAgent from '@ohos.reminderAgent'; import reminderAgent from '@ohos.reminderAgent';
import notification from '@ohos.notification'; import notification from '@ohos.notification';
export default { export default {
timer: { // In JS Project:
// timer: {
// In eTS Project:
let timer : reminderAgent.ReminderRequestTimer = {
reminderType: reminderAgent.ReminderType.REMINDER_TYPE_TIMER, reminderType: reminderAgent.ReminderType.REMINDER_TYPE_TIMER,
triggerTimeInSeconds: 10, triggerTimeInSeconds: 10,
actionButton: [ actionButton: [
...@@ -602,7 +605,10 @@ Publish a 10-second countdown reminder. ...@@ -602,7 +605,10 @@ Publish a 10-second countdown reminder.
Sample code for defining a calendar reminder instance: Sample code for defining a calendar reminder instance:
``` ```
calendar: { // In JS Project:
// calendar: {
// In eTS Project:
let calendar : reminderAgent.ReminderRequestCalendar = {
reminderType: reminderAgent.ReminderType.REMINDER_TYPE_CALENDAR, reminderType: reminderAgent.ReminderType.REMINDER_TYPE_CALENDAR,
dateTime: { dateTime: {
year: 2050, year: 2050,
...@@ -647,7 +653,10 @@ calendar: { ...@@ -647,7 +653,10 @@ calendar: {
Sample code for defining an alarm reminder instance: Sample code for defining an alarm reminder instance:
``` ```
alarm: { // In JS Project:
// alarm: {
// In eTS Project:
let alarm : reminderAgent.ReminderRequestAlarm = {
reminderType: reminderAgent.ReminderType.REMINDER_TYPE_ALARM, reminderType: reminderAgent.ReminderType.REMINDER_TYPE_ALARM,
hour: 11, hour: 11,
minute: 14, minute: 14,
......
# Overview<a name="EN-US_TOPIC_0000001139084594"></a> # Agent-Powered Scheduled Reminder Overview<a name="EN-US_TOPIC_0000001139084594"></a>
Your application can call the **ReminderRequest** class 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, even when your application is frozen or exits. Your application can call the **ReminderRequest** class 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, even when your application is frozen or exits.
# Common Event and Notification # Common Event and Notification
[Common Event and Notification Overview](notification-brief.md) - [Common Event and Notification Overview](notification-brief.md)
- Common Event
### Common Event - [Common Event Development](common-event.md)
- Notification
* [Common Event Development](common-event.md) - [Notification Development](notification.md)
- Debugging Tools
### Notification - [Debugging Assistant Usage](assistant-guidelines.md)
* [Notification Development](notification.md)
### Debugging Tools
* [Debugging Assistant Usage](assistant-guidelines.md)
# Quick Start # Quick Start
- Getting Started - Getting Started
- [Preparations](start-overview.md) - [Preparations](start-overview.md)
- [Getting Started with eTS in the Traditional Coding Approach](start-with-ets.md) - [Getting Started with eTS in the Traditional Coding Approach](start-with-ets.md)
- [Getting Started with eTS in the Low-Code Approach](start-with-ets-low-code.md) - [Getting Started with eTS in the Low-Code Approach](start-with-ets-low-code.md)
- [Getting Started with JavaScript in the Traditional Coding Approach](start-with-js.md) - [Getting Started with JavaScript in the Traditional Coding Approach](start-with-js.md)
- [Getting Started with JavaScript in the Low-Code Approach](start-with-js-low-code.md) - [Getting Started with JavaScript in the Low-Code Approach](start-with-js-low-code.md)
- Development Fundamentals
- [Application Development Package Structure ](package-structure.md) - Development Fundamentals
- [Resource File Categories](basic-resource-file-categories.md) - [Application Development Package Structure (FA Model)](package-structure.md)
- [SysCap](syscap.md) - [Application Development Package Structure (Stage Model)](module-structure.md)
- [Resource File Categories](basic-resource-file-categories.md)
- [SysCap](syscap.md)
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册