Android Troubleshooting
Troubleshooting Guide
This guide will help you in troubleshooting the issues that you may face during the integration.
Duplicate Class Build failure
Duplicate class android.support.v4.app.INotificationSideChannel found in modules core-1.5.0-runtime (androidx.core:core:1.5.0) and support-compat-27.1.1-runtime (com.android.support:support-compat:27.1.1)
If you get a dublicate class error similar to this one, add the following in your gradle.properties:
android.enableJetifier=true
Kommunicate dependency not found
This could be caused by Kommunicate's maven url not getting detected by Android Studio.
repositories {
maven { url 'https://kommunicate.jfrog.io/artifactory/kommunicate-android-sdk' }
}
If you have used the above code in project level build.gradle, then change your repository mode in settings.gradle to this:
repositoriesMode.set(RepositoriesMode.PREFER_PROJECT)
Manifest Merger Error: Resolving android:allowBackup Conflict
Error Cause: Kommunicate SDK Disables Data Backup for Security The error occurs because Kommunicate SDK intentionally sets allowBackup and fullBackupContent to false for security reasons. This ensures that sensitive user chat data and information are protected and only stored securely on our servers.
Override Option: Enable Backup for Your Application If you want to allow backup functionality for your application, you can override Kommunicate SDK's settings by adding the following code to your app's AndroidManifest.xml:
tools:replace="android:allowBackup, android:fullBackupContent"
Push notification troubleshooting
If you are having problem in receiving notifications on your Android device, follow these steps:
In your test device, get the User ID of the user which is logged in to Kommunicate.
Open our Push Notification Test Page and enter your APP_ID and User ID which is logged into the device.
Once you submit, the status of that push notification will show.
Status | Description |
---|---|
Success | Everything is configured properly and you should be receiving the notifications in that device. |
MisMatchSenderId | This error comes where there is a mismatch between Firebase server key and your local "google-services.json". Verify that you have shared correct server Key to Kommunicate and download your google-services.json from Firebase again. |
Not Valid | This error comes when the “Registration token” is not coming to the Kommunicate server. Make sure your Firebase Messaging setup is correct and that Kommunicate receives token from onNewToken method |
Disable Dark Mode
When customizing the Kommunicate Android SDK, make sure it displays correctly in dark mode on users’ devices. If any issues arise, you can easily disable dark mode by setting the useDarkMode flag to false in the applogics-settings.json file:
"useDarkMode": false
How to report issues with logs?
Kommunicate by default logs the data to console, in debug build. Open Android Studio -> Logcat -> search "Kommunicate" to filter out Kommunicate's logs. Once you have the logs, report us the issue along with the logs at support@kommunicate.io
Note: Kommunicate logs are disabled in release build, by default. If you wish to enable it in release build, you can use this code in your project:
ALSpecificSettings.getInstance(context).enableLoggingForReleaseBuild(true);