Open shruity opened 8 years ago
Firebase Realtime Database is able to store datas in the local by firebaseDatabase.setPersistenceEnabled(true); and there is functions to handle an offline mode as well.
For example if connection is offline while you chat, Firebase Realtime Database will store datas what you chat in local till connection back to online Firebase will sync datas in local to Firebase server automatically.
For me I will store datas in SQLite or Realm if I want to use a search function like "%LIKE%" Hope my content above will help you.
I got a little bit understanding only. Basically I have a fitness app and I save the exercise time, their ratios in sqlite and show them in as a report. I want to sync my sqlite data to firebase on button click and the data to be retrieved from firebase and show in the same form as shown by sqlite. I want to use sqlite as a backend but want to provide the user an option so that he can sync the data with firebase if he wants and only when he is logged in. I am facing difficulty to understand how could it be done. I would be grateful if anyone can help me.
shruity did you fix your problem?If yes then please guide me how you did that.
You can go through the link below: https://www.androidhive.info/2016/10/android-working-with-firebase-realtime-database/
to take into account that firebase only stores 10MB offline
shruity are you using sqlite for local storage ?
yes
On Thu, Nov 9, 2017 at 1:58 PM, sasanksrivatsav notifications@github.com wrote:
shruity are you using sqlite for local storage ?
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/jirawatee/FirebaseStorage-Android/issues/1#issuecomment-343081866, or mute the thread https://github.com/notifications/unsubscribe-auth/AZMYaS6Y9kysVFEDP7I3L96VYVeUY-ttks5s0refgaJpZM4Jqpvn .
how you sync firestore data with local sqlite data, can you anyone help me
Hi, @gopib23 Firestore
database already uses SQLite
for offline support, hence using a separate SQLIte
is not only an overkill but quite unnecessary.
@RowlandOti ,Hi, can you provide a Link from where you got that information?
Which information ?
On 28-Dec-2018 9:20 pm, "mynormeza" notifications@github.com wrote:
@RowlandOti https://github.com/RowlandOti ,Hi, can you provide a Link from where you got that information?
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/jirawatee/FirebaseStorage-Android/issues/1#issuecomment-450385425, or mute the thread https://github.com/notifications/unsubscribe-auth/Aeg2g7sBJu09cZYBBTx22kh6HeXgLtiZks5u9kTGgaJpZM4Jqpvn .
Information which proves that Firestore uses SQLite for its offline support.
Hi, @gopib23
Firestore
database already usesSQLite
for offline support, hence using a separateSQLIte
is not only an overkill but quite unnecessary.
Hi, @mynormeza , you can even check the following error: - https://stackoverflow.com/questions/47746100/how-reliable-is-firestore-as-an-offline-persistence-mechanism
The only reason, I would see you having a different cache layer with your own SQLite implementation is when you want to cushion yourself against vendor lockdown. Firestore won't give you access to the local SQLite, so it is better to have one you can access.
Related Question: I'm wondering if there's a way I can use SQLite on my backend (not on phone) to do relational stuff, but have Firebase / Firestore keep each Table as a Collection? This way I can have relational SQL queries and reports in my backend, but my Android App has up-to-date access to the data as plain raw collections (tables)?
Am having the same problem.
please help me to save Realtime data in a local storage for offline support Thanks in advance ..waiting for your reply
Firebase Realtime Database is able to store datas in the local by firebaseDatabase.setPersistenceEnabled(true); and there is functions to handle an offline mode as well.
For example if connection is offline while you chat, Firebase Realtime Database will store datas what you chat in local till connection back to online Firebase will sync datas in local to Firebase server automatically.
For me I will store datas in SQLite or Realm if I want to use a search function like "%LIKE%" Hope my content above will help you.
I was using this solution for quite sometime for my app. But now users do a lot a reads and my firestore free limit is getting exhausted daily. So, i want to have SQLite in my app synced with firestore just for changes and not reading all the data to reduce the reads. Is there a way to do this?
@ErR0rpj hi have you found the solution?
In my app I have SQLite database. I want to introduce sync between devices of my users. I want to combine my local SQLite db with cloud Firebase db.
I want my sqlite database to be stored on firebase database when the users are logged in otherwise let it store offline. Any changes to the local database should be reflected on firebase database when logged in. Also if user deletes the local database he/she can retrieve it from firebase database. I just want to use firebase for the synchronization between local database and firebase database.
But i have no clue how to do it. Can anyone please help me with this? My app is in android with java as a backend.