kaushiknsanji / firebase-friendly-chat-android

Android App done as part of Google Codelab "Firebase Android - Build Friendly Chat"

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Firebase Android - Build Friendly Chat

Friendly Chat app built by following the instructions detailed in the Google Codelab "Firebase Android Codelab - Build Friendly Chat". Original code by Google for this codelab can be referred here.

What one will learn

  • Allow users to sign in and authenticate with Google Sign-In Provider.
  • Synchronize messages (reading and sending) using Firebase Realtime Database and FirebaseUI Database.
  • Download images from Firebase Cloud Storage, for messages containing images.
  • Store binary files of images in Firebase Cloud Storage, for messages sent with an image.

Getting Started

  • Android Studio 4.0 or higher with updated SDK and Gradle.
  • Android device or emulator with Android 4.4+.

Branches in this Repository

  • build-starter
    • This is the Starter code for the codelab.
    • In comparison to the original build-starter repository, this repository contains some modifications and corrections-
      • Moved all dependency versions to project gradle for centralized management and updated the same to their latest versions.
      • Applied Lint corrections in layouts related to chosen sdk versions, and for some invalid attributes used.
      • Used Android ViewBinding.
      • Refactored certain code parts to utility methods and classes.
      • Rewritten Main and Message Item layouts to use tools namespace in order to show list items.
      • Rewritten Message Item layout to remove a redundant root LinearLayout, and to show the Messenger's name at the top rather than below the text/image message.
      • Configured Glide to be used via AppGlideModule.
      • Placed TODO statements appropriately.
  • master
    • This contains the Solution for the codelab.
    • In comparison to the original solution repository, this repository contains additional modifications and corrections-
      • Uses Glide through AppGlideModule.
      • Changes to MessageViewHolder-
        • Takes care of setting the Messenger's Name and Profile picture as well.
        • Supports Text messages along with an Image.
      • Adds List Item Spacing through RecyclerView ItemDecoration.
      • Monitors changes in the Query referenced, by passing LifecycleOwner instance to FirebaseRecyclerOptions instead of registering it manually in appropriate lifecycle callbacks.
      • While sending an Image message, any Text message entered by the user prior to launching the Gallery Intent, is also included so that a Message with Text and Image is sent together.
      • The Upload Task for uploading an Image is combined with a Continuation Task for retrieving the downloadable URI to the uploaded image, instead of nesting this task on Success of Upload Task.
      • Uses FirebaseUI-Storage for downloading an Image directly from a StorageReference via Glide, by configuring GlideModule to register FirebaseImageLoader as a component to handle StorageReference.

About

Android App done as part of Google Codelab "Firebase Android - Build Friendly Chat"

License:Apache License 2.0


Languages

Language:Java 100.0%