{"id":36895796,"url":"https://github.com/livechat/chat-window-android","last_synced_at":"2026-01-12T15:42:01.542Z","repository":{"id":12637091,"uuid":"72419743","full_name":"livechat/chat-window-android","owner":"livechat","description":"LiveChat mobile chat window for Android","archived":false,"fork":false,"pushed_at":"2025-09-19T12:32:11.000Z","size":2182,"stargazers_count":26,"open_issues_count":9,"forks_count":28,"subscribers_count":17,"default_branch":"master","last_synced_at":"2025-10-09T01:12:48.607Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://platform.text.com/docs/getting-started/installing-livechat/android-widget/","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/livechat.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2016-10-31T09:02:52.000Z","updated_at":"2025-09-19T12:32:15.000Z","dependencies_parsed_at":"2024-07-19T16:38:31.601Z","dependency_job_id":"3bd83c55-7a65-4d50-8026-e13c90863be8","html_url":"https://github.com/livechat/chat-window-android","commit_stats":null,"previous_names":[],"tags_count":38,"template":false,"template_full_name":null,"purl":"pkg:github/livechat/chat-window-android","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/livechat%2Fchat-window-android","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/livechat%2Fchat-window-android/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/livechat%2Fchat-window-android/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/livechat%2Fchat-window-android/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/livechat","download_url":"https://codeload.github.com/livechat/chat-window-android/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/livechat%2Fchat-window-android/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28341377,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-12T12:22:26.515Z","status":"ssl_error","status_checked_at":"2026-01-12T12:22:10.856Z","response_time":98,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-01-12T15:42:00.912Z","updated_at":"2026-01-12T15:42:01.531Z","avatar_url":"https://github.com/livechat.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"LiveChat SDK for Android\n===============\n\n[![Release](https://jitpack.io/v/livechat/chat-window-android.svg)](https://jitpack.io/#livechat/chat-window-android)\n\nAn Android SDK for integrating LiveChat functionality into your mobile application.\n\n**LiveChat:** https://developers.livechat.com/docs/getting-started/installing-livechat/android-widget/\n\n# Table of contents\n\n1.  [Getting started](#getting-started)\n    1. [Requirements](#requirements)\n    1. [Installation](#installation)\n    1. [Initialization](#initialization)\n    1. [Display the chat window](#display-the-chat-window)\n1. [Customer information](#customer-information)\n1. [Unread message counter](#unread-message-counter)\n1. [UI Customization](#ui-customization)\n   1. [Error view](#error-view)\n   1. [Activity](#activity)\n1. [Clearing chat session](#clearing-chat-session)\n1. [Link handling](#link-handling)\n1. [Troubleshooting](#troubleshooting)\n   1. [Error handling](#error-handling)\n   1. [Logger](#logger)\n   1. [Missing file picker activity](#missing-file-picker-activity)\n1. [Advanced usage](#advanced-usage)\n   1. [LiveChatView lifecycle modes](#livechatview-lifecycle-scope)\n   1. [Embedding LiveChatView](#embed-livechatview-in-your-layout)\n1. [Migrating from v2.5.0 to 3.0.0](#migrating-from-v250-to-300)\n\n\n\n# Getting started\n\nAdd real-time customer support to your Android application with LiveChat's SDK. This guide covers installation, basic setup, and advanced features.\n\n\u003e **Note:** 💡 The SDK is now Kotlin-based and uses the new package `com.livechatinc.chatsdk`. See migration notes if you are upgrading from v2.x.x.\n\n## Requirements\n\nThe Android SDK is compatible with:\n- `Android 5.0 (API level 21) or higher`\n- `enabled Java 8 API desugaring when supporting Android API levels \u003c 24`\n- `Java 8 or higher`\n\n## Installation\n\nTo install the SDK, first add the JitPack repository to your root `build.gradle`:\n```kotlin\nallprojects {\n   repositories {\n      maven { url 'https://jitpack.io' }\n   }\n}\n```\n\nNext, add dependency to your app's `build.gradle`:\n\n```kotlin\ndependencies {\n    implementation 'com.github.livechat:chat-window-android:3.0.2'\n}\n```\n\nThen, add Internet permission to `AndroidManifest.xml`:\n\n```xml\n\u003cuses-permission android:name=\"android.permission.INTERNET\" /\u003e\n```\n\n## Initialization\n\nYou can initialize the SDK in the `onCreate()` method of your [`Application`](https://developer.android.com/reference/android/app/Application) instance:\n\n```kotlin\nLiveChat.initialize(\"\u003cLICENSE\u003e\", this)\n```\n\n## Display the chat window\n\nThe function below allows you to display a chat to a customer:\n\n```kotlin\nLiveChat.getInstance().show()\n```\nThat's it! Your customers can start chatting with you now.\n\n# Customer information\n\nYou can pre-fill the [pre-chat form](https://my.livechatinc.com/settings/pre-chat-form) fields with customer information to provide your agents with more details about the customer. All information is optional.\n\nThe group ID defaults to `0` if not provided.\n\n```kotlin\nLiveChat.getInstance().setCustomerInfo(\n            \"Joe\", // Name\n            \"joe@mail.com\", // Email\n            \"0\", // Group ID, defaults to \"0\"\n            Collections.singletonMap(\"internalCustomerId\", \"ABC123\") // Any additional custom parameters\n        )\n```\n\n\u003e **Note:** You should call the `setCustomerInfo()` before `LiveChat.getInstance().show()`. To update customer properties when the chat has already loaded, recreate it with `LiveChat.getInstance().destroyLiveChatView()` and `LiveChat.getInstance().getLiveChatView()`.\n\n# Unread message counter\n\nTo get notified about new messages in the chat, use [`com.livechatinc.chatsdk.src.domain.listeners.NewMessageListener`](https://github.com/livechat/chat-window-android/blob/master/chat-sdk/src/main/java/com/livechatinc/chatsdk/src/domain/interfaces/NewMessageListener.kt).\n\nSet it wherever you want to react to a new message, for example, to increase the badge count.\n\n```kotlin\nLiveChat.getInstance().newMessageListener =\n   NewMessageListener { message, isChatShown -\u003e\n      // Handle new message\n   }\n```\n\n# UI customization\n\nWhile the chat appearance and language are managed through the application settings, you can customize the error view when chat cannot be loaded.\n\n## Error view\n\nYou can localize and change the text displayed in the error view by overriding string resources in your app's `strings.xml`. All strings can be found in the [GitHub repository](https://github.com/livechat/chat-window-android/blob/master/chat-sdk/src/main/res/values/strings.xml).\n\nYou can also entirely override the default error view by including `live_chat_error_layout.xml` in your app's layout resources.\n\n\u003e **Note:** Your custom error view must contain a `View` with `live_chat_error_button` id when using `LiveChat.getInstance().show()`.\n\n## Activity\n\nBy default, activity will follow your activity's theme. To change this configuration, you can override the activity declaration in your app's `AndroidManifest.xml` file.\n\n# Clearing chat session\n\nThe chat window uses WebView's cookies to store the session. To clear the chat session, call:\n\n```kotlin\nLiveChat.getInstance().signOutCustomer()\n```\n\n# Link handling\n\nBy default, links in the chat are opened in the customer's default browser. If you want to intercept the link and handle it in your app, provide your `UrlHandler`.\n\n```kotlin\nLiveChat.getInstance().urlHandler = \n   UrlHandler { url -\u003e\n       // Handle the URL in your app and return true if handled \n       return@UrlHandler false\n   }\n```\n\n# Troubleshooting\n\n## Error handling\n\nYou can set an error listener to monitor and handle issues related to loading the chat view. This allows you to capture and respond to errors in a centralized way. Common use cases include reporting errors to analytics platforms or implementing custom error-handling logic.\n\n```kotlin\nLiveChat.getInstance().errorListener = ErrorListener { error -\u003e\n   // Handle the error\n}\n```\n\n## Logger\n\nYou can configure the logging level to help with debugging and troubleshooting. Set the desired level before initializing LiveChat:\n\n```kotlin\nLogger.setLogLevel(Logger.LogLevel.VERBOSE);\n```\n\nRefer to the [Logger](https://github.com/livechat/chat-window-android/blob/master/chat-sdk/src/main/java/com/livechatinc/chatsdk/src/utils/Logger.kt) for all available log levels.\n\n\u003e **Note**: Network calls require at least the `INFO` level. `DEBUG` and `VERBOSE` levels are more detailed.\n\n## Missing file picker activity\n\nIf you want to react or track instances where the activity for file picking on the user device is not found, you can set a listener for this event:\n\n```kotlin\nLiveChat.getInstance().filePickerNotFoundListener = FilePickerActivityNotFoundListener {\n   // Handle the case when file picker activity is not found\n}\n```\n\n# Advanced usage\n\nThe following features give you more control over the SDK integration. Note that they require additional implementation steps. If you decide to use any of these, please let us know about your use case — we would love to hear about it!\n\n## LiveChatView lifecycle scope\n\nBy default, after the `LiveChat.getInstance().show()` view is initialized, it's kept in the application memory. This allows you to react to new messages, for example, display a [counter for unread messages](#unread-message-counter). To automatically free up memory when the chat is no longer visible, you can use `LiveChatViewLifecycleScope` to control its lifecycle.\n\nYou should specify the scope when initializing the SDK:\n\n```kotlin\nLiveChat.initialize(\"\u003cLICENSE\u003e\", this, lifecycleScope = LiveChatViewLifecycleScope.ACTIVITY)\n```\n\n\u003e **Note:** With the `ACTIVITY` scope, the `NewMessageListener` only works while the chat is visible.\n\n## Embed LiveChatView in your layout\n\nYou can embed the `LiveChatView` directly in your layout for more control over the chat window and its placement, instead of using `LiveChat.getInstance().show()`. For full implementation details, refer to the [LiveChatActivity](https://github.com/livechat/chat-window-android/blob/master/chat-sdk/src/main/java/com/livechatinc/chatsdk/src/presentation/LiveChatActivity.kt).\n\nHere is a short overview of the steps to embed the `LiveChatView` in your layout:\n\n### 1. Add LiveChatView to your layout\n\nBegin with adding `\u003ccom.livechatinc.chatsdk.src.presentation.LiveChatView /\u003e` to your layout XML file.\n\n### 2. Provide activity or fragment context\n\nDuring `onCreate` of your `Activity` or `Fragment`, call:\n\n```kotlin\nliveChatView.attachTo(this)\n```\n\nThis is required to properly handle the view's lifecycle, support file sharing, and launch links in the default external browser.\n\n### 3. React to visibility events\n\nProvide `LiveChatView.InitListener` when initializing the view:\n\n```kotlin\nliveChatView.init(initCallbackListener)\n```\n\n# Migrating from v2.5.0 to 3.0.0\n\n## Key Changes\n* The SDK is now Kotlin-based.\n* The API is now streamlined and uses the `LiveChat` singleton.\n* The package changed to `com.livechatinc.chatsdk`.\n* Updated API for initializing and configuring the chat\n* Edge-to-edge display support\n* Enhanced error handling\n\n## Steps\n\n### Update your dependency\n\n```kotlin\ndependencies {\n    implementation 'com.github.livechat:chat-window-android:3.0.0'\n}\n```\n\n\u003e Note: With version 3 we no longer use \"v\" prefix\n\n### Update configuration \nThe new API uses LiveChat singleton instead of ChatWindowConfiguration and it's split into two parts: [initialization](#initialization) and [customer information setup](#customer-information).\n\nUpdate [activity declaration](#activity) if needed\n\n### Update event listeners\n\nThe old `ChatWindowEventsListener` has removed. Some of the callbacks are no longer needed, the rest has been split into individual callbacks\n* `onWindowInitialized()` -\u003e removed for [recommended integration](#display-the-chat-window). If you're embedding the view directly see [Embed LiveChatView in your layout](#embed-livechatview-in-your-layout) for details\n* `onChatWindowVisibilityChanged` -\u003e removed [recommended integration](#display-the-chat-window). If you're embedding the view directly see [Embed LiveChatView in your layout](#embed-livechatview-in-your-layout) for details\n* `onNewMessage` -\u003e replaced with [NewMessageListener](#unread-message-counter)\n* `onRequestAudioPermissions` -\u003e removed\n* `onError` -\u003e replaced with [ErrorListener](#error-handling)\n* `handleUri` -\u003e replaced with [UriHandler](#link-handling)\n* `onFilePickerActivityNotFound` -\u003e [FileChooserActivityNotFoundListener](#missing-file-picker-activity)\n\nFor a complete example of implementation, please refer to the example app included in the repository.\n\n### v2.x.x\n\nv2 of the library is still available on JitPack. You can find documentation by selecting v2.x.x tag in the repository\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flivechat%2Fchat-window-android","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flivechat%2Fchat-window-android","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flivechat%2Fchat-window-android/lists"}