Install Android SDK
The Amity Social Cloud SDK for Android is delivered via Jitpack repository.

Requirements

  • Android 5.0 (API level 21) and above*
  • Target sdk version 29 and above*
  • Compile SDK Version 29 and above*
  • JVM target should be 1.8
The API level allows a developer to declare the minimum version with which the app is compatible, using the minSdkVersion attribute. If your app can't function without these APIs, declare API level 21 and above as the app's minimum supported version. And using targetSdkVersion 29 and above.
android {
...
defaultConfig {
minSDKVersion 21 // at least 21
}
}

Installation

Add the Jitpack repository in your project level build.gradle at the end of repositories:
Gradle 6.8 or above
Gradle 6.7 or below
dependencyResolutionManagement {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
Add the dependency in your module level build.gradle. Find latest SDK version at Changelog.
Gradle groovy
Kotlin Gradle DSL
implementation 'com.github.AmityCo.Amity-Social-Cloud-SDK-Android:amity-sdk:x.y.z'
implementation("com.github.AmityCo.Amity-Social-Cloud-SDK-Android:amity-sdk:x.y.z")

Android API level below 24

If your minSDKVersion is below 24, ie., 23 or 21, there are additional configurations required.
In your project build.gradle,
buildscript {
repositories {
google()
gradlePluginPortal()
...
}
dependencies {
...
classpath 'gradle.plugin.com.github.sgtsilvio.gradle:android-retrofix:0.4.1'
}
}

Managing conflicting file generation

In your app module's build.gradle, add the following packaging options.
android {
...
packagingOptions {
exclude 'META-INF/INDEX.LIST'
exclude 'META-INF/io.netty.versions.properties'
}
}

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.
-keep class com.ekoapp.ekosdk.** { *; }
-keep interface com.ekoapp.ekosdk.** { *; }
-keep enum com.ekoapp.ekosdk.** { *; }
-keep class com.amity.socialcloud.** { *; }
-keep interface com.amity.socialcloud.** { *; }
-keep enum com.amity.socialcloud.** { *; }
Export as PDF
Copy link
Outline
Requirements
Installation
Android API level below 24
Managing conflicting file generation
Code Obfuscation