A sample Android app that demonstrates how to use Firebase Authentication, Crashlytics, Cloud Firestore and Hilt with Jetpack Compose UI

Overview
showcase.mp4

Make it So

This is a sample Android app that demonstrates how to use Firebase Authentication, Crashlytics, Cloud Firestore and Hilt with Jetpack Compose UI. Make it So is a simple to-do list application that allows the user to add and edit to-do items, add flags, priorities, due dates, and mark the tasks as completed.

To explain how each product above was used in the code, we've written a series of articles that delve into creating this app from scratch. Part 1 explains what you can do with this app, the motivation to choose each of the tools and an overview of the architecure.

Contact

Twitter: @coelho_dev

Comments
  • Clear tasks when removing listener storage listener

    Clear tasks when removing listener storage listener

    There is a subtle bug making tasks map store inconsistent data

    Reproduce

    • Make sure you are not logged in
    • Create a task
    • Login to an existing account
    • Going back to the tasks page, the task created on step two will be there (ViewModel was persisted). Now you won't be to edit it because it is no longer linked to your account.

    Why: Logic to update userId during the login process was removed #18

    Fix: Clear tasks when removing the storage listener on the tasks ViewModel

    opened by mtali 2
  • Adding state hoisting in order to have the compose preview available.

    Adding state hoisting in order to have the compose preview available.

    Hi there, thanks for creating the project to nudge the community towards the recommended way to work with Firebase.

    I just have one suggestion for now which is to do a state hoisting on the screen β€” I've submitted one example and can do the same for the other ones if you guys are happy with it β€”.

    After doing the state hoisting we can add the preview tag to the screen and enable live edits β€” when using Android Studio Electric Eel β€” to have fast feedback on UI changes.

    Please feel free to discard the PR if you feel it is not useful.

    opened by jgavazzisp 2
  • fix(auth): add proper use of link account method

    fix(auth): add proper use of link account method

    Hey @marinacoelho!

    First, thanks for putting together your series of articles about getting started with Firebase and Compose. It was the perfect series I found to get started on a side project I'm working on.

    I found a potential bug when implementing the firebase authentication. When creating an account I was getting an error stating the account was already linked to the given provider. This was happening because we were creating the account and then trying to link it to an existing (anonymous) account. But after creating the account we lost the anonymous account credentials and Firebase.auth.currentUser was pointing to the new authentication provider (email in this case).

    The fix was to not create the account and instead "promote" it to the email provider account.

    Something similar happens when the user signs in. Since the account is already created, Firebase cannot link an anonymous account with an existing one, and you cannot "promote" an already promoted account. The best we can do is to copy the data the anonymous account had, over to the logged-in account. I removed the linkWithEmail step because it will fail. Another thing that we can add to it is to delete the anonymous account after signing in to avoid cluttering the user database with anonymous accounts (altho we can activate the auto-cleanup to remove the anonymous account 30-days old.

    If you think this is correct, it'll be great if the piece of Part 2 of your series clarifies this.

    Upon returning from a successful login or account creation, we proceed to the next step, which is to get the credentials the user used to sign in to the second authentication provider, and link them to the anonymous account

    I hope this helps and makes sense.

    Thank you again πŸ™

    opened by JuanAlejandro 1
  • Use Firestore's auto-generated id instead of a random UUID

    Use Firestore's auto-generated id instead of a random UUID

    I've noticed how this app is using UUID.randomUUID().toString() to generate a document ID and save it on Firestore: https://github.com/FirebaseExtended/make-it-so-android/blob/40e46da8b587f0466e08a051a41d67c7088083f2/app/src/main/java/com/example/makeitso/model/service/impl/StorageServiceImpl.kt#L69-L73

    It would be nice to demonstrate Firestore's auto-generated ids instead:

     Firebase.firestore 
         .collection(TASK_COLLECTION) 
         .add(task) 
         .addOnCompleteListener { onResult(it.exception) } 
    

    And when reading the tasks, we'd manually set the id:

    value?.documentChanges?.forEach {
        val wasDocumentDeleted = it.type == REMOVED
        val task = it.document.toObject<Task>().apply { task.id = it.document.id  }
        onDocumentEvent(wasDocumentDeleted, task)
    }
    
    opened by thatfiredev 1
  • Adding state hoisting in order to have the compose preview available.

    Adding state hoisting in order to have the compose preview available.

    Hi there, thanks for creating the project to nudge the community towards the recommended way to work with Firebase. I just had one suggestion for now which is to do a state hoisting on the screen β€” I've submitted one example and can do the same for the other ones if you guys are happy with it β€”.

    After doing the state hoisting we can add the preview tag to the screen and enable live edits β€” when using Android Studio Electric Eel β€” to have fast feedback on UI changes.

    Please feel free to discard the PR if you feel it is not useful.

    opened by jgavazzisp 1
  • Adding state hoisting in order to have the compose preview available.

    Adding state hoisting in order to have the compose preview available.

    Hi there, thanks for creating the project to nudge the community towards the recommended way to work with Firebase.

    I just had one suggestion for now which is to do a state hoisting on the screen β€” I've submitted one example and can do the same for the other ones if you guys are happy with it β€”.

    After doing the state hoisting we can add the preview tag to the screen and enable live edits β€” when using Android Studio Electric Eel β€” to have fast feedback on UI changes.

    Please feel free to discard the PR if you feel it is not useful.

    opened by jgavazzisp 1
  • viewModelScope.launch(showErrorExceptionHandler) what is this?

    viewModelScope.launch(showErrorExceptionHandler) what is this?

    Could you tell me, please, in simple words, what does the line mean? viewModelScope.launch(showErrorExceptionHandler)

    1. In which Dispatcher does the coroutine run?
    2. How to run in Dispatchers.IO or do I need to add withContext(Dispatchers.IO) later?
    opened by BobbeYo1983 0
  • Update project, Add Remote Config and Performance Monitoring

    Update project, Add Remote Config and Performance Monitoring

    This pull request updates the project to use the most recent versions of all libraries, sdks and Gradle. From now on, this project can only be opened using Android Studio Chipmunk+. This pull request also adds Remote Config, used to show/hide the edit option for each task item, and Performance Monitoring, used to add custom traces and measure some service methods.

    opened by marinacoelho 0
  • Updated composable functions and gitignore

    Updated composable functions and gitignore

    Updated composable functions parameters to match the most recent recommendations by the Compose team. Algo updated .gitignore to ignore google-services json file.

    opened by marinacoelho 0
  • Multiple snackbar messages shown

    Multiple snackbar messages shown

    An old Snackbar message gets displayed when launching the app from the recent list

    Steps to reproduce

    • Open the app, and do anything to trigger Snackbar message i.e. invalid login
    • Close the app by clicking the back button
    • Reopen the app from the recent app list
    • Snackbar message will be displayed
    opened by mtali 2
Releases(v2.0.0)
Owner
Projects that are not officially staffed by Googlers but may be of use to Firebase developers. Volunteers are welcome to contribute and maintain.
null
A simple app demonstrates using Jetpack compose with other Jetpack libraries.

Android Pokemon Compose This repository is a simple app that make request to https://pokeapi.co and display them in the paginated lists. It demonstrat

BenBoonya 56 May 21, 2022
Android sample app following best practices: Kotlin, Compose, Coroutines and Flow, Hilt, JetPack Navigation, ViewModel, MVVM and MVI, Retrofit, Coil

Foodies - Modern Android Architecture Foodies is a sample project that presents a modern 2021 approach to Android app development. The project tries t

null 362 Jan 2, 2023
An example that demonstrates how to integrate a learning app with the EIDU platform

EIDU Sample Learning App This app is an example of how to create a learning app that integrates with the EIDU platform. Please consult dev.eidu.com fo

null 0 Dec 17, 2021
🧸 A demo Disney app using Jetpack Compose and Hilt based on modern Android tech stacks and MVVM architecture.

DisneyCompose A demo Disney app using compose and Hilt based on modern Android tech-stacks and MVVM architecture. Fetching data from the network and i

Jaewoong Eum 791 Dec 30, 2022
This repository demonstrates handling unauthorized tokens.

Android - sample handling unauthorized tokens This repository demonstrates handling unauthorized tokens. Refresh the access token using the refresh to

Kenji Abe 7 Jul 10, 2021
πŸ‘¨β€πŸ’» A demonstration modern Android development project with Jetpack(Compose, Room, ViewModel, Navigation), Hilt and based on MVVM by using Open Sky API. ✈️ 🌍

A demonstration modern Android development project with Jetpack(Compose, Room, ViewModel, Navigation), Hilt and based on MVVM by using Open Sky API.

Ismail Oguzhan Ay 13 Dec 4, 2022
A demonstration modern Android development project with Jetpack(Compose, Room, Flow, ViewModel, Navigation), Hilt and based on MVVM by using Github API.

A demonstration modern Android development project with Jetpack(Compose, Room, ViewModel, Navigation), Hilt and based on MVVM by using Github API.

Murat 2 Apr 11, 2022
[] Port of Jake Wharton's U2020 sample app with use of MVP and Dagger 2

U+2020-mvp [DEPRECATED] We recomend to try Moxy framework instead of our solution. Port of Jake Wharton's U2020 sample app with use of MVP pattern and

Live Typing 315 Nov 14, 2022
This project is focused on the sample using the API's new preview version of Android-L, use of transitions, shadows etc...

Android L preview example Description This project is focused on the sample using the API's new preview version of Android-L, use of transitions, shad

Saul Molinero 165 Nov 10, 2022
This project is focused on the sample using the API's new preview version of Android-L, use of transitions, shadows etc...

Android L preview example Description This project is focused on the sample using the API's new preview version of Android-L, use of transitions, shad

Saul Molinero 165 Nov 10, 2022
πŸ“š Sample Android Components Architecture on a modular word focused on the scalability, testability and maintainability written in Kotlin, following best practices using Jetpack.

Android Components Architecture in a Modular Word Android Components Architecture in a Modular Word is a sample project that presents modern, 2020 app

Madalin Valceleanu 2.3k Dec 30, 2022
A sample app showing how to build an app using the MVI architecture pattern.

MVI Example This application was streamed live on Twitch to demonstrate how to build an application using MVI. You can find the VOD here for now: http

Adam McNeilly 46 Jan 2, 2023
How to apply meaningful and delightful motion in a sample Android app

Applying meaningful motion on Android How to apply meaningful and delightful motion in a sample Android app Read the complete post at https://medium.c

AndrΓ© Mion 167 Dec 19, 2022
A sample Grocery Store app built using the Room, MVVM, Live Data, Rx Java, Dependency Injection (Kotlin Injection) and support Dark Mode

Apps Intro A sample Grocery Store app built using the Room, MVVM, Live Data, Rx Java, Dependency Injection (Kotlin Injection) and support Dark Mode In

Irsyad Abdillah 25 Dec 9, 2022
Quality-Tools-for-Android 7.5 0.0 L5 Java This is an Android sample app + tests that will be used to work on various project to increase the quality of the Android platform.

Quality Tools for Android This is an Android sample app + tests that will be used to work on various project to increase the quality of the Android pl

StΓ©phane Nicolas 1.3k Dec 27, 2022
A sample Android application with a strong focus on a clean architecture, automated unit and UI testing and continuous integration.

Android playground This is a sample Android application with a strong focus on a clean architecture, automated unit and UI testing and continuous inte

null 6 Jun 4, 2022
A sample Android app which showcases advanced usage of Dagger among other open source libraries.

U+2020 A sample Android app which showcases advanced usage of Dagger among other open source libraries. Watch the corresponding talk or view the slide

Jake Wharton 5.7k Dec 22, 2022
Sample application demonstrating Android design and animation

android-movies-demo This is a sample application showing off some interesting design/development interactions for a talk given at Droidcon 2013. As it

Daniel Lew 359 Jan 1, 2023
PokeCard Compose is a demo app 100% write in Compose, Flow and Koin based on MVI Clean Architecture 🐱⚑️

A Pokemon Card demo app using Jetpack Compose and Koin based on MVI architecture. Fetching data from the network with Ktor and integrating persisted data in Room database with usecase/repository pattern.

Lopez Mikhael 104 Nov 27, 2022