Skip to main content

We migrated the SDK version from 15.0.0 to 15.5.0 and then saw the error described in the header. In 15.0.0, our MAIN/LAUNCHER activity, which processes information about clicks, was initially opened, than it opens Intercom Chat. After migrating to 15.5.0, this behavior broke. The problem is that our activity opens immediately after the intercom chat activity opens. This leads to confusion for the user. For example, if the user clicks on the "Back" button from our application, they are taken to the intercom chat, which is not expected.

The service for processing looks like this:

@AndroidEntryPoint
class CloudService : FirebaseMessagingService() {

private val intercomPushClient = IntercomPushClient()

override fun onNewToken(token: String) {
super.onNewToken(token)
intercomPushClient.sendTokenToIntercom(application, token)
}

override fun onMessageReceived(message: RemoteMessage) {
super.onMessageReceived(message)
val remoteMsg = message.data
if (intercomPushClient.isIntercomPush(remoteMsg)) {
intercomPushClient.handlePush(application, remoteMsg)
}
}
}

And our MAIN/LAUNCHER activity handle it like that: 

class DDDActivity : YYYActivity() {

override fun onNewIntent(intent: Intent) {
super.onNewIntent(intent)
handleNewIntent(intent)
}

private fun handleNewIntent(intent: Intent) {
...
when {
...
intent.hasExtra(INTERCOM_PUSH_DATA) -> {
// handle
}
else -> {
// handle
}
}
}


companion object {
private const val INTERCOM_PUSH_DATA = "consumed_by_intercom"
}
}

 

We want to save behaviour, that was on 15.0.0 ver, where firstly open our app activity, than Intercom Chat, how could we do that in new version, or if it bug, could you please fix it?

Hey @Welltech Apps, Bernice here from the Support Engineering team at Intercom🔧

We just released version 15.6.0 of intercom-android - Could you take a look into upgrading the version in use on your app and reach out to us via the Messenger if this issue persists for you!


Hello,

 

Its because of the intent to launch screen can you people just add extra data to intent so we can identify it in our launcher activity that its opened from the push notification.

 

Or is there any method from which we can identify if the intercom chat screen is visible or Hide by that also we can manage our custom logic


Hi,

 

We are facing the same issue. We have 2 Activities - 1st LoginActivity which is Main/Launcher Activity and next activity.

Once the user taps on intercom’s notification(message), the app is launched, in LoginActivity, we check if the user is already logged in or not, if he is already logged-in then the user is moved to next activity and LoginActivity is finished.  The messenger is not opened in next activity in this case. 
Same scenario with Banner results in opening the Banner twice i.e if user clicks on cross of banner again the banner is shown.
 

I think we should be able to control on which activity the messenger should open via SDK - for this there should be an API provided by Intercom SDK.

Also, the onNewIntent() is not triggered when the user clicks on intercom’s notification of message. Hence, there is no way we can detect that the App was launched via Intercom’s notification.

Request you to please find some solution for this in the next release.


Hi, 

I have faced totally the same issue as described in the initial message. We have a Launch and Main activities concept and once I click on push-notification it opens chat for a second and then the app navigates from Launch to Main activity which closes the Intercom message screen. 

I have the newest version of SDK.

implementation 'io.intercom.android:intercom-sdk:15.7.1’

So the question is how to detect inside Launch activity that the app was opened by intercom push notification to make sure I do not open the Main activity automatically on top of the Intercom Message screen. 

 

Has there been any update on this?


Hi @Mayur Patil, @Oleh Roshka@PRO MATKA & @Welltech Apps 👋 I’ve reached out to you via the Messenger with next steps on this 💬


Hi @Mayur Patil@Oleh Roshka@PRO MATKA & @Welltech Apps 👋 I’ve reached out to you via the Messenger with next steps on this 💬

Hi @bernice , I am not able to see your message on messenger. Can you please send again or mail me the next steps?


I’ve just emailed you again, @Mayur Patil 😊


Calling the method Intercom.client().handlePushMessage() in onResume() of my next-of-launcher activity resolved the issue for me.


Is there a way to detect if the Intercom Messenger is open using the SDK? The Intercom.client().handlePushMessage() method doesn’t resolve the issue in my case.

 


Hi @Illia Herman,

Unfortunately we don’t have a way to detect if the Messenger is open.

It is a feature that a lot of our customers have asked for.

I’ll add your request there, whenever we do release new features, we'll announce it on the Product Changes page, so I'd recommend keeping an eye here!


Hello,

I still having same issue with 2 activity (launch/main) app using Intercom 15.10.2. Calling hadnlePushMessage() in main activity onResume method doesn’t help.


We got similar bug. 

Also we use new Android’s Splash Screen SDK which completely broke when using it as required. Your way of opening your chat via opening our LAUNCHER activity and then open your chat without telling us what you are doing. You should consider more clear and Android-approved method of doing so (put your info in intent)

This is critical problem for us which have no clear workaround.

Please provide ETA of solving it.

val splashScreen = installSplashScreen()
splashScreen.setKeepOnScreenCondition { showSplash }
splashScreen.setOnExitAnimationListener { showMain() }
setOnExitAnimationListener never trigger in Android 14 when you press back from chat

We have exactly the same problem, we also call handlePushMessage() after loading all the data & splash screen but it didn’t solve the problem. Any advice on this?

 

Cheers


we have same issue, in latest SDK v15.10.3 as well. Also tried to pass handlePushMessage(stackBuilder) but looks the sdk is not waiting at all for “handlePushMessage”


Reply