In my app I used firestore database. Its working fine on online. But Now I want to use local storage as sqlLite. When my device is offline, data will save on sqlLite database and when the device is back to online it push the data to firestore database.
I used Flutter to develop the app. Can anyone please help me with this?
Firebase works as an offline database as well. When there is no Internet connection, all data changes are kept offline and then pushed to the cloud once it is possible.
If you insist on using a different database offline, I would recommend using Hive, since it also allows storing data in a document format.
Related
I am new to app development and I am thinking about creating an app which will store all the anime that you are currently watching or have watched in the past. The purpose of this app is to store your progress of an anime/manga so that if you forget which chapter you were on the last time you watched/read the anime or manga.
My plan is to connect this app to myanimelist website and use its feature on my app to find an anime. Then if the user adds the anime to his watch-list then it will store the important data e.g., name, description, author, Image.
I am totally new to app development and I have to create an app for the final year project. As on how to start the app or the resources required I am at loss.
The main topic of my concern is on how I should handle the use of website data or the connection to the database. Is something like using SQL queries? Which database should I use to store the data on local device?
Any help is appreciated.
Your questions
how I should handle the use of website data or the connection to the database.
if You have an API that you are using for your website, then you can use that API to fetch data in your flutter app.In case your don't have an API you have to create one for your app.
Which database should I use to store the data on the local device?
For storing data to the local device you can use sqflite package for flutter to store data. Using sqflite you can write simple SQL queries to fetch or store data in the
database.
Ask if you have any problems.
According to this answer, I want to use an offline first db inside my electron app. I nedd that the users are not able to directly modify the database, but they can only read data using the UI. The data needs to be synced with a master remote client app that will add and modify data. Can anyone suggest me a good database library to do this?I have a pusher account and an heroku one, that can be used to pass the data between the clients, but first I need a way to store them into the app
I looking for ideas how to implement a local backup of Firebase data on an users device for Cordova/PhoneGap apps.
So if an app is shut down, updated etc. the data can be booted from there.
There is one approach using local storage:
https://github.com/yeldarby/offline-firebase
However I prefer not to override Firebase code,
and to save data more persistently. Either written to a file via the Cordova file api, or via the SQLite Database plugin for Cordova/PhoneGap.
What is the best way to listen to changes on the Firebase data via AngularFire?
So I could react on it an save it along with the Firebase object keys etc.
And, Is there even a way to physically save pending local events?
Related:
Firebase offline storage with Phonegap
We have an application that we're deploying on GAE. I've been tasked with coming up with options for replicating the data that we're storing the the GAE data store to a system running in Amazon's cloud.
Ideally we could do this without having to transfer the entire data store on every sync. The replication does not need to be in anything close to real time, so something like a once or twice a day sync would work just fine.
Can anyone with some experience with GAE help me out here with what the options might be? So far I've come up with:
Use the Google provided bulkloader.py to export the data to CSV and somehow transfer the CSV to Amazon and process there
Create a Java app that runs on GAE, reads the data from the data store and sends the data to another Java app running on Amazon.
Do those options work? What would be the gotchas with those? What other options are there?
You could use a logic similar to what App Engine HRD migration or backup tool are doing:
Mark modified entities with a child entity marker
Run a MapperPipeline using App Engine mapreduce library iterating on those entity using a Datastore Input Reader
In your map function fetch the parent entity and serialize it to Google Storage using a File Output Writer and remove the marker
Ping the remote host to import those entity from the Google Storage url
As an alternative to 3 and 4, you could make multiple urlfetch(POST) to send each serialized entity to the remote host directly, but it is more fragile as an single failure could compromise the integrity of your data import.
You could look at the datastore admin source code for inspiration.
I'm currently developing an application with Appengine and GWT. I have to send a lot of data from an Android phone to the GWT client. My question is, is there a way or an API that I can store or cache this data on the local client?
The data which I'm talking about is just a lot of text from a database from Android. It would be awesome if I could store it somehow that the AppEngine server doesn't have to load the data and send it to the client every time the user connects to my application.
Use GWT's Storage API. The application will still need to go to the server if the local copy of your data is deleted or if the browser doesn't support HTML local storage.