Answered

Android SDK Push Notification Not received when App is in Foreground

  • 19 June 2023
  • 1 reply
  • 90 views

Hi, 

I have followed below instruction to enable Push Notification.

 

private val intercomPushClient = IntercomPushClient()

override fun onNewToken(refreshedToken: String) {
intercomPushClient.sendTokenToIntercom(application, refreshedToken)
// DO HOST LOGIC HERE
}

override fun onMessageReceived(remoteMessage: RemoteMessage) {
val message = remoteMessage.data
if (intercomPushClient.isIntercomPush(message)) {
intercomPushClient.handlePush(application, message)
} else {
// DO HOST LOGIC HERE
}
}

I can see Push notification arriving when App is in background (either by back or home button press), and can click and navigate to Messenger Home

But When App is in foreground (App Open state or visible), I cannot se the Notification in the Status bar, although onMessageReceived is triggered and intercomPushClient.isIntercomPush(message) = true.

Can you please advise what needs to be done here

icon

Best answer by cameron.gumley 23 June 2023, 03:50

View original

1 reply

Userlevel 2
Badge +3

Hi @User557 - Cam from the Intercom Support Engineering team here 👋

It looks like you’ve reached out to the Customer Support team directly and are speaking with my teammate Sean about this issue which is great! I’ll let you focus on that discussion 👍

Reply