I know that Firestone will store data if the user is offline and I saw that there is a way to do this with native code, but is it possible to enable these offline capabilities in flutter itself?
Firebase firestore support full offline. I’m using it myself. So long as you’ve read the data at least once before going offline. If using firebase authentication - the custom option also works offline. Google sign-in does not.
The downside to firebases offline capabilities is that it’s only firestore (not counting the older firebase db) and not the other products like cloud storage.
So for example I’ve written an app and the document side of it is fully offline enabled however you can take photos in the app and I had the write the offline capabilities to sync this photos with firebase cloud storage myself.
(I basically just keep them in a pending folder and try to sync them when the device has connectivity.)
Related
I'm developing an app with Flutter and I need a lot of database storage to store my data (images and videos).
Currently I'm using Firebase for:
"User Authentication, Firestore Database, Dynamic Links, Storage and so on"
The pricing for the storage (GB stored) itself is ok for me but Firebase also charges for GB Transfered and Operations(uploads & downloads) which can get expensive as you can see in the snapshot below:
I am actually looking for an alternative to Firebase Storage which does not charge for Data transfer of Operations (at least sth. which is not that expensive).
Does anyone know which cloud storage I could use instead and also how to migrate in my flutter app?
I'm also open to use a own server running on a VPS but I have no clue how I would establish a connection to the own server in order to be able to up- and download media files.
Please provide a tutorial/instructions how to build your own server and connect with flutter app since I'm interested on anyway.
I would recommend using Supabase, it's a Firebase alternative and it's open source, supports Flutter/Dart and supports the storage service.
Check it from here Supabase storage
you could configure it and use it with your own hosting, and it will cost you only the price of hosting it on some cloud service, where you will store your files.
I have Taxi App, And I need add when the driver closed the app, the status of the driver changed to offline in firestore
how I can do that?
plz explain for me
Firestore has no built-in capability to write something in the database after the client has disconnected.There's a solution but that uses the Firebase Realtime Database and Cloud Functions to store presence information in Firestore too, which is documented here Build presence in Cloud Firestore.Found this blog you can also check this which might help.
Depending on the type of app you're building, you might find it useful
to detect which of your users or devices are actively online —
otherwise known as detecting "presence."
Cloud Firestore doesn't natively support presence, but you can
leverage other Firebase products to build a presence system.
You can refer this stackoverflow thread1 & thread2
I have integrated Firebase (Firestore and Storage) inside my app (it is about QRs and chat with images). I have been checking the costs of the data transmission with Firebase and I think bill could skyrocket if my app is really successful.
I have been wondering lately about the posibility of storing in user's device the information that has been already downloaded from Firebase (chat messages, images, etc). Only not downloaded data will be requested to Firebase.
My idea is having the same data structure and content in both repositories, Firebase and local. Once the info has been requested to Firebase, replicate it locally and provide local information to the app. Historic information is never modified.
Has anybody handled two data repositories? Pros, cons?
I am working with Flutter.
Thank you.
i am just looking for ideas about how to make the app work in online and offline modes(it is a todo app and it should work online and offline both)
I have a todo app that stores the data in sqflite database(locally on the phone) when the app goes online I want the data to be synced with my online database for online database i am using from mongodb. i am just looking for suggestions and also i want to ask which offline database is fine beside of mongode, Hive or sqflite.
you can use a shared_prefernce library and create a function if phone not connected to wifi return null else if connected use socket emit and clear local storage
MongoDB's Realm supports the sync feature, however this would lock your application to the MongoDB's Atlas hosted Database.
I am developing an Android and iOS app that could be used in areas that have a very poor or no data connection. It is a requirement for the app to be pre-loaded with all of the data so it will work even if the app never communicated with the server, but it also needs to be able to update and sync when a connection is made. Is it possible to manually populate the AppSync (Apollo) cache database with data on launch and query and mutate it later? The app also contains several search and filter queries. Our backend API is currently using GraphQL.
I have seen this question, Is it possible to build offline-first mobile apps using AWS AppSync?, but it is a little different that what I'm asking.
The recommendation would be to hydrate (read: pre-load with data) a local SQLite database after install. SQLite is what the 'local cache' uses to persist data on the device.
Refer to this github issue for a code example of how to do this:
https://github.com/awslabs/aws-mobile-appsync-sdk-js/issues/160