Troubleshooting
Some collected troubleshooting tips, based off of recurring customer issues.
If I don't initialize the Contact Center SDK in Application#onCreate, what will happen?
In the Contact Center SDK, we set up a lot of resources when the app starts. So if SDK is not initialized in the Application#onCreate, some functions may not work.
Should I import cci and mobilertc as two modules?
Your project may have dependency conflicts if you import cci and mobilertc as two separate modules. Put cciSDK.aar and mobilertc.aar into one module and change build.gradle to implement all the dependencies in cci/build.gradle and mobilertc/build.gradle. Check the latest Contact Center SDK, as the dependency libraries may be different than this sample code.
dependencies {
// ...
implementation fileTree(dir: '/{Your Path}/android-zccsdk-2.5.0/cci', include: ['*.aar', '*.jar'], exclude: [])
//implementation mobilertc if using a content center video entry
implementation fileTree(dir: '/{Your Path}/android-zccsdk-2.5.0/mobilertc', include: ['*.aar', '*.jar'], exclude: [])
// implementation video-effects for blur background
implementation fileTree(dir: '/{Your Path}/android-zccsdk-2.5.0/video-effects', include: ['*.aar', '*.jar'], exclude: [])
implementation 'com.google.android.material:material:1.5.0'
implementation 'androidx.appcompat:appcompat:1.6.1'
implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0'
implementation 'com.google.protobuf:protobuf-javalite:3.13.0'
implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.4.0'
implementation 'com.github.bumptech.glide:annotations:4.11.0'
implementation 'com.github.bumptech.glide:glide:4.11.0'
implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.7.20'
implementation 'org.jetbrains.kotlin:kotlin-reflect:1.7.20'
implementation 'androidx.core:core-ktx:1.8.0'
implementation 'com.google.android.exoplayer:exoplayer-core:2.17.1'
implementation 'com.google.android.exoplayer:exoplayer-ui:2.17.1'
implementation 'com.google.crypto.tink:tink-android:1.5.0'
implementation 'com.google.code.gson:gson:2.8.1'
implementation 'io.reactivex.rxjava2:rxandroid:2.1.1'
implementation 'com.squareup.retrofit2:retrofit:2.9.0'
implementation 'androidx.activity:activity-ktx:1.4.0'
implementation 'androidx.fragment:fragment-ktx:1.4.1'
implementation 'androidx.viewpager2:viewpager2:1.0.0'
implementation 'com.davemorrissey.labs:subsampling-scale-image-view:3.10.0'
implementation 'androidx.navigation:navigation-fragment-ktx:2.5.0'
implementation 'androidx.navigation:navigation-ui-ktx:2.5.0'
implementation 'org.greenrobot:eventbus:3.1.1'
}
java.lang.noclassdeffounderror: failed resolution of landroidx/viewbinding/viewbinding;
Since version 2.1.0, Contact Center SDK for Android is developed with viewBinding. Enable viewBinding in your project, or just add dependencies.add("default","androidx.databinding:viewbinding:7.3.1") into cci/build.gradle.
android.view.InflateException: Error inflating class com.google.android.exoplayer2.ui.PlayerView
Your project may have missing dependencies for Contact Center SDK. Put the cciSDK.aar and mobilertc.aar into one module and change build.gradle to implement all the dependencies in cci/build.gradle and mobilertc/build.gradle.
dependencies {
// ...
implementation fileTree(dir: '/{Your Path}/android-zccsdk-2.5.0/cci', include: ['*.aar', '*.jar'], exclude: [])
//implementation mobilertc if using a content center video entry
implementation fileTree(dir: '/{Your Path}/android-zccsdk-2.5.0/mobilertc', include: ['*.aar', '*.jar'], exclude: [])
// implementation video-effects for blur background
implementation fileTree(dir: '/{Your Path}/android-zccsdk-2.5.0/video-effects', include: ['*.aar', '*.jar'], exclude: [])
implementation 'com.google.android.material:material:1.5.0'
implementation 'androidx.appcompat:appcompat:1.6.1'
implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0'
implementation 'com.google.protobuf:protobuf-javalite:3.13.0'
implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.4.0'
implementation 'com.github.bumptech.glide:annotations:4.11.0'
implementation 'com.github.bumptech.glide:glide:4.11.0'
implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.7.20'
implementation 'org.jetbrains.kotlin:kotlin-reflect:1.7.20'
implementation 'androidx.core:core-ktx:1.8.0'
implementation 'com.google.android.exoplayer:exoplayer-core:2.17.1'
implementation 'com.google.android.exoplayer:exoplayer-ui:2.17.1'
implementation 'com.google.crypto.tink:tink-android:1.5.0'
implementation 'com.google.code.gson:gson:2.8.1'
implementation 'io.reactivex.rxjava2:rxandroid:2.1.1'
implementation 'com.squareup.retrofit2:retrofit:2.9.0'
implementation 'androidx.activity:activity-ktx:1.4.0'
implementation 'androidx.fragment:fragment-ktx:1.4.1'
implementation 'androidx.viewpager2:viewpager2:1.0.0'
implementation 'com.davemorrissey.labs:subsampling-scale-image-view:3.10.0'
implementation 'androidx.navigation:navigation-fragment-ktx:2.5.0'
implementation 'androidx.navigation:navigation-ui-ktx:2.5.0'
implementation 'org.greenrobot:eventbus:3.1.1'
}