【问题标题】:How to make FCM notification non-removable in flutter?如何使 FCM 通知在颤动中不可移除?
【发布时间】:2021-03-17 20:05:43
【问题描述】:

我想让发送到我的颤振应用程序的 FCM 通知不可删除(当点击清除按钮或向左滑动通知时用户无法清除它)。 我搜索它,但没有关于如何使用颤振和 FCM 通知处理它的答案。

【问题讨论】:

    标签: flutter firebase-cloud-messaging flutter-notification


    【解决方案1】:

    要使通知不可删除...只需在 flutter_local_notifications 包中创建 ongoing: true

    AndroidNotificationDetails androidDetails = new AndroidNotificationDetails("channelId",
        notificationModel.title, notificationModel.body,
        ongoing: true);
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2021-09-14
      • 2021-10-31
      • 2021-09-06
      • 2021-12-29
      • 2021-04-16
      • 2020-03-27
      • 2020-12-27
      • 1970-01-01
      相关资源
      最近更新 更多