是否可以在Firebase中发送同步请求? [英] Is it possible to send a synchronous request in the Firebase?

查看:131
本文介绍了是否可以在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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆