Open tfcporciuncula opened 11 months ago
Hey @tfcporciuncula, thank you for reaching out and raising this.
I think I understand what might be happening here, I think you could verify it on your end as well.
So, when you add the deep link, and try previewing the payload from the dashboard, you would notice its a custom data payload object wrapped in data
. That means our SDK gets to handle it,
But when you just have an image in there without the deep link, and if you preview from the dashboard, you would notice the data is under notification
payload. That means FCM handles is different for foreground vs background.
I have raised this with the team, and we are looking into how we can update the flow if you send a push via rich push editor it should always be wrapped under the data
payload.
A workaround for this work for the time being would be to just custom data payload, where you wrap your payload of title, body, and image under data
and SDK should work properly or send a rich push with an empty or dummy deep link. Apologies for the inconvenience.
Yup, I’ve verified what you described on my end, thanks! And I agree the SDK should always work with data messages to keep the behavior consistent — I don’t see any good reason to have notification messages (where Firebase is responsible for the rendering) in the mix.
SDK version: 3.6.4
Environment: Development and Production
Are logs available?
There’s something interesting in the logs: while the app is in the background (open or closed), when I send a notification with deep link, I see this:
But when the notification doesn’t have a deep link, I only see the first message, even though the notification shows up as usual:
So it’s like this is never being called for some reason?
Describe the bug
CustomerIOPushNotificationCallback
isn’t being called if we send a notification without a deep link while the app is in the background (open or closed). It works fine if the app is in the foreground, or if the notification has a deep link.To Reproduce
CustomerIOPushNotificationCallback
won’t be calledExpected behavior
CustomerIOPushNotificationCallback
should always be called.Additional context
I’ve reproduced this on a Pixel 4a running Android 13 so far.