> For the complete documentation index, see [llms.txt](https://chat-sdk.gitbook.io/android/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://chat-sdk.gitbook.io/android/api/integrating-chat-sdk-user-profiles-with-your-app.md).

# Integrating Chat SDK User profiles with your app

The Chat SDK stores it's own user object in Firebase. That means that if you already have your own user profiles, you will need to synchronize these with Chat SDK. Otherwise, the incorrect avatar and name will show up in the chat.

To do this you can use the following code:

```
// Get the current user
User currentUser = ChatSDK.core().currentUser();

// Update their name and avatar
currentUser.setName("name");
currentUser.setAvatarURL("URL");

// Push that data to Firebase
ChatSDK.core().pushUser().subscribe(() -> {
    // Handle success
}, throwable -> {
    // Handle failure
});
```

Or you can use the `SimpleAPI` for convenience:

```
SimpleAPI.updateUser("name", "avatarURL");
```

The best time to run this code is after authentication and whenever the user updates their profile information.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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://chat-sdk.gitbook.io/android/api/integrating-chat-sdk-user-profiles-with-your-app.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.
