Demo application is included in the demo folder. To run it, clone the repo, and run demo module with Android Studio
dependencies {
compile 'com.keyreply:keyreply:1.2.2'
}- Clone the repo
- Import 'keyreply' folder as new module in your project
- Android SDK 19+
KeyReplySDK uses a default client ID out of the box for demo purpose. Please obtain your own Client ID from KeyReply reprensentative directly.
Add widget in your xml layout and replace clientId with your own Client Id, like this:
<com.keyreply.KeyReplyView
android:id="@+id/keyReplyView"
android:layout_width="match_parent"
android:layout_height="match_parent"
/>By default, KeyReplySDK will show expanded UI on load. This can be disabled by:
<com.keyreply.KeyReplyView
android:id="@+id/keyReplyView"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:expanded="false"
/>All customization of appearance are to be done via KeyReply's web console.
keyReplyView.setServerSetting("server_url");
keyReplyView.setUserSetting(JSONObject);
keyReplyView.setEnvUrl("env_url");
keyReplyView.setExpanded(true)
keyReplyView.setExpanded(false)
keyReplyView.toggle()
Chat message can be sent via KeyReplySDK UI or done programmatically as followed:
keyReplyView.sendMessage("your_message_content")| attr | format | description |
|---|---|---|
| clientId | string | Your Client Id from KeyReply |
| expanded | boolean | Default expand state of chat window |
