Display the name of the user logged in by the email and password registered in the firebase in the application

0

Hello, I need your help, because I have already tried several ways and I can not solve it. I want to display the user name logged into the application by Firebase. NO return Edititext is this line with link to firebase (.firebaseio.com / user / 9FrkXtxNuDW97HI0JtrGufquIxQ2 / email).

I'm using the following code in activity:

final String user_id = mAuth.getCurrentUser().getUid();

mDatabase = FirebaseDatabase.getInstance().getReference().child("usuario").child(user_id).child("email");

mEditText.setText(mDatabase.toString());

It works, but only displays that url. What is missing there. The User enters the application with Firebase login email / password, and goes to MainActivity, where I execute this command to display the name. But, it does not look like the name that is registered in Firebase:

Can anyone give me a hand?

    
asked by anonymous 18.08.2018 / 22:36

1 answer

0

Everlanio to display the name of the logged in user you do not need to fetch the data in the Bank. You will have to recover using the Login Auth.

[Firebase Auth]: link "

    
19.08.2018 / 00:43