Introducing Comm100 Live Chat Mobile SDK

Comm100 Live Chat comes with a mobile SDK, which allows you to integrate Live Chat into your own mobile app. This allows you to place a chat button into your app. Once your visitors touch the button, they will be redirected to your chat window, where they can chat with your live chat agents. This gives you a quick and easy way to become more connected to the users of your app, and helps you to mirror the chat experience on your desktop and mobile websites.


Getting Started

Bringing live chat into your app is simple and just a few lines of codes away. Here is an example of how you can integrate Comm100 Live Chat with your app using the SDK.

As shown in the screenshot, this app is an online Kids’ clothing store. You can put a button in the navigation bar so when your customers need help while browsing through clothes, they can touch the Chat Now button for instant assistance.

As soon as your users touch the chat button, they will be directed to the chat window. Users can also touch the Back button to return to the previous screen where they can see the clothes. While they are doing so, the chat will stay connected and intact. In this case, they can re-select Chat Now to continue the chat conversation. Live Chat Mobile SDK Sample Files

We host sample live chat mobile SDKs for iOS and Android through Github. Please click here to view and download the sample files.


Steps to Use Live Chat Mobile SDK in iOS Devices

  1. Import VisitorClient.framework into your iOS project.
  2. Set the response to the chat button touch event. You can use the URL of your live chat window to initialize a VisitorClientController instance and then push the chat window to the top of the mobile screen.

Here is the sample code for your reference. Remember, you need to replace the siteId and planId with your own Site ID and Campaign/Code Plan ID from the JavaScript live chat code in your account. Also, replace the live chat server with the correct one.

-(IBAction) startChat:(id)sender{
NSString * chatUrl = @"paste_your_chat_url_here";
VisitorClientController * visitorClient = [[VisitorClientController alloc] initWithChatUrl:chatUrl];
UINavModalWebView * navController = [[UINavModalWebView alloc] initWithRootViewController:visitorClient];
navController.modalPresentationStyle = UIModalPresentationFullScreen;
visitorClient.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"Back" style:UIBarButtonItemStylePlain target:self action:@selector(BACK:)];
visitorClient.navigationItem.title = @"Chat";
[self presentViewController:navController animated:true completion:nil];

Note: Contact us via live chat if you are not sure about your chat URL.

Steps to Use Live Chat Mobile SDK in Android Devices

  1. Import visitor-client-v1.0.aar into your Android project.
  2. When a visitor clicks on your chat button, you should call the button’s instance method setOnClickListener with the following code to show ChatActivity. You need to provide your siteId, planId and chatServer address, which can be found in your account.
    public void onClick(View v) {
    int siteId = 10000;
    int planId = 5000239;
    String chatServer="";
    VisitorClientInterface.setChatUrl(chatserver "/chatWindow.aspx?planId="   campaignId   "&siteId="   siteId);
    Intent intent = new Intent(MainActivity.this, ChatActivity.class);

In the above example, the siteId is the unique Site ID for your account, and planId is the Campaign/Code Plan ID.

Note: Contact us for the chat server address.
  • In iOS, we use the WKWebView to load the chat window.
  • In Android, we use WebView to load the chat window. Also, your WebView should support JavaScript, cookies and so on.

As an alternative to Comm100 Live Chat Mobile SDK, you can also simply implement the live chat in your own App with the following ways:

  • Use the WKWebView/WebView to load your chat window in the APP.
  • Call the browser to open the chat window.