# Navigate Live Chat UI

You may optionally navigate through TapTalk.io Omnichannel Live Chat's UI, such as case list and chat room, using the following methods:

### Open TapTalk Omnichannel View

To open TapTalkLive's view UI for your application, you can use the **`openTapTalkLiveView`** method from the **TapTalkLive** class. This will open a homepage activity containing a list of available channels, the user's latest case, and QnA path.

{% tabs %}
{% tab title="Java" %}
{% code title="YourActivity.java" %}

```java
import io.taptalk.taptalklive.TapTalkLive;

...

TapTalkLive.openTapTalkLiveView(YourActivity.this);
```

{% endcode %}
{% endtab %}

{% tab title="Kotlin" %}
{% code title="YourActivity.kt" %}

```kotlin
import io.taptalk.taptalklive.TapTalkLive

...

TapTalkLive.openTapTalkLiveView(this@YourActivity)
```

{% endcode %}
{% endtab %}
{% endtabs %}

{% hint style="info" %}
**`openTapTalkLiveView`** will return **`true`** if opening the view is successful, and will return `false` if it fails due to incomplete initialization. TapTalkLive initialization might not be completed if the device is not connected to internet or an incorrect **`APP_KEY_SECRET`** parameter was provided.
{% endhint %}

### Open Case List View

You can open the user's case list page by calling **`openCaseListView`**. If no user is authenticated, create case form will be opened instead.

{% tabs %}
{% tab title="Java" %}
{% code title="YourActivity.java" %}

```java
import io.taptalk.taptalklive.TapTalkLive;

...

TapTalkLive.openCaseListView(YourActivity.this);
```

{% endcode %}
{% endtab %}

{% tab title="Kotlin" %}
{% code title="YourActivity.kt" %}

```kotlin
import io.taptalk.taptalklive.TapTalkLive

...

TapTalkLive.openCaseListView(this@YourActivity)
```

{% endcode %}
{% endtab %}
{% endtabs %}

### Get Case List Fragment

You may optionally attach TapTalk Omnichannel's case list fragment to your own activity. To obtain the chat list fragment instance, use the **`getCaseListFragment`** method.&#x20;

{% tabs %}
{% tab title="Java" %}
{% code title="YourActivity.java" %}

```java
import io.taptalk.taptalklive.TapTalkLive;

...

TTLCaseListFragment fragment = TapTalkLive.getCaseListFragment();
```

{% endcode %}
{% endtab %}

{% tab title="Kotlin" %}
{% code title="YourActivity.kt" %}

```kotlin
import io.taptalk.taptalklive.TapTalkLive

...

val fragment = TapTalkLive.getCaseListFragment()
```

{% endcode %}
{% endtab %}
{% endtabs %}

{% hint style="info" %}
**`getCaseListFragment`** will return a **`TTLCaseListFragment`** instance.
{% endhint %}

### Open Existing Case's Chat Room

To use this method, you need to first finish [authentication](/onetalk-omnichannel-documentation/onetalk-channel-integration/live-chat/onetalk-android/authentication.md#authenticate-user-optional) process.

Once authenticated, you can open a chat room from one the user's case by calling **`openCaseChatRoom`**, providing the **context** and **XC Room ID**. You may obtain XC Room ID from one of the [active user's case list](/onetalk-omnichannel-documentation/onetalk-channel-integration/live-chat/onetalk-android/case-and-topic.md#get-active-users-case-list), or by [creating a new case](/onetalk-omnichannel-documentation/onetalk-channel-integration/live-chat/onetalk-android/case-and-topic.md#create-a-new-case).

{% tabs %}
{% tab title="Java" %}
{% code title="YourActivity.java" %}

```java
import io.taptalk.taptalklive.TapTalkLive;
import io.taptalk.taptalklive.Listener.TTLCommonListener;

...

TapTalkLive.openCaseChatRoom(YourActivity.this, XC_ROOM_ID, new TTLCommonListener() {
    @Override
    public void onSuccess(String successMessage) {
        // Successfully opened chat room
    }

    @Override
    public void onError(String errorCode, String errorMessage) {
        
    }
});
```

{% endcode %}
{% endtab %}

{% tab title="Kotlin" %}
{% code title="YourActivity.kt" %}

```kotlin
import io.taptalk.taptalklive.TapTalkLive
import io.taptalk.taptalklive.Listener.TTLCommonListener

...

TapTalkLive.openCaseChatRoom(this@YourActivity, XC_ROOM_ID, object : TTLCommonListener() {
    override fun onSuccess(successMessage: String?) {
        // Successfully opened chat room
    }
    override fun onError(errorCode: String?, errorMessage: String?) {

    }
})
```

{% endcode %}
{% endtab %}
{% endtabs %}

{% hint style="info" %}
**Parameters**\
\&#xNAN;**`CONTEXT`**: (Context) Context or your current Activity\
\&#xNAN;**`XC_ROOM_ID`**: (String) XC Room ID of the user's case, can be obtained from [**`getUserCaseList`**](/onetalk-omnichannel-documentation/onetalk-channel-integration/live-chat/onetalk-android/case-and-topic.md#get-active-users-case-list) or [**`createNewCase`**](/onetalk-omnichannel-documentation/onetalk-channel-integration/live-chat/onetalk-android/case-and-topic.md#create-a-new-case)`(TTLCaseModel.tapTalkXCRoomID)`
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.taptalk.io/onetalk-omnichannel-documentation/onetalk-channel-integration/live-chat/onetalk-android/navigate-live-chat-ui.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
