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:
instead of the usual:
2. FCM integration (Optional)
If you use FCM with Intercom, then you need to add the following exclusion to your Intercom FCM dependency:
exclude group: 'io.intercom.android', module: 'intercom-sdk-base'
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.