Skip to main content
Answered

Android SDK Push Notification Not received when App is in Foreground

  • June 19, 2023
  • 1 reply
  • 124 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

Best answer by cameron.gumley

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 👍

View original
Did this topic help you find an answer to your question?

1 reply

Forum|alt.badge.img+4
  • Intercom Team
  • 109 replies
  • Answer
  • June 23, 2023

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 👍


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings