I'm trying to save data using Hive while app running it's working fine but while app in background it's not work,
Btw all the data is primitive.
I try to save them using sharedpref but also I have got the same result.so what can I do now ?
Related
so along with an exceptional app dev i have build a flashcard app that uses RTDB to store the progress of every card. i would like to transfer to firestore cloud, can anyone help me write a script for it?
There is no way to automatically convert an app that uses the Firebase Realtime Database to it using Cloud Firestore. While both are NoSQL databases, their data models are quite different - and there's no way to simply map the data or API calls from one to the other.
I have created a flutter application for smart home. I would like the user to be able to pick a time where light can be turned on. For example, user set light to be switched on at 7pm everyday through my flutter app.
Currently, I am using firebase realtime database to control light status true/false. I have researched that google cloud function can be used to schedule task(eg update light status) but the time picked is done statically by the backend.
Is there a way for the time to be set dynamically using the cloud scheduler?
I am making a new application with Flutter. Products are listed on the web with api. But I wonder,
The user opened the application and all products from json appeared in the application. Then I want him to see the same products when he closes the internet. How can I do this, what do I have to investigate?
for offline viewing:
Using sqflite for storing image and text (json)
or
Using cached_network_image for image caching & sqflite for storing text (json)
I tiring to made app that get data(Images and titles) from a web site as json api and put this data in a ListView bulider,
but I want to save the data on device first to view it when the device isn't connected to the internet and I want the data who I save it , be different order
You can use the Shared Preferences Package to store a Map
on the device.
I recommend reading Data Persistence with Flutter in the Cookbook. This will show you how to tackle this.
You could use SQFLite if you are familiar with SQL or Hive if you prefer to stick with pure dart
I'm using Firebase+Ionic(AngularFire) to create a mobile iOs/Android app, and it works great. The only problem with using Firebase is that all the content in the app is being downloaded anew every time the user starts.
In an ideal world the app would save the Firebase-content to localStorage, and the next time the user starts the app, it would load from localStorage - and then simply "update" with Firebase to fetch the latest changes.
In other words we would load data locally and "resume" our Firebase-connection. Is this possible?
Note: Although we use AngularFire, the mobile app does not write data - it only reads from the Firebase.
On Android and iOS, Firebase supports disk persistence, which allows the cache to survive app restarts. This feature is currently not available for JavaScript environments, such as Ionic.