Firebase cloud messaging notification issue (ios & android)

443 views
Skip to first unread message

Josh

unread,
Mar 9, 2017, 4:35:58 PM3/9/17
to Firebase Google Group
Hey, so there seems to be an issue with opening notifications on ios and android (separate issues though).

On android, if I background the app, receive a notification, and open the app by tapping on the app (not the notification)... the app thinks I opened the app via the notification. When I check the Firebase.Messaging.FirebaseMessage object that gets passed, it even says Firebase.Messaging.FirebaseMessage.FirebaseNotification is true. This is obviously incorrect because I didn't open the app by tapping on the notification. What makes matters worse is if I background the app from this point and open the app again by tapping the app (not the notification), it still thinks that I opened the app via tapping the notification. And I can recreate this process if I background the app and open it again every time. It doesn't matter whether I clear the notification or I tap on it. The app thinks it's getting a notification every time it opens.

On ios, if I background the app, receive a notification, and I tap on the notification to open the app... the app opens up and it sees that I opened the app via a notification and the Firebase.Messaging.FirebaseMessage object gets passed. But the Firebase.Messaging.FirebaseMessage.FirebaseNotification is set to false, which signifies that the message was not opened via notification.

I am on:
Unity 5.5.0p4
FCM unity 3.0.0

Stewart Miles

unread,
Mar 9, 2017, 8:25:49 PM3/9/17
to fireba...@googlegroups.com, Alex Ames
FirebaseMessage.NotificationOpened is true if the app was opened with via a notification.  You should be able to use this flag to differentiate this case.

FirebaseMessage.Notification contains additional notification specific data if it's available to the application when it's opened.  I believe the behavior differs between iOS and Android because the available data is different in each case.

In the Android case, we run a service which captures *all* messages received by the device and reports them to the app regardless of whether they resulted in a notification or the app was opened via a notification.

Does this resolve your issue?

Cheers,
Stewart


--
You received this message because you are subscribed to the Google Groups "Firebase Google Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebase-talk+unsubscribe@googlegroups.com.
To post to this group, send email to fireba...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-talk/fbca387b-1639-480a-8a23-a5eefd865517%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Josh

unread,
Mar 14, 2017, 6:22:16 PM3/14/17
to Firebase Google Group, ama...@google.com
Hello Stewart,
There seems to be a mistake with my original post. I meant to write FirebaseMessage.NotificationOpened instead of FirebaseMessage.FirebaseNotification. So everywhere you see that, please replace it with NotificationOpened. My statement should make more sense then. Please let me know if you have any questions.

Josh

On Thursday, March 9, 2017 at 8:25:49 PM UTC-5, Stewart Miles wrote:
FirebaseMessage.NotificationOpened is true if the app was opened with via a notification.  You should be able to use this flag to differentiate this case.

FirebaseMessage.Notification contains additional notification specific data if it's available to the application when it's opened.  I believe the behavior differs between iOS and Android because the available data is different in each case.

In the Android case, we run a service which captures *all* messages received by the device and reports them to the app regardless of whether they resulted in a notification or the app was opened via a notification.

Does this resolve your issue?

Cheers,
Stewart

On Thu, Mar 9, 2017 at 1:09 PM, Josh <jo...@flyclops.com> wrote:
Hey, so there seems to be an issue with opening notifications on ios and android (separate issues though).

On android, if I background the app, receive a notification, and open the app by tapping on the app (not the notification)... the app thinks I opened the app via the notification. When I check the Firebase.Messaging.FirebaseMessage object that gets passed, it even says Firebase.Messaging.FirebaseMessage.FirebaseNotification is true. This is obviously incorrect because I didn't open the app by tapping on the notification. What makes matters worse is if I background the app from this point and open the app again by tapping the app (not the notification), it still thinks that I opened the app via tapping the notification. And I can recreate this process if I background the app and open it again every time. It doesn't matter whether I clear the notification or I tap on it. The app thinks it's getting a notification every time it opens.

On ios, if I background the app, receive a notification, and I tap on the notification to open the app... the app opens up and it sees that I opened the app via a notification and the Firebase.Messaging.FirebaseMessage object gets passed. But the Firebase.Messaging.FirebaseMessage.FirebaseNotification is set to false, which signifies that the message was not opened via notification.

I am on:
Unity 5.5.0p4
FCM unity 3.0.0

--
You received this message because you are subscribed to the Google Groups "Firebase Google Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebase-tal...@googlegroups.com.

Josh

unread,
Mar 28, 2017, 1:56:21 PM3/28/17
to Firebase Google Group, ama...@google.com
Any word on this?

Alex Ames

unread,
Mar 28, 2017, 2:37:59 PM3/28/17
to Josh, Firebase Google Group
Hi Josh, sorry for the delayed reply. We've got a reproduction case and have confirmed that there is an issue, and we're working on a fix for it.

Josh

unread,
Mar 29, 2017, 12:28:42 AM3/29/17
to Firebase Google Group, jo...@flyclops.com
Awesome to hear! Please let me know when this is fixed! Thanks! :]
Reply all
Reply to author
Forward
0 new messages