Permalink
Failed to load latest commit information.
.github Add issue template Nov 10, 2017
core Release 5.14.2 Sep 6, 2018
demo Release 5.14.0 Aug 17, 2018
languages Release 5.11.0 Apr 6, 2018
ui Release 5.14.2 Sep 6, 2018
LICENSE Release 5.12.4 Jun 1, 2018
README.md Release 5.14.2 Sep 6, 2018

README.md

Smooch SDK for Android

Bintray License

Sign up and get an app id: https://app.smooch.io/signup.

Add the dependencies right into your build.gradle file

compile 'io.smooch:core:5.14.2'
compile 'io.smooch:ui:5.14.2'

Initialize Smooch in your Application class

import android.app.Application;
import io.smooch.core.Settings;
import io.smooch.core.Smooch;
import io.smooch.core.SmoochCallback;


public class YourApplication extends Application {
    @Override
    public void onCreate() {
        super.onCreate();
        Smooch.init(this, new Settings("YOUR_APP_ID"), new SmoochCallback() {
            @Override
            public void run(Response response) {
                // Handle init result
            }
        });
    }
}

Show the ConversationActivity

import io.smooch.ui.ConversationActivity;

...

ConversationActivity.show(this);

For more details see our docs and full install guide.

Dependencies

Smooch uses the following dependencies:

    // Core dependencies
    implementation 'com.google.code.gson:gson:2.4'
    implementation 'com.squareup.okhttp3:okhttp:3.11.0'
    implementation 'com.google.firebase:firebase-core:16.0.0'
    implementation 'com.google.firebase:firebase-messaging:17.0.0'
    implementation 'com.android.support:support-annotations:27.1.1'

    // UI dependencies
    implementation 'com.github.bumptech.glide:glide:4.6.1'
    implementation 'com.android.support:support-v4:27.1.1'
    implementation 'com.android.support:appcompat-v7:27.1.1'
    implementation 'com.android.support:exifinterface:27.1.1'
    implementation 'com.android.support:recyclerview-v7:27.1.1'
    implementation 'com.android.support:support-media-compat:27.1.1'
    implementation 'com.google.android.gms:play-services-location:15.0.1'
    implementation 'com.davemorrissey.labs:subsampling-scale-image-view:3.10.0'

If your app also uses Firebase or support libraries, their version must match the ones used by Smooch to avoid runtime errors. If you need to update the version used by Smooch to match yours, you can do so by updating the dependencies in your app's build.gradle file.

def supportLibraryVersion = "YOUR_SUPPORT_LIBRARY_VERSION"
def firebaseCoreVersion = "YOUR_FIREBASE_CORE_VERSION"
def firebaseMessagingVersion = "YOUR_FIREBASE_MESSAGING_VERSION"
def playServicesVersion = "YOUR_PLAY_SERVICES_VERSION"

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation "com.android.support:appcompat-v7:${supportLibraryVersion}"

    // Smooch
    implementation 'io.smooch:core:5.14.2'
    implementation 'io.smooch:ui:5.14.2'

    // Libraries imported by Smooch
    implementation "com.google.firebase:firebase-core:${firebaseCoreVersion}"
    implementation "com.google.firebase:firebase-messaging:${firebaseMessagingVersion}"
    implementation "com.android.support:support-v4:${supportLibraryVersion}"
    implementation "com.android.support:exifinterface:${supportLibraryVersion}"
    implementation "com.android.support:recyclerview-v7:${supportLibraryVersion}"
    implementation "com.android.support:support-media-compat:${supportLibraryVersion}"
    implementation "com.google.android.gms:play-services-location:${playServicesVersion}"

    // Your other app dependencies
}