Registration of MyFirebaseMessagingService (can be done by SendBirdPushHelper.registerPushHandler(handler)).
By cannot get payload, do you mean you get a push notification but you don’t have the payload from it? or are you not getting the push notification at all?
Test with two devices (device A and B). Both app should be logged in (Sendbird.connect()).
Is device A’s app in background (or terminated) while device B sends a message?
Push messages, by default, will only be received when the app is not connected to Sendbird (on the background, terminated, etc).
If you want to receive push message even when the app is on the foreground, override boolean alwaysReceiveMessage() from MyFirebaseMessagingService and return true.
Additional code snippet of how you push handler, how you registered it, etc, would help debug this issue.
Hi @Piyavate_HL,
Thanks for more information so you’re using the UIKit SDK.
From the log you given, it seems like this app was on foreground (connection was made to Sendbird).
Could you try below?
Device A: launch the app, log in, then move the app to the background (do not bring the app to foreground).
Device B: send a message to user who’s logged in on Device A.
Could you grab a log (from the launch of the app until the Device B sends a message) of Device A since Device A should receive push notification in this case.
Could you also check device A and device B are logged in as a distinct user?
I’ve seen your log, and it seems like device A send message to device B when the app on the device B is on the background, right?
The log from device A is enough, I see all logs from the start to sending a message, but the log from device B is not (it’s not from the beginning where Sendbird is initialized and connected), so I can’t check whether the push token has been registered or not.
Device B
2021-06-23 15:22:01.107 9246-11291/com.sendbird.calls.quickstartpyh1 D/FA: Application going to the background
But Device B is Slient when Device A Send Message
Device push token is register when start app
is token A,B
A : d84bmrucT_yJYumCeB48zf:APA91bGnMWx9QAwXkXedNJqh_M20SoPNTO2SBIAuHMGWqrExd6ysYjgoSgDHJODy34BScUab11Se-avrKCsK51aenuuLkvQkJ_0kW7ejNrmnaBFUH6pYS47jOYL5qG3L7rzf7U7E7BBl
B : e4gOEeMlMLA:APA91bG19547QpVgYVElQvQZiQpIq_DQYSuHb9DSPmsSpUQoVQMk4W-xdxsGJTVWvZAuxm9niH4wEIMXAQS5cMMnIGqrcD46yFrVxK290iv-AiEmLRUIrM4fdZqJzMfZoHNjP2o3–n6
Hi, thanks for confirming it.
Assuming that there’s no issue on the SDK side, we’ll need to check on the server whether the push was actually sent or not.