Android

Mluvii provides a framework for integration with your application(Android 5.0+, lower version are not supported due to the low version of WebView). The code provided by us enables you to:

  • initiate a webview with a widget with your company data

MluviiLibrary.getMluviiWebView(Context, server_name, company_id, tenant_id, widget_name, language);
  • notification on change of widget status

 MluviiLibrary.setStatusOnlineCallback(() ->{});
 MluviiLibrary.setStatusBusyCallback(() ->{});
 MluviiLibrary.setStatusOfflineCallback(() ->{});
  • open chat

 MluviiLibrary.runChat();
  • close the chat and load a page with widget

MluviiLibrary.setCloseChatFunc(() ->{});
  • add own handling for opening URL in chat

MluviiLibrary.setUrlCallbackFunc(new MluviiLibrary.UrlCallback(){

            @Override
            public Void call() throws Exception{
                Log.d("MLUVII_URL_CALLBACK","Test url: "+this.url);
                return null;
            }
        });
  • adding customized parameters - when adding customized parameters, you must first set them in the Administration Interface, see Application

  • if the user of your mobile application has to perform some action (click on a button, etc.) after opening the WebView, we recomment to add a delay e.g. 2 seconds. This will ensure flawless saving of values to existing session parameters.

  • it is necessary to first set parameters and then call MluviiLibrary.runChat()

  • To allow tracking of clients(chat history) you need to allow cookies in webView

You need to allow permissions in manifest

In Android 6.0+ you have to add in app check for permissions. This can be called when needed and code should look like this:

Android Library

Sample Code

You can find it here.

Last updated

Was this helpful?