当应用程序位于前台时,OneSignal 不显示通知

问题描述 投票:0回答:1

我将我的 flutter 应用程序与 onesignal 集成,当应用程序在后台时它工作得很好,但在前台它收到通知但不显示任何原因?

日志

flutter: OSNotificationReceivedEvent complete with notification: Instance of 'OSNotification'
VERBOSE: finishProcessingNotification: Fired!
VERBOSE: Notification display type: 7
VERBOSE: notificationReceived called! opened: NO
VERBOSE: finishProcessingNotification: call completionHandler with options: 7

前台处理程序

  OneSignal.shared.setNotificationWillShowInForegroundHandler(
      (OSNotificationReceivedEvent event) {
    event.complete(event.notification);
  });
push-notification onesignal foreground foregroundnotification
1个回答
0
投票

您是否已找到此问题的解决方案? 如果是这样,请与我分享。 :-) 我的离子电容器应用程序中也有同样的行为。

谢谢!

© www.soinside.com 2019 - 2024. All rights reserved.