I'm having trouble with handling push notifications from Intercom. When a push notification is received and selected, it opens the message conversation view momentarily, but then immediately redirects to the app's home screen.
I am calling Intercom.client().handlePushMessage()
in onResume()
of the HomeActivity
, but it seems like the Intercom SDK is not waiting for this method call. The issue is reproducible on the latest version (15.10.3) and the previous version (v15.9.1).
Here’s the code snippet:
- Firebase Messaging Service class:
override fun onMessageReceived(remoteMessage: RemoteMessage) {
val extras = remoteMessage.data
if (intercomPushClient.isIntercomPush(extras)) {
intercomPushClient.handlePush(application, extras)
} else {
…
}
}
- HomeActivity class:
override fun onResume() {
super.onResume()
Intercom.client().handlePushMessage()
}
It is reproducible using latest version 15.10.3 and previous v15.9.1 as well.
Has anyone encountered a similar issue? Am I missing something in the way I’m handling push notifications?
Any help or suggestions would be appreciated!