Android Chat Bubbles: Building iOS Style Chat in Android

Nick Parsons
The Startup
Published in
8 min readMar 11, 2020

--

In this post, we’ll explore how to do two things: 1) create live chat message bubbles in Android that are similar to WhatsApp and iMessage and 2) customize Stream Chat’s UI Components.

We’ll customize Stream Chat Android’s built-in UI components by plugging in a custom message view. This allows us to focus on the text rendering, while Stream does everything else.

The source code is available here. Once we’re finished, we’ll have a chat experience that looks like this:

Prerequisites

This post assumes a working knowledge of Android and Kotlin. If you’re unfamiliar with either or both, it may be useful to check out a getting started guide. If you’d like to run the code, you’ll also need a Stream account. Please register here. Once you’re registered, you’ll see a Stream app with an App ID, API Key, and API Secret:

We won’t be going through how to create the backend to receive our tokens in this tutorial; please refer to this repo for token generation. You can also use Stream’s CLI; if you look in MainActivity.kt, you'll see placeholders to fill in run the application.

--

--