For any issues contact Android lead Justin: justin@xmodesocial.com

1. You will need two different strings that should be provided to you by our team:

  1. xmodeToken YOUR_XMODE_TOKEN
  2. apiKey YOUR_XMODE_API_KEY

2. In your (root) project build.gradle file, add the following lines (see lines in bold)

buildscript {

   repositories {

       jcenter()

   }

   dependencies {

       classpath 'com.android.tools.build:gradle:2.2.3'

       classpath 'com.google.gms:google-services:3.0.0'

   }

}

allprojects {

   repositories {

       jcenter()

       maven {

url 'https://jitpack.io'

                   credentials {

username xmodeToken

}

       }

   }

}

3. Create a reference to the xmodeToken in your (root) project’s gradle.properties file and add it to your project’s .gitignore for security. If it doesn’t exist, please create it and add the following line:

xmodeToken=YOUR_XMODE_TOKEN

4. If you are using proguard/dexguard, add the following:

         -dontwarn okio.**

-keep class io.xmode.** {  *; }

-keep class com.google.android.gms.** {  *; }

-keepclassmembers class * implements android.os.Parcelable {

   static ** CREATOR;

}

-keepclassmembers class * implements com.google.android.gms.common.internal.ReflectedParcelable {

   static ** CREATOR;

}

5. Also, in your app’s AndroidManifest.xml, please add the following to the inside of your <application …> tag:

<meta-data

   android:name="io.xmode.ApiKey"

   android:value="YOUR_XMODE_API_KEY" />

6. Add the following dependency to your application’s build.gradle file:

compile 'com.github.xmodesocial:xmodesdk:2.5.8.2'

7. Go to your class that extends Application or MultiDexApplication and add the following:

        public class MyApplication extends android.app.Application {

                   @Override

                   public void onCreate() {

                                    super.onCreate();

                                    XModeSDK.init(this);

                       }

}

NOTE: Please do not initialize the XModeSDK from an asynctask, it should be called on its own in the onCreate method of your Application class as demonstrated above.

8. The current version is 2.5.8.2