清除Firebase本地写入队列尚未手动同步 [英] Clear Firebase local write queue yet to sync Manually
问题描述
我正在开发一个使用Firebase实时数据库向多个用户显示数据的Android应用程序.
I am working on an Android application which uses Firebase Realtime Database to show data to multiple user.
当用户启动实时模式时,应用程序开始向Firebase发送数据,则可能会丢失网络连接,然后用户停止实时模式.
When user start live mode Application start sending data to Firebase, then there may be cases it loses network connectivity and then user stop live mode.
在停止实时模式后,我要确保没有以前的数据同步到Firebase,即清除本地写入队列.
After Stopping Live Mode, I want to make sure no previous data should be synced to Firebase, i.e, Clear out local write queue.
我找不到清除本地写队列的方法.
I am not able to find how to clear local write queue.
推荐答案
我找到了解决方案,但尚未尝试.我认为 purgeOutstandingWrites()
可以解决问题.
I found the solution, not tried yet.
I think purgeOutstandingWrites()
will do the trick.
这篇关于清除Firebase本地写入队列尚未手动同步的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!