implementation "io.getstream:stream-chat-android-compose:6.4.4"
Overview
The Stream Chat Android SDK enables you to easily build any type of chat or messaging experience for Android, either in Kotlin or Java.
The fastest way to get started with the SDK is by trying the Android Views In-App Messaging Tutorial. If you’re using Jetpack Compose, see the Compose In-App Messaging Tutorial instead.
Architecture
The SDK consists of five major components:
- Views/XML UI components. Provides a set of reusable and customizable UI components based on Android Views.
- Compose UI components. Provides a set of reusable and customizable Jetpack Compose UI components.
- Low-level client. Provides the main chat functionality. You can use it directly if you intend to build your own UI layer for the chat.
- State. Plugin that gives you the possibility to observe data via
StateFlows
. It exposesStateFlow
objects containing the loading state, channel and message lists, channel members, users that are typing and more. - Offline Support. Plugin that enables offline data and actions, like cached channels, messages, sending messages and reactions. Good for improving UX when the network connection is poor.
We recommend using either the Views/XML UI Components or the Compose UI Components to most of our customers. If your UI doesn’t significantly differ from the industry standard, you should be able to customize the built-in components to match your requirements.
For more information about including each component in your project, see the Installation page.
UI SDKs
Built on top of the Stream Chat low-level client, the Stream Chat Android UI components enable you to easily build any type of chat or messaging experience for Android.
We have UI component libraries available for both Android Views and Jetpack Compose. Each of these libraries provides an extensive collection of efficient and customizable UI components which enable you to quickly get started with little to no setup required. The libraries support:
- Rich-media messages
- Channel and message lists
- Message Reactions
- Message threads and quoted replies
- Text input commands (ex: Giphy and @mentions)
- Image and file uploads
- Video playback
- Indicators for read state and typing
- Push notifications
- Offline storage
- Voice messages (only in the Android Views library for now)
- and more.
If needed, you can create your own UI components by listening to the state we expose and using our components as building blocks. You can learn more about how state is exposed here and in the low-level client docs.
Choosing the Right UI SDK
Views UI Components
The UI Components library includes pre-built Android Views to easily load and display data from the Stream Chat API. These include a Channel List and a Message List, a Message Composer View, and more. See the Getting Started page for more details.
This library is built on top of the state library, and offers the quickest integration of Stream Chat into an Android application. It also offers a variety of theming options to make it fit your app’s needs.
You can see the UI Components in action by checking out the UI Components Sample App, available in the GitHub repository.
Compose UI Components
The Compose UI Components library is a chat UI implementation built from scratch with Jetpack Compose. It contains modular Composable functions for building channel lists, messaging screens, and more. See the Getting Started page for more details.
This is also built on top of the state library, and offers easy integration of Stream Chat into a Compose-based Android application. It’s also highly modular and customizable.
Check out the Compose implementation in action by trying the open-source Compose UI Components Sample App.
Using our Compose SDK in an Android Views based app is fully supported. It could provide you an amazing opportunity to explore and adopt Compose.
The Right SDK for You
If your use case requires a very high level of customization, runtime theming changes, replacing whole parts of the default UI or stateless components that don’t rely on our ViewModels, the Compose SDK is the way to go. It offers deep customization through several layers - the theme, modifiers for components, bound and stateless component overloads, smaller reusable components and slot APIs.
If, instead, you’re looking for a simpler, less customizable SDK which currently offers slightly better performance in some scenarios or your project is limited by technology, then the UI Components SDK is a great option. It still offers a fair amount of customization through the theme and its attributes and some programmatic ways to customize the UI.
Whichever SDK you choose, we guarantee you’ll be happy and we’ll provide amazing support with your integration, through detailed documentation, guides and direct support.
Upgrade and Versioning Strategy
Our Android libraries do not follow semantic versioning.
We increase the minor version whenever breaking changes are introduced. Patch releases only contain smaller fixes and improvements.
You can see all the SDK changes in the releases page, and you can also find the release notes of all past releases in our CHANGELOG file. These will always highlight breaking changes.
We also maintain a separate document, DEPRECATIONS, which lists deprecated constructs in the SDK, with their expected time of further deprecations and eventual removal.
You can get notified of new releases by using the Watch button in the getstream/stream-chat-android repository. You can tweak your watch preferences to subscribe only to release events.
How Should I Specify My Dependency Version?
You should use a fixed version in order to avoid any conflicts or unpredicted behaviour.
For example: