Get your Android app connected to social.plus in just a few steps. This guide covers everything from installation to your first authenticated session.

Requirements

  • Android 5.0 (API 21)+
  • Target SDK 30+
  • Compile SDK 30+
  • JVM target 1.8
  • Kotlin 1.5.10+

Installation

Add the SDK to your project using your preferred repository:
Add Maven Central to your project-level build.gradle:
dependencyResolutionManagement {
    repositories {
        mavenCentral()
    }
}
Add the dependency to your module-level build.gradle:
implementation("co.amity.android:amity-sdk:x.y.z")
Replace x.y.z with the latest version number.
If your minSDKVersion is below 24, 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'
    }
}

Configuration

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'
    }
}

ProGuard Rules

If using ProGuard, add these rules to your proguard-rules.pro:
-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.** { *; }
-keep class co.amity.rxupload.** { *; }
If you are using the SDK version below 6.9.0. If you’d like to pass an Amity Serializable Object such as AmityPost, AmityMessage, etc. You will need to add ProGuard rules below:
-keepclassmembers class * implements java.io.Serializable {
    private static final java.io.ObjectStreamField[] serialPersistentFields;
    private void writeObject(java.io.ObjectOutputStream);
    private void readObject(java.io.ObjectInputStream);
    java.lang.Object writeReplace();
    java.lang.Object readResolve();
}

Log Visibility Configuration

To control log visibility, add the following to your build.gradle:
android {
    defaultConfig {
        resValue 'bool', "IS_HIDDEN_AMITY_LOG", "true"

    }

}

Database Encryption (Optional)

The SDK does not employ database encryption by default. The database file is solely restricted to the application by the operating system, which is generally sufficient for most use cases.
Database encryption serves as an additional layer of security in the event of compromised root access. Important: Enabling database encryption may lead to a performance reduction of up to 15% during database read/write operations.

Encryption Modes

NONE

No Encryption
Default mode with no encryption applied. Best performance.

AUTH

Token Security
Access token storage is encrypted. Recommended for balanced security.

ALL

Full Encryption
All database files are encrypted. Maximum security.
AUTH mode is recommended to introduce extra security with minimal performance compromise. Choose the encryption mode that aligns with your application’s specific requirements.

Implementation

Encryption Key Management

Performance Considerations

Performance Impact: Database encryption adds computational overhead. Consider these factors:
  • AUTH mode: ~5-8% performance impact
  • ALL mode: ~10-15% performance impact
  • Battery usage: Slightly increased due to encryption/decryption operations
  • Storage: Minimal impact on storage size

Next Steps

Troubleshooting