Chat with app users, integrate your favorite tools, and deliver a great customer experience.
Your website ID can be found in the Crisp App URL:
Crisp Website ID is an UUID like e30a04ee-f81c-4935-b8d8-5fa55831b1c0
Add the Crisp SDK in your dependencies:
compile 'im.crisp:crisp-sdk:0.1.14'
Initialize the library in your Application subclass:
public class Initializer extends Application {
@Override
public void onCreate() {
super.onCreate();
Crisp.initialize(this);
// Replace it with your WEBSITE_ID
// Retrieve it using https://app.crisp.chat/website/[YOUR_WEBSITE_ID]/
Crisp.getInstance().setWebsiteId("7598bf86-9ebb-46bc-8c61-be8929bbf93d");
}
}
You can embed the CrispFragment in your Activity
<fragment
android:name="im.crisp.sdk.ui.CrispFragment"
android:tag="crisp_fragment"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_margin="0dp" />
Crisp.setLocale("it")
Crisp.User.setEmail("[email protected]");
Crisp.User.setNickname("John Doe");
Crisp.User.setPhone("003370123456789");
Crisp.User.setAvatar("https://pbs.twimg.com/profile_images/782474226020200448/zDo-gAo0_400x400.jpg");
Crisp.Session.setData("key", "value");
Crisp.Session.setData(HashMap<String, String>);
Crisp.Session.setSegments("segment");
Crisp.Session.setSegments("segment1", "segment2");
Crisp.Session.pushEvent("signup", JSONObject, "blue");
Crisp.Session.reset();