微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

如何自定义离子本地通知

如何解决如何自定义离子本地通知

我想为我的离子应用程序自定义本地通知(类似这样)

enter image description here

我正在尝试使用Local Notification,但无法实现如上图所示的一些自定义。该操作图标未显示通知中,我想单击操作按钮而不关闭通知

请在下面输入我的代码

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'
      }
    ]
  });
}

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。