Ionic framework 如何自定义本地通知
我想为我的ionic应用程序定制一个本地通知(类似的东西) 我正在尝试使用,但是我无法实现像上面图像那样的定制。通知中不显示操作图标,我想单击操作按钮而不关闭通知 请按照下面的代码操作Ionic framework 如何自定义本地通知,ionic-framework,ionic2,ionic3,ionic4,ionic-native,Ionic Framework,Ionic2,Ionic3,Ionic4,Ionic Native,我想为我的ionic应用程序定制一个本地通知(类似的东西) 我正在尝试使用,但是我无法实现像上面图像那样的定制。通知中不显示操作图标,我想单击操作按钮而不关闭通知 请按照下面的代码操作 public constructor(private platform: Platform, private localNotifications: LocalNotifications) { this.platform.ready().then(() => { this.localN
public constructor(private platform: Platform, private localNotifications: LocalNotifications) {
this.platform.ready().then(() => {
this.localNotifications.on('play').subscribe(notification => {
this.play();
});
}
this.localNotifications.schedule({
id: 1,
title: 'App Name - App info here ',
text: this.musicName + ' - ' + this.artistName,
led: 'FF0000',
icon: '../../assets/img/icon1.png',
actions: [
{
id: 'pause',
title: 'Pause',
launch: false,
icon: '../../assets/img/icon2.png'
}
]
});
}
那么,哪些自定义设置不适用于您?通知中不会显示操作图标,我希望单击操作按钮,而不是关闭通知。