I integrated FirebaseMessaging into my Flutter app and I am able to see campaign notifications both in foreground and background displayed.
我将Firebase Messaging集成到我的Ffltter应用程序中,我能够在显示的前台和后台看到活动通知。
But for some reason the "Opens" count in the FCM console is always 0.
Even when I click in my App immediately upon arrival on the message which opens the App.
但出于某种原因,FCM控制台中的“打开”计数始终为0。即使我一到达打开应用程序的消息,就立即点击我的应用程序。
Is there some special action required to tell Firebase that the user has opened the notification?
是否需要执行某些特殊操作才能告知Firebase用户已打开通知?
更多回答
优秀答案推荐
FCM notifications are only marked as opened in the Reports tab in the Firebase Console when the notification is opened when the app is in the background.
只有在应用程序在后台打开通知时,FCM通知才会在Firebase控制台的报告选项卡中标记为已打开。
Opens — The user opened the notification message. Reported only for
notifications received when the app is in the background.
Source: Firebase | Understanding message delivery | Message delivery reports
In case this helps anyone on the Flutter app :
如果这对Flutter应用程序上的任何人都有帮助:
Found the root cause. Make FirebaseAppDelegateProxyEnabled to true in info.list
找到了根本原因。在info.list中将Firebase AppDelegateProxyEnable设置为True
<key>FirebaseAppDelegateProxyEnabled</key>
<true/>
Tested recently and it's working.
最近测试过了,它起作用了。
Note that this Opnes count shows values after a few hours. So to test if it is working make your app debug mode and see it on the debug console on Firebase. If notification_open analytics come or not (this is Firebase automatic analytics call)
请注意,此Opnes计数显示数小时后的值。因此,要测试它是否工作,请将您的应用程序设置为调试模式,然后在Firebase的调试控制台上查看它。NOTIFICATION_OPEN分析是否出现(这是Firebase自动分析调用)
To make iOS app debug mode do this:
要使iOS应用程序处于调试模式,请执行以下操作:
On X-code > Product > Scheme > Edit scheme
Arguments > Add -FIRDebugEnabled
在X-code>产品>方案>编辑方案参数>Add-FIRDebugEnabled
更多回答
yes but in my case the notification is not marked as opened even if it was opened when the app was in background...
是的,但在我的情况下,通知不会被标记为打开,即使它是在应用程序的后台打开的…
On what platform does this occur? @finisinfinitatis
这种情况发生在什么平台上?@finisinfinitatis
I am using Android
我正在使用安卓系统
我是一名优秀的程序员,十分优秀!