Firebase-Android, how to sync data when resuming after losing a connection?

In my case, I connected to the Internet when I logged in, then disconnected all connections and published some data (push + set). After that, I reconnect, but I see that new data is not sent to the server.

How to force data synchronization immediately after reconnecting

Note. I used this from the beginning:

Firebase.getDefaultConfig().setPersistenceEnabled(true);
Firebase ref = new Firebase(apiUrl);
ref.keepSynced(true);
+1
source share
2 answers

Firebase does this automatically. When the connection is lost, Firebase will continue to execute offline events locally and work with data stored in the cache.

. , SDK . .keepSynced() - , .

0

​​ Firebase-Android,

" ", , .

0

Source: https://habr.com/ru/post/1621015/


All Articles