Add the code below to initialize the SDK:

String brandID = "Your-Liveperson-Account-Id-String";
String appID = "your-app-package-name"
LivePerson.initialize(context, new InitLivePersonProperties( brandID, appID,
  new InitLivePersonCallBack() {
    public void onInitSucceed() {

    public void onInitFailed(Exception e) {
Element Description
brandID Your LivePerson account ID. If you don’t have one, please contact your LivePerson representative.
appID Your app ID, used for registering LP pusher service.
onInitSuccess Callback that indicates the init process has finished successfully.
onInitFailed Callback that indicates the init process has failed.
Note: You can call initialize before showing LivePerson's Activity/Fragment, but it is recommended to initialize the SDK in your app's Application class.
In order tso use the Monitoring API, you need to initialize the SDK with MonitoringParams. For more information, click here. Once initialization is completed (onInitSucceed), you can call LivePerson methods.

The SDK supports two operation modes:

  • Activity.

  • Fragment.

Note: For more information about each mode, refer to Step 3: Code integration for basic deployment.

To start LivePerson's Activity mode:

LivePerson.showConversation(Activity activity, LPAuthenticationParams lpAuthenticationParams, ConversationViewParams params);

To start LivePerson's Fragment mode: (Attach the returned fragment to a container in your activity) :

LivePerson.getConversationFragment( LPAuthenticationParams lpAuthenticationParams, ConversationViewParams params);

When using fragment mode, you could use the provided SDK callbacks in your app in order to implement functionalities such as menu items, action bar indications, agent name, and typing indicator.

Shut Down

Close LivePerson Messaging SDK- Uninitialized SDK without cleaning data.

public static void shutDown(final ShutDownLivePersonCallback shutdownCallback)

Click here for more information.


Close LivePerson Messaging SDK- Clear LivePerson Messaging SDK data and unregister push.

public static void logOut(final Context context, final String brandId, final String appId, final LogoutLivePersonCallback logoutCallback)

Click here for more information.