• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# anm工具
2
3Advanced Notification Manager(通知管理工具,简称anm)是实现通知打印、设置通知参数等功能的工具,为开发者提供基本的通知调试和测试能力,例如打印已发布通知详细信息、设置通知缓存个数、使能通知等。
4
5> **说明:**
6>
7> 在使用本工具前,开发者需要先获取<!--Del-->[<!--DelEnd-->hdc工具<!--Del-->](../../device-dev/subsystems/subsys-toolchain-hdc-guide.md)<!--DelEnd-->,执行hdc shell。
8>
9> 当前工具仅支持在eng版本中使用,在user版本中使用会出现报错error: user version cannot use setting。
10
11
12## help
13
14* **介绍**
15
16  打印帮助信息。
17
18* **用法**
19
20  ```bash
21  anm help
22  ```
23
24## dump
25
26* **介绍**
27
28  打印通知相关信息。
29
30* **用法**
31
32  ```bash
33  anm dump [<options>]
34  ```
35
36  参数如下表所示
37
38  | 参数             | 参数说明                           |
39  | ---------------- | ---------------------------------- |
40  | -A/--active      | 打印所有活跃的通知信息             |
41  | -R/--recent      | 打印最近的通知信息                 |
42  | -D/--distributed | 打印来自其他设备的分布式通知信息   |
43  | -b/--bundle      | 可选参数,设置指定的Bundle名称打印 |
44  | -u/--user-id     | 可选参数,设置指定的用户ID打印     |
45  | -h/--help        | 帮助信息                           |
46
47* **示例**:打印活跃的通知信息
48
49  ```bash
50  anm dump -A
51  ```
52  ![anm-dump-A](figures/anm-dump-A.png)
53
54## Setting
55
56* **介绍**
57
58  设置通知参数。
59* **用法**
60
61  ```bash
62  anm setting [<options>]
63  ```
64
65  参数如下表所示
66
67  | 参数                     | 参数说明                             |
68  | ------------------------ | ------------------------------------ |
69  | -c/--recent-count        | 设置保存在内存中的最近通知的最大个数 |
70  | -e/--enable-notification | 设置通知使能开关                     |
71  | -h/--help                | 帮助信息                             |
72
73* **示例**:设置保存在内存中的最近通知的最大数为100个
74
75  ```bash
76  anm setting -c 100
77  ```
78