【问题标题】:Why is the notification sent from firebase is getting delay in receiving为什么从firebase发送的通知接收延迟
【发布时间】:2021-11-27 09:33:04
【问题描述】:

以下是在颤振中监听通知的代码,我正在从 firebase 控制台发送通知

    FirebaseMessaging.onMessage.listen((RemoteMessage message) {
      RemoteNotification notification = message.notification;
      AndroidNotification android = message.notification?.android;
      if (notification != null && android != null) {
        flutterLocalNotificationsPlugin.show(
            notification.hashCode,
            notification.title,
            notification.body,
            NotificationDetails(
              android: AndroidNotificationDetails(
                channel.id,
                channel.name,
                channel.description,
                color: Colors.blue,
                playSound: true,
                icon: 'ic_launcher',
              ),
            ));
      }
    });

【问题讨论】:

    标签: flutter notifications firebase-cloud-messaging delay


    【解决方案1】:

    请详细解释一下,当应用打开时您无法收到通知的实际问题是什么,那么您必须使用本地通知插件才能在应用打开时在应用上显示通知

    【讨论】:

    • 我可以收到通知,但如果我现在安排并发送它,移动端会延迟接收。实际情况是我正在编写来自 FCM 控制台的通知,现在选择计划并发送,但它迟到了 >2 分钟
    • 我认为这将是您的互联网连接我尝试相同但我没有得到任何延迟
    • 好的,谢谢
    猜你喜欢
    • 2023-03-06
    • 2021-06-13
    • 2019-05-07
    • 2019-04-23
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多