Skip to content

keyreply/keyreply-android

Repository files navigation

KeyReply

API Download

Example

Demo application is included in the demo folder. To run it, clone the repo, and run demo module with Android Studio

KeyReplySDK Demo

Adding KeyReplySDK to your app

Gradle

dependencies {
  compile 'com.keyreply:keyreply:1.2.2'
}

Manual installation

  • Clone the repo
  • Import 'keyreply' folder as new module in your project

Requirements

  • Android SDK 19+

Usage

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"
        />

Customizations

Collapse on load

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"
        />

Appearance

All customization of appearance are to be done via KeyReply's web console.

APIs

Setting server url

keyReplyView.setServerSetting("server_url");

Setting user setting

keyReplyView.setUserSetting(JSONObject);

Setting env url (webview url)

keyReplyView.setEnvUrl("env_url");

Expand/Collapse/Toggle chat window

keyReplyView.setExpanded(true)
keyReplyView.setExpanded(false)
keyReplyView.toggle()

Send a chat message programmatically

Chat message can be sent via KeyReplySDK UI or done programmatically as followed:

keyReplyView.sendMessage("your_message_content")

Attributes

attr format description
clientId string Your Client Id from KeyReply
expanded boolean Default expand state of chat window

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •