[英]Push Notification not received when app is in foreground ios flutter
[英]Firebase Push Notification not received when flutter app in foreground?
我正在使用firebase_messaging進行 firebase 推送通知。 我在后台應用程序或應用程序被強制關閉時收到推送通知,但在前台應用程序時未收到。
第二個問題是沒有應用程序圖標的推送通知顯示。 它顯示空白方形圖標。
您可以使用flutter_local_notification來推送通知,您必須使用以下代碼,
await FirebaseMessaging.instance.setForegroundNotificationPresentationOptions(
alert: true,
badge: true,
sound: true
);
在主方法中。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.