Building Simplest Chat App using FireStore (50 lines of code)

FireStore is one of the latest addition to Firebase feature as a No-SQL DB backend support, and potentially replace Realtime Database. It is still Beta as of today.

I check it out, and love the capability the app get instant update on the DB change on the fly. So decided to make something simple yet useful, a chat app. (the simplest version I have ever seen).

The Chat App Demo

Below the GIF of the app created. Basically showing one app message sent to the other one, as well as a returned message.

Create the App

Create your app project in Firebase

Create your project entry in Firebase as per the instruction given in https://firebase.google.com/docs/android/setup

Then add the following dependency to your app build.gradle.

implementation 'com.google.firebase:firebase-firestore:11.8.0'

Setup firestore

In your Firebase console, go to Database, and create a Cloud FireStore (Beta for now).

--

--