June 2018
Beginner to intermediate
394 pages
9h 2m
English
Now it is time to explore the sign-up process. When the user opts to create an account, we need two pieces of primary information, which is email and password. It might sound a little humorous, but the method we need to use for creating the account is createUserWithEmailAndPassword. The method is named because of the functionality and here we need to attach an addOnCompleteListner interface with its callbacks:
mAuth.createUserWithEmailAndPassword(email, password) .addOnCompleteListener(this, new OnCompleteListener<AuthResult>() { @Override public void onComplete(@NonNull Task<AuthResult> task) { if (task.isSuccessful()) { // Successfully account created Log.d(TAG, "Accounted creation:success"); FirebaseUser user = mAuth ...
Read now
Unlock full access