Answer the question
In order to leave comments, you need to log in
How to add a name and other parameters when registering in an android application on firebase?
How to send to the database not only the email and password, but also the name and some other parameters during registration? I'm just a beginner and the documentation didn't help me much.
Answer the question
In order to leave comments, you need to log in
Alternatively, you can take this example from the documentation
mAuth.createUserWithEmailAndPassword(email, password)
.addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {
@Override
public void onComplete(@NonNull Task<AuthResult> task) {
if (task.isSuccessful()) {
// Sign in success, update UI with the signed-in user's information
Log.d(TAG, "createUserWithEmail:success");
FirebaseUser user = mAuth.getCurrentUser();
updateUI(user);
} else {
// If sign in fails, display a message to the user.
Log.w(TAG, "createUserWithEmail:failure", task.getException());
Toast.makeText(EmailPasswordActivity.this, "Authentication failed.",
Toast.LENGTH_SHORT).show();
updateUI(null);
}
// ...
}
});
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question