@@ -45,7 +45,7 @@ The following table describes the APIs for notification publishing. You specify
- A normal text notification consists of the **title**, **text**, and **additionalText** parameters, of which **title** and **text** are mandatory. The value of these parameters contains less than 200 bytes.
console.error(`[ANS] failed to publish, error[${err}]`);
console.error(`[ANS] publish failed, code is ${err.code}, message is ${err.message}`);
return;
}
console.info(`[ANS] publish success`);
console.info(`[ANS] publish success.`);
});
```
...
...
@@ -71,7 +71,7 @@ The following table describes the APIs for notification publishing. You specify
- In addition to the parameters in the normal text notification, the long text notification provides the **longText**, **briefText**, and **expandedTitle** parameters. The value of **longText** contains a maximum of 1024 bytes, while that of any other parameters contains less than 200 bytes. By default, a long-text notification looks in the same way as a normal text notification. When expanded, the notification displays the title and content specified in **expandedTitle** and **longText**, respectively.
console.error(`[ANS] failed to publish, error[${err}]`);
console.error(`[ANS] publish failed, code is ${err.code}, message is ${err.message}`);
return;
}
console.info(`[ANS] publish success`);
console.info(`[ANS] publish success.`);
});
```
...
...
@@ -101,7 +101,7 @@ The following table describes the APIs for notification publishing. You specify
- In addition to the parameters in the normal text notification, the multi-line text notification provides the **lines**, **briefText**, and **longTitle** parameters. The value of these parameters contains less than 200 bytes. By default, a multi-line notification looks in the same way as a normal text notification. When expanded, the notification displays the title and content specified in **longTitle** and **lines**, respectively.
- In addition to the parameters in the normal text notification, the picture-attached text notification provides the **picture**, **briefText**, and **expandedTitle** parameters. The value of **picture** is a pixel map that does not exceed 2 MB.
- In addition to the parameters in the normal text notification, the picture-attached text notification provides the **picture**, **briefText**, and **expandedTitle** parameters. The value of **picture** is a **PixelMap** object that does not exceed 2 MB.
```ts
letnotificationPicture:PixelMap=undefined;// Obtain the pixel map information.
letnotificationRequest={
letimagePixelMap:PixelMap=undefined;// Obtain the PixelMap information.