mChat - Android

Chat SDK for Mehery

mChat - Android is a an android SDK for enabling to add Mehery Chat in you application.

Features

  • Get the key and domain on Mehery and start a hassle free journey to add customer support chat to your application
  • Customize the look and feel of the chat window , each and every element is customizable to your needs and app theme

Setup

To start with the integration we would first need to setup our webchat. For this login to admin panel for Mehery. Go to channel and add a new WebChat channel.

image description

On clicking Webchat you would need to fill in some details.

image description

Once thats done please copy the content of script, you will require it.

image description

Installing

You can install the sdk by adding following dependancy

allprojects {
        repositories {
            ...
            maven { url 'https://jitpack.io' }
        }
    }
dependencies {
      implementation 'com.github.mehery-soccom:mChat-Android:1.0.2'
}

Usage

To invoke the chat . Please follow the following code.

MChat mChat = new MChat(MainActivity.this);
new MChatConfig(headerTitle,headerColor,headerLogo,headerTitleColor);
mChat.start(domain,channelKey,channelId,config);

For further customization :

eg. config.setBackgroundColor(backgroundColor);

Attribute Value Description Default Value  
  headerColor int This is for chaning color of the header 0xfff
  headerTitleColor int This is for changing color of the title of the header 0xFF000000
  chatBackgroundColor int This is for changing background color of tha chat message listing 0xFF000000
  sentMessageBubbleColor int This is to change the bacground color of chat bubble for sent messages 0xFF000000
  sentMessageTextColor int This is to change the text color of the sent messages 0xFF000000
  receivedMessageBubbleColor int This is to change the bacground color of chat bubble for received messages 0xFF000000
  receivedMessageTextColor int This is to change the text color of the received messages 0xFF000000
  userInputBackgroundColor int This is to change the background color of the user input box at bottom 0xFF000000
  userInputTextColor int This is to change the text color of the user input box at bottom 0xFF000000

License

MIT