是否可以在Firebase中发送同步请求? [英] Is it possible to send a synchronous request in the Firebase?
问题描述
我正在使用 Firebase Android SDK
,并对发送同步请求感兴趣,而不是异步。根据文档,在任何请求回调是呈现。但同步性呢?
谢谢!
没有办法从Firebase数据库同步加载数据。
$ b 虽然新开发Firebase的开发人员希望使用同步方法,但这并不符合Firebase的数据同步模式。另请参阅我的答案:在Firebase侦听器中设置Singleton属性值
I'm using Firebase Android SDK
and became interested in sending synchronous request instead of asynchronous. According to the documentation, in any request callbacks are presented. But what about the synchronicity?
Thanks!
There is no way to synchronously load data from the Firebase Database.
While it is common for developers new to Firebase to wish for a synchronous method, it simply doesn't fit with Firebase's data synchronization model. Also see my answer here: Setting Singleton property value in Firebase Listener
这篇关于是否可以在Firebase中发送同步请求?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!