提交 3b9b0c02 编写于 作者: zyjhandsome's avatar zyjhandsome

优化发送图片通知的示例代码。

Signed-off-by: zyjhandsome's avatarzyjhandsome <zyjhandsome@126.com>
上级 11de24d3
......@@ -127,10 +127,10 @@
运行效果如下图所示。
![zh-cn_image_0000001417062446](figures/zh-cn_image_0000001417062446.png)
- 图片类型通知继承了普通文本类型的字段,同时新增了图片内容、内容概要和通知展开时的标题,图片内容为PixelMap型对象,其大小不能超过2M。
- 图片类型通知继承了普通文本类型的字段,同时新增了图片内容、内容概要和通知展开时的标题,图片内容为PixelMap型对象,其大小不能超过2M。
```ts
let notificationPicture: PixelMap = undefined; // 需要获取图片PixelMap信息
let imagePixelMap: PixelMap = undefined; // 需要获取图片PixelMap信息
let notificationRequest: notificationManager.NotificationRequest = {
id: 1,
content: {
......@@ -141,7 +141,7 @@
additionalText: 'test_additionalText',
briefText: 'test_briefText',
expandedTitle: 'test_expandedTitle',
picture: notificationPicture
picture: imagePixelMap
}
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册