title: How to get the current user profile image and name from Firebase?
body: <p>Below is my Firebase structure image,</p>
  
  <p><strong>Firebase Structure</strong></p>
  
  <p><a href="https://i.stack.imgur.com/MnQUP.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/MnQUP.jpg" alt="enter image description here"></a></p>
  
  <p>I will like to use the name and profile image of user for my Second Activity.</p>
  
  <p>Here how I did for my another app,</p>
  
  <pre><code>FirebaseUser user = FirebaseAuth.getInstance().getCurrentUser();
  String uid = user.getUid();
  String name = user.getDisplayName();
  </code></pre>
  
  <p>And I later used the <code>name</code> in my <code>TextView</code> to use the current user name but here it didn't worked and besides I also needed the profile image too.</p>
  
  <p>So, How do I get the user image and name from above Firebase structure image to my Second activity layout <code>TextView</code> and <code>ImageView</code> and set the default text name and image if it returns null. </p>
  
  <p>I tried below but it didn't worked to</p>
  
  <pre><code>public void setUserData(String name, String image) {
  
      ImageView userimage = (ImageView) findViewById(R.id.imageView);
      userimage.setImageURI(userimage);
  }
  </code></pre>