Skip to main content
Answered

Opening a chat when clicking on a push message

  • March 26, 2025
  • 1 reply
  • 25 views

I encountered a problem with opening a chat with a conversation when clicking on a push, when clicking it just opens the application

 

implementation 'io.intercom.android:intercom-sdk:15.11.5'
    private final IntercomPushClient intercomPushClient = new IntercomPushClient();

    @Override
    public void onMessageReceived(RemoteMessage remoteMessage) {

        Map<String, String> message = remoteMessage.getData();

        if (intercomPushClient.isIntercomPush(message)) {
            intercomPushClient.handlePush(getApplication(), message);
        }



 

    @Override
    protected void onResume() {
        super.onResume();
        checkPendingDeepLink();
        Intercom.client().handlePushMessage();



 

    @Override
    protected void onNewIntent(Intent intent) {
        super.onNewIntent(intent);
        setIntent(intent);
.....

        Bundle bundle = getIntent().getExtras();
        if (bundle != null) {

            String link = bundle.getString("link");

            if (link != null) {
                IntercomManager.openChat(link);
            }
        }


onMessageReceived callback works, but onNewIntent doesn't triggers
Have I missed something ? thanks 

Best answer by Jacques Reynolds

Hey ​@Viacheslav kolisnichenko 👋 Jacques here from Intercom Support. I hope all is well today!

It looks like you're correctly checking if the message is from Intercom and calling handlePush() inside onMessageReceived, which is great. However, the issue seems to be with how the intent is handled when the app is resumed or launched via a push tap.

Intercom’s handlePush() doesn't automatically deep link into a conversation. It shows the launcher or home screen unless you handle the push intent properly.

You must capture the push intent from the Activity that launches when tapping the notification and pass it to Intercom.client().handlePushMessage() inside onNewIntent() or onResume() - which you're trying to do.

More on DeepLinking here:

Hope this helps!

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

1 reply

Jacques Reynolds
Intercom Team
Forum|alt.badge.img+4

Hey ​@Viacheslav kolisnichenko 👋 Jacques here from Intercom Support. I hope all is well today!

It looks like you're correctly checking if the message is from Intercom and calling handlePush() inside onMessageReceived, which is great. However, the issue seems to be with how the intent is handled when the app is resumed or launched via a push tap.

Intercom’s handlePush() doesn't automatically deep link into a conversation. It shows the launcher or home screen unless you handle the push intent properly.

You must capture the push intent from the Activity that launches when tapping the notification and pass it to Intercom.client().handlePushMessage() inside onNewIntent() or onResume() - which you're trying to do.

More on DeepLinking here:

Hope this helps!


Reply


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