recover data from a Firebase Node

Asked

Viewed 93 times

0

Glr, I want to retrieve a data in Firebase that is inside a Ode. Can someone give me a Light ? Note: This topic already exists and I have seen a solution, but the author of the answer describes a method that no longer exists in Firebase due to updates.. I’m using the image of this same topic because the problem is the same. From the image see if this structure and what I want is to recover the user’s name

inserir a descrição da imagem aqui

  • Have you tried the method child( "Notificas" ).child("Usuarios").child("ID") ?

  • 1

    What answer is that that no longer works? Explain what you have tried because there is a danger of receiving a response like the one you have already done.

  • then, in the answer q was given is said to use a Firebaseconfig class, I looked at the documentation to q it seems that this class has been reformulated, having some modified methods.. I instituted the new class but did not find the same methods. I soon came to the conclusion that the solution has become obsolete

  • @Valdeirpsr, yes, but what happens is that I need to get the user ID to get to the Name field and that I’m not able to do.. You see, I have an Activity Login q collects the past data, creates a new user and stores it in Firebase, then I go to Activity Main where it has 4 Fragments. This is where I’m trying to recover user data

  • 1

    @When you come out activity login for activity main, pass the "ID" value as argument or use SharedPreferences to save the value and consult it later. This way you can do as I mentioned in the first comment.

  • https://firebase.google.com/docs/database/android/read-and-write?hl=pt-br

Show 1 more comment
No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.