且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

注销后清除Firebase持久性

更新时间:2023-12-06 09:40:58

Unfortunately there's no supported way to clear the persistence cache. You could try to manually delete the SQLite database used by Firebase Database (should be under /databases/ in your app's data folder), but you'd need to do it before initializing Firebase Database, so you'd have to force the app to restart after signing somebody out or similar.

Regarding knowing if there's "data waiting to sync", assuming you're talking about writes, the only way is to attach CompletionListeners to every write operation you do, and wait for them to complete.

Both of these are things we'd like to improve in future versions of the Firebase Database SDK.