• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# NotificationContent
2
3The **NotificationContent** module describes the notification content.
4
5> **NOTE**
6>
7> 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.
8
9**System capability**: SystemCapability.Notification.Notification
10
11| Name       | Type                                                        | Readable| Writable| Description              |
12| ----------- | ------------------------------------------------------------ | ---- | --- | ------------------ |
13| contentType | [ContentType](./js-apis-notificationManager.md#contenttype)                                  | Yes | Yes | Notification content type.      |
14| normal      | [NotificationBasicContent](#notificationbasiccontent)        | Yes | Yes | Normal text.  |
15| longText    | [NotificationLongTextContent](#notificationlongtextcontent)  | Yes | Yes | Long text.|
16| multiLine   | [NotificationMultiLineContent](#notificationmultilinecontent) | Yes | Yes | Multi-line text.  |
17| picture     | [NotificationPictureContent](#notificationpicturecontent)    | Yes | Yes | Picture-attached.  |
18
19## NotificationBasicContent
20
21Describes the normal text notification.
22
23**System capability**: SystemCapability.Notification.Notification
24
25| Name          | Type  | Readable| Writable| Description                              |
26| -------------- | ------ | ---- | ---- | ---------------------------------- |
27| title          | string | Yes  | Yes  | Notification title.                        |
28| text           | string | Yes  | Yes  | Notification content.                        |
29| additionalText | string | Yes  | Yes  | Additional information of the notification.|
30
31
32## NotificationLongTextContent
33
34Describes the long text notification.
35
36**System capability**: SystemCapability.Notification.Notification
37
38| Name          | Type  | Readable| Writable| Description                            |
39| -------------- | ------ | ---- | --- | -------------------------------- |
40| title          | string | Yes | Yes | Notification title.                        |
41| text           | string | Yes | Yes | Notification content.                        |
42| additionalText | string | Yes | Yes | Additional information of the notification.|
43| longText       | string | Yes | Yes | Long text of the notification.                    |
44| briefText      | string | Yes | Yes | Brief text of the notification.|
45| expandedTitle  | string | Yes | Yes | Title of the notification in the expanded state.                |
46
47
48## NotificationMultiLineContent
49
50Describes the multi-line text notification.
51
52**System capability**: SystemCapability.Notification.Notification
53
54| Name          | Type           | Readable| Writable| Description                            |
55| -------------- | --------------- | --- | --- | -------------------------------- |
56| title          | string          | Yes | Yes | Notification title.                        |
57| text           | string          | Yes | Yes | Notification content.                        |
58| additionalText | string          | Yes | Yes | Additional information of the notification.|
59| briefText      | string          | Yes | Yes | Brief text of the notification.|
60| longTitle      | string          | Yes | Yes | Title of the notification in the expanded state.                |
61| lines          | Array\<string\> | Yes | Yes | Multi-line text of the notification.                  |
62
63
64## NotificationPictureContent
65
66Describes the picture-attached notification.
67
68**System capability**: SystemCapability.Notification.Notification
69
70| Name          | Type          | Readable| Writable| Description                            |
71| -------------- | -------------- | ---- | --- | -------------------------------- |
72| title          | string         | Yes | Yes | Notification title.                        |
73| text           | string         | Yes | Yes | Notification content.                        |
74| additionalText | string         | Yes | Yes | Additional information of the notification.|
75| briefText      | string         | Yes | Yes | Brief text of the notification.|
76| expandedTitle  | string         | Yes | Yes | Title of the notification in the expanded state.                |
77| picture        | [image.PixelMap](js-apis-image.md#pixelmap7) | Yes | Yes | Picture attached to the notification.                  |
78