You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Platform you are using the Unity editor on: Windows
Platform you are targeting: Android
Scripting Runtime: Mono and IL2CPP
[REQUIRED] Please describe the issue here:
Problem: The app can receive the message as I see the log in the demo UI but there is no notification shown on my phone.
I followed the steps correctly in the messaging/testapp.
I even enable the notification permission manually for the app.
The text was updated successfully, but these errors were encountered:
Hey nmtoan91. From your description, it seems to me that the app is receiving the notification message in the logs when your phone is on the foreground. This is an intended behavior. Keep in mind that the behavior of the Firebase messages differentiate when the app is in background or foreground. In our documentations:
When in the background, apps receive the notification payload in the notification tray, and only handle the data payload when the user taps on the notification.
When in the foreground, your app receives a message object with both payloads available.
If you notice in #2, the app will likely receive a message object but will not a notification pop up. If you'd like to receive a notification even if the app is on the foreground, you'll have to add your code logic to display notifications in the OnMessageReceived event. You may check out the documentations how to get started here.
[REQUIRED] Please fill in the following fields:
[REQUIRED] Please describe the issue here:
Problem: The app can receive the message as I see the log in the demo UI but there is no notification shown on my phone.
I followed the steps correctly in the messaging/testapp.
I even enable the notification permission manually for the app.
The text was updated successfully, but these errors were encountered: