Skip to main content

We are using the Intercom Android SDK in our android app to provide customer support. Specifically, we are presenting the Messages space using the following code in Kotlin:

Intercom.client().present(space = IntercomSpace.Messages)

We're interested in knowing if there's a callback or event triggered when the user dismisses the Messages space by clicking the back button. Our application has specific action that need to be executed when the user returns to our UI, and it would be extremely useful to have this kind of event available.

I noticed that on the iOS SDK, there are IntercomWindowWillHideNotification and IntercomWindowDidHideNotification callbacks for similar functionality. Are these iOS callbacks triggered when the Intercom message space is closed? If so, is there an equivalent on the Android SDK?

If such functionality is not currently available for Android, are there plans to introduce this feature in a future update?

Hi @yd-thera! Cam from the Intercom Support Engineering team here. 

To answer your question about those iOS callbacks, yes these are triggered when the users closes the Messenger (as mentioned here). The equivalent callbacks in the Android SDK are “Intercom.hideIntercom()” OR “Intercom.client().hideIntercom();” (see Dev Docs here) which I believe are also triggered the Messenger is closed in your Android App 👍

Let me know if this helps and if you have any follow-up questions 😁


Hi @cameron.gumley,
 

Thanks for your quick response. I appreciate your help!

I believe there might be a slight misunderstanding regarding what I'm looking for. On iOS, Intercom provides specific callbacks (IntercomWindowWillHideNotification and IntercomWindowDidHideNotification) that are triggered when the user closes the Intercom Messenger. These notifications allow us to execute code right after the user has closed the messenger window.

On Android, the Intercom.client().hideIntercom() method allows us to programmatically hide the Intercom window, but it doesn't provide a way to detect when the user closes the messenger manually (i.e., by clicking the back button on the Intercom messages space screen or using the back button on their phone). That's a significant difference from the iOS behavior.


Is there a similar callback or listener available on Android that we can use to detect when the user closes the Intercom messenger?

Looking forward to your reply.

Thank you!


Hi @yd-thera !

I see what you’re saying. Our docs don’t mention a callback for the Android SDK. Let me reach out to our product team about this and see if one exists or not. I’ll reach back out to you in this thread to let you know what I hear back!


Hi @yd-thera !

I heard back from our Product Team and they confirmed that unlike iOS, we don't send notifications or broadcast events for the in-app notifications in Android. I can see how this would be a handy thing to have though! I’m going to flag this as a Feature Request for our Android SDK team to consider implementing down the road!


Hi @Jacob Cox !

Thanks for checking with the Product Team about this. I appreciate your help. I'll be looking forward to the potential implementation of this feature on Android in the future.


Reply