D
D
DARKENN2019-08-19 21:44:44
Android
DARKENN, 2019-08-19 21:44:44

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

2 answer(s)
D
Developer, 2019-08-19
@samodum

Just like email and password

R
Roman Alexandrovich, 2019-08-20
@RomReed

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);
                }

                // ...
            }
        });

https://firebase.google.com/docs/auth/android/pass...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question