title: retrieve data currentuser. from firebase return null
body: <p>Hello I'm trying to retrieve the data from a realtime firebase field but it returns null. I checked with textView52.setText (firebaseUser.getEmail ()); to see if it was really connected and it works. the problem is in recovering a value from the database which in this case is the field "name" could someone help me?
  am i doing something wrong?
  any help is welcome.</p>
  
  <pre><code>    DatabaseReference ref = FirebaseDatabase.getInstance().getReference("Users");
      ref.child("Users").addListenerForSingleValueEvent(new ValueEventListener() {
          FirebaseUser user = FirebaseAuth.getInstance().getCurrentUser();
          String userUid = user.getUid();
          @Override
          public void onDataChange(DataSnapshot dataSnapshot) {
              String data = dataSnapshot.child("name").getValue(String.class);
              textView52.setText(data);
          }
  
          @Override
          public void onCancelled(@NonNull DatabaseError databaseError) {
  
          }
      });
  
  }
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/WLGHc.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/WLGHc.png" alt="enter image description here"></a></p>