Firebase Firestore Chat App: User Profile (Ep 2) – Kotlin Android Tutorial

Firebase provides a bunch of awesome services such as Firestore, Auth, Cloud Storage, Cloud Functions and Cloud Messaging. Learn how to use them in this tutorial course in which we’re making a fully fledged real-time chat app with everything you’d expect like sending images and getting notifications when we receive a new message.

In this part you will learn how to set up the accounts of your users. We will create a User class and save it to Firestore database. We will also use Firebase Cloud Storage to save the profile picture.

This post contains all the code that’s been written in this YouTube video.


To get the code check out this GitHub repository: https://github.com/ResoCoder/firebase-firestore-chat-app

Matt Rešetár

Matt is an app developer with a knack for teaching others. Working as a senior software developer at HandCash, freelancer and most importantly developer educator, he doesn't have a lot of free time 😅 Yet he still manages to squeeze in tough workouts 💪 and guitar 🎸

  • Ahmad Fawzi says:

    I’ve posted a problem on youtube comments

    thank u for this series on kotlin and for your way in teaching …
    Thanks alot

  • nigel says:

    doest work at all
    fun initCurrentUserIfFirstTime(onComplete: () -> Unit) {
    currentUserDocRef.get().addOnSuccessListener { documentSnapshot ->
    if (!documentSnapshot.exists()) {
    val newUser = User(FirebaseAuth.getInstance().currentUser?.displayName ?: “”,
    “”, null, mutableListOf())
    currentUserDocRef.set(newUser).addOnSuccessListener {

    type inference failed mutablelistOf
    none of the following fuctions can be called with the arguments supplied

  • >