Reputation: 21733
We are considering migrating our Android data to Firestore. We have a mostly read-only database (Users will only ever read, but staff will push updates a couple of times daily). For now we are not considering Firebase Storage.
The biggest issue for us is that with the database being fairly large and us targeting markets with poor data contracts - we don't wan't everybody to fetch the full database on first launch (I'm aware you can do partial requests, but the full data would be required)
We wanted to solve this by bundling a default database with each release (we currently do this), the device would then sync with Firestore and download the newer mutations.
Is this possible at all? We are hoping to connect the Firestore objects with either bundled copies of the documents or with a serialized snapshot?
The aim here is that the snapshot would be seen by the Firestore SDK as the full set of documents - Exactly as if you had ran the query on the device a couple of hours earlier and kept the listener. So the listener would be receiving the delta.
Upvotes: 0
Views: 221
Reputation: 317372
Firestore doesn't provide a way to bundle into your app some default data that can be queried with the SDK. Firebase is a cloud-hosted database, which means that all data must live "in the cloud" in order to be queried (or must have been previously queried and cached locally, which can be read while offline).
You are always free to file a feature request, however.
Upvotes: 1