Answered

How to detect when user close Intercom

  • 10 May 2023
  • 8 replies
  • 93 views

I’m writing a SwiftUI app. I need to detect when user close an Intercom window.

Is that even possible?

icon

Best answer by cameron.gumley 12 May 2023, 15:00

View original

8 replies

Userlevel 2
Badge +3

Hi Lucas! Cam with the Intercom Support Engineering team here. 

I’m not overly familiar with SwiftUI but in case it proves useful (and presuming you’re using our iOS SDK in your App) I thought I’d mention this section in our iOS SDK Dev Docs which notes that “when the user closes the messenger, IntercomWindowWillHideNotification and IntercomWindowDidHideNotification will be fired” and which can therefore be used to detect when the Intercom window has been closed.

Let me know if that’s helpful - hope it is 😁.

Is there a version of this for Android? I need to detect the same thing.

Hi Lucas! Cam with the Intercom Support Engineering team here. 

I’m not overly familiar with SwiftUI but in case it proves useful (and presuming you’re using our iOS SDK in your App) I thought I’d mention this section in our iOS SDK Dev Docs which notes that “when the user closes the messenger, IntercomWindowWillHideNotification and IntercomWindowDidHideNotification will be fired” and which can therefore be used to detect when the Intercom window has been closed.

Let me know if that’s helpful - hope it is 😁.

Is there a version of this for Android?

Userlevel 2
Badge +3

Good question@MichaelStoddart! At present there isn’t a direct equivalent of this iOS SDK function within our Android SDK. That being said I will submit a Feature Request for this with our Product Development team - hopefully it’s something we see added to the Android SDK in the near future 👍

 

 

Good question@MichaelStoddart! At present there isn’t a direct equivalent of this iOS SDK function within our Android SDK. That being said I will submit a Feature Request for this with our Product Development team - hopefully it’s something we see added to the Android SDK in the near future 👍

 

 

Is there an ETA on when we can expect this to be added once the feature request has been submitted?

Userlevel 2
Badge +3

This isn’t something thats on the current roadmap for release in H1 '23, and our Product Engineering and Development teams haven't started roadmapping for H2 '23 just yet so we can’t say if it’s something they’ll opt to develop through the later half of the year, but if the Feature Requests submitted then it will be there for their consideration 🤞

This isn’t something thats on the current roadmap for release in H1 '23, and our Product Engineering and Development teams haven't started roadmapping for H2 '23 just yet so we can’t say if it’s something they’ll opt to develop through the later half of the year, but if the Feature Requests submitted then it will be there for their consideration 🤞

Hi Cameron, sorry to update this thread, but is there an ETA for this feature? Or maybe a workaround?

In my app I have a inactivity check based on user interaction with React Native Root View (PanResponder), when the user opens Intercom another Activity/View,that is completely decoupled from my app, is used, so this inactivity checker assumes that the user didn’t interact with my app for that time period and logs out the user.

This doesn’t happen in iOS since I can know when the user start/finish using Intercom.

Can you assist me on this?

Userlevel 2
Badge +3

Hi @Renato Parreira -- Thanks for reaching out on this!

At present there hasn’t been any change on this in our recent Android SDK releases, nor does the addition of this specifically appear in our most recent roadmap for the coming half-year. Thats not to say it’s not in the pipeline somewhere - given the scope of whats due to be released in the coming half this may have just been comparatively too minor to note in the docs I have access to - but I certainly will go ahead and flag your interest in this function in the FRQ thats with the team so they’re aware this is something thats being requested.

To confirm, I have not yet come across a viable workaround for this but if I do I will be sure to jump in here and let you and the community know 👍

Reply