Integration Guide
Our Mobile Support SDK enables you to add a knowledge base to your apps in a plug-and-play fashion.
Prerequisites
The following steps assume that you are using Android Studio and the Gradle build system.
Please ensure that your application at least supports v14 (Ice Cream Sandwich).
| Property | Version No. |
|---|---|
| targetSDKVersion | 23 |
| compileSDKVersion | 23 |
| buildToolsVersion | 23 |
| minSDKVersion | 14 |
Setting up the SDK
To get started, please follow the steps below. You will be making changes to the following files:
├── build.gradle
├── src/
| ├── main/
| | ├── AndroidManifest.xml
| | ├── java/
| | | ├── MainActivity.java
| | | ├── MySampleApplication.java
| | ├── res/
| | | ├── values/
| | | | ├── styles.xml
| | | | ├── colors.xml
Note: For a better understanding, do go through the source code of the sample app here.
Step 1: AndroidManifest.xml
Add the following lines to your AndroidManifest.xml file. Make sure to paste the following lines in between the Application tags.
<activity
android:name="com.kayako.sdk.android.k5.activities.KayakoHelpCenterActivity"
android:theme="@style/HelpCenterTheme" />
<activity
android:name="com.kayako.sdk.android.k5.activities.KayakoSearchArticleActivity"
android:launchMode="singleTask"
android:theme="@style/Ko__SearchArticlePageTheme"
android:windowSoftInputMode="adjustPan|stateVisible" />
<activity
android:name="com.kayako.sdk.android.k5.activities.KayakoArticleActivity"
android:theme="@style/HelpCenterTheme" />
Step 2: styles.xml
Paste the following lines to your res/values/styles.xml file.
<style name="HelpCenterTheme" parent="Ko__AppTheme">
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
</style>
Step 3: colors.xml
Please ensure that the following color names are mentioned in your res/values/colors.xml file.
<color name="colorPrimary">#9B9B9B</color>
<color name="colorPrimaryDark">#7C7C7C</color>
<color name="colorAccent">#3AA6C5</color>
Note: For advanced customization, read the Design section.
Step 4: build.gradle
Add the following lines to your module's build.xml file:
repositories {
maven {
url "http://dl.bintray.com/kayako-support/kayako-devkits"
}
}
dependencies {
compile 'com.android.support:appcompat-v7:24.2.0'
compile 'com.android.support:recyclerview-v7:24.2.0'
compile 'com.android.support:support-v4:24.2.0'
compile 'com.android.support:design:24.2.0'
compile 'com.squareup.okhttp3:okhttp:3.4.1'
compile 'com.squareup.okio:okio:1.9.0'
compile 'com.google.code.gson:gson:2.4'
compile 'com.github.bumptech.glide:glide:3.7.0'
compile 'com.kayako.messenger:kayako-messenger:0.0.1'
compile 'com.kayako:kayako:0.0.3'
}
Step 5: Application class
Extend your Application class and add the following lines to your onCreate() method:
Kayako.initialize(this);
Step 6: Activity class
Good Work! You've just completed the steps to the integration guide. To get started on using the SDK, open Getting Started.
Additional Configuration
If you’re using proguard, please add the following code to your proguard-project.txt file
# OkHttp3
-keepattributes Signature
-keepattributes *Annotation*
-keep class okhttp3.** { *; }
-keep interface okhttp3.** { *; }
-dontwarn okhttp3.**
# Glide
-keep public class * implements com.bumptech.glide.module.GlideModule
-keep public enum com.bumptech.glide.load.resource.bitmap.ImageHeaderParser$** {
**[] $VALUES;
public *;
}
# Kayako Android SDK
-keep class com.kayako.sdk.android.k5.** { *; }
-dontwarn com.kayako.sdk.android.k5.**
-keepattributes InnerClasses
# Android
-keep class android.support.v4.** { *; }
For more information on proguard, access the proguard documentation: http://developer.android.com/tools/help/proguard.html
Source Code & Licensing
The source code is available on the following github repository:
https://github.com/kayako/Kayako-Android-SDK
The source code is distributed under the Apache 2.0 License: