Installation
Minimal Requirements
Make sure that your project meets the following requirements:
- API level 21 (Lollipop) or higher
- Android 5.0 or higher
- Jetpack (AndroidX) is used that includes the following versions:
- com.android.tools.build:gradle v8.1.1 or newer
- compileSdkVersion 34 or newer
Connecting edna Chat Center Android Library
For the chat to work, you need to add the following dependencies:
allprojects {
repositories {
google()
mavenCentral()
maven { url 'https://maven-pub.edna.ru/repository/maven-public/' }
}
}
releaseImplementation "edna.chatcenter.ui.android:release:5.1"
debugImplementation "edna.chatcenter.ui.android:debug:5.1"
For the library to work, you need to add dataBinding to build.gradle
:
dataBinding {
enabled = true
}
Obfuscation Settings
For correct operation, we recommend that you add the following strings to ProGuard:
-keepattributes Signature
# For using GSON @Expose annotation
-keepattributes *Annotation*
# Gson specific classes
-dontwarn sun.misc.**
# Application classes that will be serialized/deserialized over Gson
-keep class edna.chatcenter.ui.** { *; }
# Prevent proguard from stripping interface information from TypeAdapter, TypeAdapterFactory,
# JsonSerializer, JsonDeserializer instances (so they can be used in @JsonAdapter)
-keep class * extends com.google.gson.TypeAdapter
-keep class * implements com.google.gson.TypeAdapterFactory
-keep class * implements com.google.gson.JsonSerializer
-keep class * implements com.google.gson.JsonDeserializer
# Prevent R8 from leaving Data object members always null
-keepclassmembers,allowobfuscation class * {
@com.google.gson.annotations.SerializedName <fields>;
}
danger
In build.gradle (at the application level), the debuggable = false
parameter should be disabled for the release configuration.
Otherwise, it might lead to additional fails.