Closed shariatraad closed 4 years ago
I solved the issue by adding this to the code in case if anyone faced the same issue:
result.OnCompletion([](const firebase::Future<firebase::database::DataSnapshot>& completed_future){
if (completed_future.error() == 0)
{
//Do what you need to do with your value here
}
}
);
I am trying to get a value from my Firebase real-time database but I keep getting 0 for
firebase::kFutureStatusPending
(firebase::kFutureStatusPending
tells me my results are still pending ). I am able to set value by usingSetValue()
on my database and I have checked the url withdbref.Child(user->uid()).Child("Nickname").url()
and it is correct. here is a piece of my code related to this part and I also have included JSON structure at the end:How can I get the value of "Nickname" child (which is "Raad" in this case) in my Qt Android app?
Here is the JSON file content :