The showConversation API displays the messaging screen as a new activity with the conversation fragment. The consumer can then start or continue a conversation. The conversation screen is controlled entirely by the SDK.
This method returns a Boolean value to indicate success or failure in opening the messaging screen. If the operation is successful, this method returns true, else it returns false.
Initiating the conversation screen opens the WebSocket to the LivePerson Messaging Server.
If your system implementation involves an authentication step — pass LPAuthenticationParams.
There are 2 authenticated connection methods:
- with authenticationKey — Usually this means that the LivePerson backend will verify the authentication token sent by the SDK with your system servers. If the key cannot be verified on your company’s backend servers, this call will fail. new LPAuthenticationParams().setAuthKey(yourAuthCode).
Optional — when using this method, you can also set a special redirect URL when authenticating; by calling: lpAuthenticationParams.setHostAppRedirectUri(yourRedirectUrl)
- with jwt — new LPAuthenticationParams().setHostAppJWT(yourJwt)
if you want to connect in an unauthenticated way, you have two options: Set up Unauth flow messaging, or use Signup flow, by passing an LPAuthenticationParams of type UN_AUTH or SIGN_UP, respectively.
Signup flow is now deprecated. Please use an authenticated connection method instead, or UN_AUTH for unauthenticated connections.
boolean viewOnlyMode: define if to show /hide the enter message area (under the conversation view)
public static boolean showConversation(Activity activity, LPAuthenticationParams lpAuthenticationParams, ConversationViewParams params)
|activity||The calling activity|