A perfect live chat, email automation and a super-intuitive help desk in one smart customer communication platform.
This SDK can be added to Android, Flutter, Apache Cordova or React Native projects to start a live chat from a mobile application.
The changelog is available here
Add it in your root build.gradle at the end of repositories:
allprojects {
repositories {
//...
maven { url 'https://jitpack.io' }
}
}
Add the dependency
implementation 'com.helpcrunch:chat-sdk:3.x.x'
This library uses Java 8 bytecode, so you will need to enable it in your project as well:
android {
//...
// For Java projects
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
// For Kotlin projects
kotlinOptions {
jvmTarget = JavaVersion.VERSION_1_8.toString()
}
}
google-services.json
file to the ../app/
folderA. Initialize HelpCrunch by calling the following in the onCreate() method of your application
HelpCrunch.initialize(ORGANISATION, APP_ID, SECRET);
also you can set up option or user data
HCUser user = new HCUser.Builder()
.withEmail("test@user.data")
.withName("Test User")
.build();
HCOptions.Builder options = new HCOptions.Builder()
.setTheme(/*some HCTheme*/)
.build();
HelpCrunch.initialize(ORGANIZATION, APP_ID, SECRET, user, options);
B. If you want to update customer info - just call
HelpCrunch.updateUser(user);
user data could be created like this:
HCUser user = new HCUser.Builder()
.withName("username")
.withEmail("email")
.withPhone("phone")
.withUserId("registerUserId")
.withCustomData(/*some Map<String, Object>*/)
.withCompany("organization")
.build();
All fields are optional. Custom data could be created like this:
HashMap<String, Object> customData = new HashMap();
customData.put("CUSTOM_TIME", System.currentTimeMillis());
C. Open Chat Screen calling showChatScreen(Context context)
method:
Helpcrunch.showChatScreen(context);
HelpCrunch SDK is fully compatible with R8 out of the box and doesn't require adding any extra rules.
The documentation is available in our Knowledge Base located at this link.
This project is licensed under the Apache License 2.0 - see the LICENSE file for details