Firebase does not sync offline cache if the app is killed
Works like a charm , see what i did.
- ---actions when app is offline---
Data was perfectly synched. I have used 4 lines of firestore magic
//Firebase Database Magic lines
val firebaseDatabase: FirebaseDatabase = FirebaseDatabase.getInstance()
firebaseDatabase.setPersistenceEnabled(true)
val firebaseDatabase: FirebaseDatabase= firebaseDatabase.getReference("Prakash")
databaseReference.keepSynced(true)
According to firebase documentation
Transactions are not persisted across app restarts
Even with persistence enabled, transactions are not persisted across app restarts. So you cannot rely on transactions done offline being committed to your Firebase Realtime Database. To provide the best user experience, your app should show that a transaction has not been saved into your Firebase Realtime Database yet, or make sure your app remembers them manually and executes them again after an app restart.