> ## Documentation Index
> Fetch the complete documentation index at: https://support.getskara.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Android SDK - Configuration

Track who your users are and what they do in your mobile app and Customize the Skara Chat Messenger. Here’s how to configure Skara Chat for Android:

* [Update your User](#update-your-user)
* [Submit an Event](#submit-an-event)
* [Create a Custom Launcher](#create-a-custom-launcher)

### Update your User

* When you call a login method we create a user with his basic detail, after if you want to change his basic detail then you can use update user functionality as per below code snippet:

```kotlin theme={null}
// Prepare a user's detail object
val userDetail = UserDetails.create()
val email = "user's email address"
val firstName = "user's first name"
val lastName = "user's last name"
val userId = "user's user id" // Unique id recommended

userDetail.withEmail(email)
    .withFirstName(firstName)
    .withLastName(lastName)

SkaraChatSDK.getInstance().update(userId, userDetail, object : UpdateListener {
    override fun onUpdate() {
        // Update successful
    }

    override fun onError(salesmateException: SalesmateException) {
        // Error on update
    }
})
```

### Submit an Event

* You can log events in Skara Chat that record what users do in your app and when they do it. For example, you could record the item a user ordered from your mobile app, and when they ordered it.

```kotlin theme={null}
// Prepare a record event object
val data = hashMapOf<String, String>().apply {
    put("orderId", "order id")
    put("productId", "product id")
}

val eventName = "order_detail"

// Record custom event in Salesmate Chat SDK
SalesmateChatSDK.getInstance().recordEvent(eventName, data)
```

### Create a Custom Launcher

* However, if you’d like Messenger to open from another location in your mobile app, you can create a custom launcher. This allows you to specify a button, link, or element that opens Messenger. For example, you can trigger the launcher to open when a customer clicks on your ‘Ask for support’ button.

![Custom Launcher](https://quip.com/blob/fXDAAAqlKfM/ioJmS_q4oPPr_4K0u37iAw?a=pKXa9iPaiNSjJVwNQ4ao70wan7JBqZDkysrIV8FnB48a)

* If you have a custom launcher, you can call:

```kotlin theme={null}
// To launch messenger
SkaraChatSDK.getInstance().startMessenger() 
```
