• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# @ohos.reminderAgentManager (后台代理提醒)(系统接口)
2
3本模块提供后台代理提醒的能力,即当应用被冻结或应用退出时,计时和提醒的功能将被系统服务代理。在开发过程中,开发者可以调用本模块接口创建定时提醒,提醒类型支持倒计时、日历、闹钟三种。
4
5> **说明:**
6>
7> 本模块首批接口从API version 9开始支持。后续版本的新增接口,采用上角标单独标记接口的起始版本。
8>
9> 当前页面仅包含本模块的系统接口,其他公开接口请参见[@ohos.reminderAgentManager (后台代理提醒)](js-apis-reminderAgentManager.md)。
10
11
12## 导入模块
13
14```ts
15import reminderAgentManager from '@ohos.reminderAgentManager';
16```
17
18## ActionButtonType
19
20按钮的类型。
21
22**系统能力**:SystemCapability.Notification.ReminderAgent
23
24| 名称 | 值 | 说明 |
25| -------- | -------- | -------- |
26| ACTION_BUTTON_TYPE_CUSTOM<sup>10+</sup>  | 2 | 表示自定义的按钮。 |
27
28## ActionButton
29
30弹出的提醒通知中按钮的类型和标题。
31
32**系统能力**:SystemCapability.Notification.ReminderAgent
33
34| 名称 | 类型 | 必填 | 说明 |
35| -------- | -------- | -------- | -------- |
36| wantAgent<sup>10+</sup> | [WantAgent](#wantagent) | 否 | 点击按钮跳转的ability信息。 |
37| dataShareUpdate<sup>11+</sup> | [DataShareUpdate](#datashareupdate11) | 否 | 点击按钮将更新应用数据库。 |
38
39
40## WantAgent
41
42跳转目标的ability信息。
43
44**系统能力**:SystemCapability.Notification.ReminderAgent
45
46| 名称 | 类型 | 必填 | 说明 |
47| -------- | -------- | -------- | -------- |
48| uri<sup>10+</sup> | string | 否 | 指明跳转目标的uri信息。 |
49
50## DataShareUpdate<sup>11+</sup>
51
52更新数据库需要的参数信息。<br/>
53数据提供方需要在module.json5中的proxyDatas节点定义要共享的表的标识,读写权限和基本信息。配置方式请见[数据代理](../../database/share-data-by-silent-access.md)。
54
55**系统能力**:SystemCapability.Notification.ReminderAgent
56
57
58| 名称 | 类型 | 必填 | 说明 |
59| -------- | -------- | -------- | -------- |
60| uri | string | 是 | 数据使用的URI,是跨应用数据访问的唯一标识。 |
61| equalTo | Record<string, number \| string \| boolean> | 是 | 指示筛选条件,当前仅支持通过等于筛选。|
62| value | [ValueBucket](../apis-arkdata/js-apis-data-valuesBucket.md#valuesbucket) | 是 | 指示要更新的数据。 |