[Question] Push notification messages are not displayed in the closed/background app on launch
See original GitHub issue[REQUIRED] Please fill in the following fields:
- Unity editor version: 2020.3.10
- Firebase Unity SDK version: 8.1.0
- Source you installed the SDK: unitypackage
- Problematic Firebase Component: Messaging
- Other Firebase Components in use: Analytics, Deepliinks, Crashlytics,
- Additional SDKs you are using: Facebook, IronSource
- Platform you are using the Unity editor on Windows
- Platform you are targeting: Android
- Scripting Runtime: IL2CPP
[REQUIRED] Please describe the question here:
Push notification messages are not received in the app if the app is either closed or is in the background. The foreground app receives messages OK.
queued message 0:1628115171791201%bfe3fe3bbfe3fe3b
Firebase.AppUtilPINVOKE:PollCallbacks()
Firebase.AppUtil:PollCallbacks()
Firebase.Platform.FirebaseHandler:Update()
and
2021-08-10 00:14:38.207 23350-23465/com.threed_view.FluentWorldsDev E/Unity: Couldn't parse the message: Object reference not set to an instance of an object.
VIEW.VCT.Common.VCTLog:Error(String, String)
VIEW.VCT.Common.VCTLog:CatchLogs(String, String, LogType)
UnityEngine.LogCallback:Invoke(String, String, LogType)
VIEW.VCT.Common.MessagingService:OnMessageReceived(Object, MessageReceivedEventArgs)
System.EventHandler`1:Invoke(Object, TEventArgs)
Firebase.Messaging.<MessageReceivedDelegateMethod>c__AnonStorey0:<>m__0()
System.Func`1:Invoke()
Firebase.ExceptionAggregator:Wrap(Func`1, T)
Firebase.AppUtilPINVOKE:PollCallbacks()
Firebase.AppUtil:PollCallbacks()
Firebase.Platform.FirebaseHandler:Update()
2021-08-10 00:01:16.109 20990-21989/com.threed_view.FluentWorldsDev W/FirebaseMessaging: Missing Default Notification Channel metadata in AndroidManifest. Default value will be used.
So I guess I somehow missing on queued message handling when app is launched?
Issue Analytics
- State:
- Created 2 years ago
- Comments:15 (4 by maintainers)
Top Results From Across the Web
Push notification not displayed when app is closed in android
I am using Googles firebase for the notifications. The API 26 device does not receive push notifications unless I open the app first....
Read more >Push Notification not showing up when app is closed
When i close the app (for example swipe it away from recents) then the Push Notifications will not be shown. The Device receives...
Read more >Push notification in Background works fine when App runs ...
Push notification in Background works fine when App runs by Xcode, but does not work when App runs by itself.
Read more >Notifications Not Shown - Mobile Push
The following are reasons why notifications may show as "Delivered" on the OneSignal dashboard or API, but are not visible on your device....
Read more >Push Notification Not Shown when App is OPEN - Android
I am using full push notifications in Ionic with the phonegap-plugin-push. Testing on Android when my app is closed/background my notification ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@equizo
I tried to reproduce it with the following configuration, but I can get the
OnMessageReceived
event properly after I subscribe a topic, kill the app, send the message through Firebase console and click on the notification.2020.3.18f1
8.1.0
Here is what I did after the app was deployed:
Subscribe
button.Here is a screenshot of the app for the second launch.
I would be great if you can help us to diagnose the issue with the following steps.
adb logcat
when the issue occurs.8.0.0
. Could you try to downgrade to7.2.0
and see if the issue still occurs? Or FWIW, upgrade to8.2.0
and see if anything changed. You should find all the.unitypackage
you need from this page (FCM, Crashlytics and Analytics)Appreciate it. Shawn
Since there haven’t been any recent updates here, I am going to close this issue.
@equizo if you’re still experiencing this problem and want to continue the discussion just leave a comment here and we are happy to re-open this.