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?