Using transitive dependencies with Intercom for Android
Beth-Ann Sher avatar
Written by Beth-Ann Sher
Updated over a week ago

To make integration easier, we bundle and repackage all of our dependencies in Intercom for Android. This prevents issues caused by conflicting dependency versions and shared state, but means that you can’t reduce your app size by sharing dependencies. If you understand the advantages and disadvantages of using the dependencies transitively, then you might benefit from using the Intercom for Android build with transitive dependencies.

1. Using the transitive dependency build

To use this build, you’ll need to add the following dependency to your Gradle file:

implementation 'io.intercom.android:intercom-sdk-base-transitive:5.+'

instead of the usual: 

implementation 'io.intercom.android:intercom-sdk-base:5.+' 

2. FCM integration (Optional)

If you use FCM with Intercom, then you need to add the following exclusion to your Intercom FCM dependency:

implementation('io.intercom.android:intercom-sdk-fcm:5.+') {
    exclude group: 'io.intercom.android', module: 'intercom-sdk-base'
}

instead of: 

implementation 'io.intercom.android:intercom-sdk-fcm:5.+' 

Dependencies

Using the transitive dependency build will add the following libraries to your project for use with Intercom for Android. These can also be used in your app. The exact versions for the latest Intercom version are available here

You can also see the library versions used in your app by running ./gradlew dependencies.

Note: Depending on a library version different to the one provided by Intercom for Android can result in unexpected behaviour and crashes. If you want to use a different version of a library then we recommend you test your app thoroughly.

We also depend on Glide, but right now we’re continuing to bundle and repackage it as it uses a lot of global state, making it hard to configure it separately for Intercom and your app. We hope to make this transitive in a future version too.


💡Tip

Need more help? Get support from our Community Forum
Find answers and get help from Intercom Support and Community Experts


Did this answer your question?