Home / Companies / Firebase / Blog / Post Details
Content Deep Dive

Adding Cloud Firestore to a Jetpack Compose app

Blog post from Firebase

Post Details
Company
Date Published
Author
Marina Coelho
Word Count
3,163
Company Posts That Month
8
Language
English
Hacker News Points
-
Post removed?
No
Summary

Part four of the Make it So Android app series explains how to use Cloud Firestore with Jetpack Compose to store and synchronize users’ to-do tasks in real time. It describes Firestore’s NoSQL collection-and-document model, Firebase setup requirements, and a StorageService abstraction that supports creating, retrieving, updating, deleting, and observing Task documents associated with a user ID. The tasks screen uses Firestore snapshot listeners registered through Compose’s DisposableEffect so changes made on other devices automatically update a state-backed task list, while the editing screen handles new and existing tasks based on whether an item has an ID. Firestore maps Kotlin Task data classes to documents and back with minimal serialization code, and ViewModels coordinate service calls, UI updates, and error logging through Crashlytics. The article also cautions against deleting a user’s records individually from the client because interruptions can leave data behind, recommending a backend Cloud Function or Firebase’s Delete User Data Extension instead, and notes that the demonstrated callback-based implementation is available in the project’s v1.0.0 source, while newer versions use Kotlin Coroutines and Flow.

Trends Found in this Post
Trend Post Mentions Total Month Mentions Posts Companies MoM
Real-time 2 1,339 356 133 -5%
Use This Data

Use this post, company, and trend context to find content marketing opportunities, perform competitive analysis, or address product feature gaps via the Plushcap MCP server or the Plushcap API.