This repository allows you to check the result after completing each step described in the Android Chat Tutorial. It contains samples written in both Kotlin (samplekotlin module) and Java (samplejava module). For more Android Chat examples, see the Github repo for the SDK and the UI Components sample app in it.
Already all-in on Jetpack Compose? Check out the tutorial repo of our Compose UI Components instead.
The project is pre-configured with a shared Stream account for testing purposes. You can learn more about Stream Chat here, and then sign up for an account and obtain your own keys here.
- Clone the repository
- Open the project in Android Studio
- Run the samplekotlin or samplejava configuration
- Make sure to check the Details section below for customizations
The sample apps consist of two screens:
MainActivity
: Shows the list of available channels.ChannelActivity
: Shows the selected channel view, which includes the header, message list, and message input view.
Each module contains multiple ChannelActivity
implementations, which correspond to the steps of the tutorial. You can easily swap them by changing the setOnChannelClickListener
located in MainActivity
:
channelListView.setOnChannelClickListener { channel ->
// open the channel activity
startActivity(ChannelActivity.newIntent(this, channel))
}
Currently, you can choose from four different ChannelActivity
implementations:
ChannelActivity
- a basic Message List implementationChannelActivity2
- includes a new MessageListView style and custom attachment typeChannelActivity4
- includes a custom Typing Header component created with the Low-Level Client library