附件属性在离子本地通知插件中不起作用



我们正在开发混合移动应用程序(离子3和角度4(。我们正在尝试使用本地通知进行附件。

https://ionicframework.com/docs/v3/native/local-notifications/

我们像这样尝试过

this.localNotifications.schedule({
id: 1,
title: 'Title',
text: 'Dec',
attachments: ['https://atlas-content-cdn.pixelsquid.com/stock-images/golden-soccer-ball-3yLR9z1-600.jpg'],
foreground: true,
vibrate: true,
actions: [
{ id: 'yes', title: 'Yes' },
{ id: 'no',  title: 'No' }
]
});

无法在通知 中获取附件。让我们知道我们错过了什么。

传递小图像

uri='https://atlas-content-cdn.pixelsquid.com/stock-images/golden-soccer-ball-3yLR9z1-600.jpg'
this.localNotifications.schedule({
id: 1,
title: 'Title',
text: 'Dec',
attachments: [uri],
foreground: true,
vibrate: true,
actions: [
{ id: 'yes', title: 'Yes' },
{ id: 'no',  title: 'No' }
]
});

最新更新