Installing UIKit
The Android SDK is delivered via Jitpack repository.

Prerequisite

SDK supports Android 5.0 (API Level 21) and above
1
android {
2
...
3
defaultConfig {
4
minSDKVersion 21 // at least 21
5
}
6
}
Copied!

Installation

Add the Jitpack repository in your project level build.grade at the end of repositories:
1
allprojects {
2
repositories {
3
...
4
maven { url 'https://jitpack.io' }
5
}
6
}
Copied!
Add the dependency in your module level build.grade. Find latest UIKit version at Changelog.
1
// add buildFeatures, compileOptions and kotlinOptions in android tag
2
android {
3
4
buildFeatures {
5
dataBinding = true
6
}
7
compileOptions {
8
sourceCompatibility JavaVersion.VERSION_1_8
9
targetCompatibility JavaVersion.VERSION_1_8
10
}
11
kotlinOptions {
12
jvmTarget = JavaVersion.VERSION_1_8
13
}
14
15
}
16
17
dependency {
18
implementation 'com.github.AmityCo.Amity-Social-Cloud-UIKit-Android:amity-uikit:x.y.z'
19
}
Copied!
AmityUIKit already includes our SDK. Don’t install AmitySDK separately if you have already installed the UIKit.

Managing conflicting file generation

In your app module's build.gradle , add the following packaging options.
1
android {
2
...
3
packagingOptions {
4
exclude 'META-INF/INDEX.LIST'
5
exclude 'META-INF/io.netty.versions.properties'
6
}
7
}
Copied!

Code Obfuscation

By using our SDK, you can use the Android ProGuard tool to obfuscate, shrink, and optimize your code. Obfuscated code can be more difficult for other people to reverse engineer. ProGuard renames classes, fields, and methods with semantically obscure names and removes unused code. However, you need to add these configurations to your ProGuard rules when using our SDK.
1
-keep class com.ekoapp.ekosdk.** { *; }
2
-keep interface com.ekoapp.ekosdk.** { *; }
3
-keep enum com.ekoapp.ekosdk.** { *; }
4
-keep class com.amity.socialcloud.** { *; }
5
-keep interface com.amity.socialcloud.** { *; }
6
-keep enum com.amity.socialcloud.** { *; }
Copied!