SkillAgentSearch skills...

AvengersChat

💙 Android sample Avengers chat application using Stream Chat SDK based on MVVM (ViewModel, Coroutines, Room, Hilt, Repository) architecture.

Install / Use

/learn @GetStream/AvengersChat

README

<p align="center"> <img src="/previews/screenshot.jpg" /> </p> <p align="center"> <a href="https://opensource.org/licenses/Apache-2.0"><img alt="License" src="https://img.shields.io/badge/License-Apache%202.0-blue.svg"/></a> <a href="https://android-arsenal.com/api?level=21"><img alt="API" src="https://img.shields.io/badge/API-21%2B-brightgreen.svg?style=flat"/></a> <a href="https://mailchi.mp/kotlinweekly/kotlin-weekly-274"><img alt="KotlinWeekly" src="https://skydoves.github.io/badges/kotlin-weekly.svg"/></a> <a href="https://github.com/skydoves/AvengersChat/actions/workflows/android.yml"><img alt="API" src="https://github.com/skydoves/AvengersChat/actions/workflows/android.yml/badge.svg"/></a> <a href="https://getstream.io/tutorials/android-chat?utm_source=Github&utm_medium=Jaewoong_OSS&utm_content=Developer&utm_campaign=Github_Sept2022_AvengersChat&utm_term=DevRelOss"><img src="https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/HayesGordon/e7f3c4587859c17f3e593fd3ff5b13f4/raw/11d9d9385c9f34374ede25f6471dc743b977a914/badge.json" alt="Stream Feeds"></a> </p>

AvengersChat demonstrates modern Android development based on MVVM architecture and Stream Chat SDK for Android.

The purpose of this repository is to demonstrate below:

  • Implementing each different feature with modularization and navigation.
  • Implementation of Android architecture components with Jetpack libraries, such as Hilt and AppStartup.
  • Performing background tasks with Kotlin Coroutines.
  • Integrating chat systems with Stream Chat SDK for Android for real-time event handling.

✍️ Tutorials

banner

You can learn more about this project from the blog posts and Youtube videos. If you're interested in the materials, check out the Tutorials Page!

:bulb: Additional Repositories

If you're interested in additional repositories that were built with Jetpack Compose and Stream SDK, check out the repositories below:

  • WhatsApp Clone Android: 📱 WhatsApp clone project demonstrates modern Android development built with Jetpack Compose and Stream Chat SDK for Compose.
  • Slack Clone Android: 📱 A chat demo app built with Jetpack Compose and Stream Chat SDK following clean architecture principles.
  • Stream Draw Android: 🛥 Stream Draw is a real-time multiplayer drawing & chat game app built entirely with Jetpack Compose.
  • Facebook Messenger Clone: Facebook Messenger clone using Stream SDK & Jetpack Compose.

📲 Download APK

Go to the Releases to download the latest APK.

<a href="https://getstream.io/tutorials/android-chat?utm_source=Github&utm_medium=Jaewoong_OSS&utm_content=Developer&utm_campaign=Github_Sept2022_AvengersChat&utm_term=DevRelOss"> <img src="https://user-images.githubusercontent.com/24237865/138428440-b92e5fb7-89f8-41aa-96b1-71a5486c5849.png" align="right" width="12%"/> </a>

⛴ Stream Chat SDK for Android

AvengersChat was built with Stream Chat SDK for Android for implementing messaging systems. You can learn more about the SDK with the materials below:

📷 Previews

If you find funny moments on this demo application, feel free to join and share the moment in this thread!

<p align="center"> <img src="/previews/preview0.gif" width="32%"/> <img src="/previews/preview1.gif" width="32%"/> <img src="/previews/preview2.gif" width="32%"/> </p> <p align="center"> <img src="https://user-images.githubusercontent.com/24237865/139976413-675a3b32-1edf-4bfc-b600-a8ffb734f1ec.jpeg" width="32%"/> <img src="https://user-images.githubusercontent.com/24237865/139976435-5da608b9-e453-47c0-be78-73f0039b4ab1.jpeg" width="32%"/> <img src="https://user-images.githubusercontent.com/24237865/139976345-dedc9c4c-2140-4fbc-9d02-7d815380d900.jpeg" width="32%"/> </p> <img src="/previews/preview0.gif" align="right" width="32%"/>

🛠 Tech stack & Open source libraries

  • Minimum SDK level 21.
  • 100% Kotlin based + Coroutines + Flow for asynchronous.
  • Hilt for dependency injection.
  • Jetpack
    • Lifecycle: Dispose observing data when lifecycle state changes.
    • ViewModel: UI related data holder and lifecycle aware.
    • App Startup: Provides a straightforward, performant way to initialize components at application startup.
    • Navigation: For navigating screens and provides deeplinks.
    • Room: Constructs Database by providing an abstraction layer over SQLite to allow fluent database access.
    • Hilt: Dependency Injection.
  • Architecture
    • MVVM Architecture: View - DataBinding - ViewModel - Model
    • Bindables: Android DataBinding kit for notifying data changes to UI layers.
    • Repository pattern
  • Material Design & Animations: Design system created by Google to help teams build high-quality digital experiences.
  • Retrofit2 & OkHttp3: Construct the REST APIs and paging network data.
  • Sandwich: Construct lightweight http API response and handling error responses.
  • Moshi: A modern JSON library for Kotlin and Java.
  • Coil: Image loading for Android backed by Kotlin Coroutines.
  • TransformationLayout: Implementing transformation motion animations.
  • android-youtube-player: YouTube Player library for Android and Chromecast, stable and customizable.
  • DiscreteScrollView: Implementing a scrollable list of items.
  • Timber: A logger with a small, extensible API which provides utility.
<img src="/previews/preview3.gif" align="right" width="32%"/>

✅ Supported features

  • Light and Dark themes.
  • Different color themes by a chosen character.
  • 100% offline mode supports.
  • Live stream chat example.
  • Channel and message lists.
  • Direct message and group messages.
  • Mentioned message list.
  • Custom emoji reactions.
  • Guest mode.
  • User online/offline status.
  • User last active date.
  • User info & direct message dialogs.
  • Visual animations like transition.
  • And a lot of features by Stream Android SDK!

☑️ TODO

Anyone can contribute to our open source project! Please kindly read this Contributing Guideline before contributing to our project. 😎

  • [x] Modify a user profile image.
  • [x] Login with a new guest user.
  • [x] Push notifications for new messages.
  • [ ] Create group chats by selecting users.
  • [ ] Access user info dialog everywhere.
  • [ ] Add unit test cases for all business logic.

🏛 Architecture

AvengersChat is based on the MVVM architecture and the Repository pattern, which follows the Google's official architecture guidance.

architecture

The overall architecture of AvengersChat is composed of two layers; the UI layer and the data layer. Each layer has dedicated components and they have each different responsibilities, as defined below:

AvengersChat was built with Guide to app architecture, so it would be a great sample to show how the architecture works in real-world projects.

Architecture Overview

architecture

  • Each layer follows unidirectional event/data flow; the UI layer emits user events to the data layer, and the data layer exposes data as a stream to other layers.
  • The data layer is designed to work independently from other layers and must be pure, which means it doesn't have any dependencies on the other layers.

With this loosely coupled architecture, you can increase the reusability of components and scalability of your app.

UI Layer

architecture

The UI layer consists of UI elements to configure screens that could interact with users and ViewModel that holds app states and restores data when configura

Related Skills

View on GitHub
GitHub Stars363
CategoryDevelopment
Updated10d ago
Forks38

Languages

Kotlin

Security Score

100/100

Audited on Mar 18, 2026

No findings