FirebaseDatabase.DefaultInstance.GetReference("Values")
.GetValueAsync().ContinueWithOnMainThread(task => {
if (task.IsFaulted) {
// Handle the error...
}
else if (task.IsCompleted) {
//get the data here:
//this is snapshot of the reference
DataSnapshot snapshot = task.Result;
//this is your boolean, you get it from the snapshot
bool updateIsReady = snapshot.Child("updateIsReady").Value;
}
});
1条答案
按热度按时间gzjq41n41#
在
task.IsCompleted
中准备就绪后,应立即获取该值: