[Solved] App crashes when registration button is pressed

email and password should not be null or empty String email = mEmail.getText().toString(); String password = mPassword.getText().toString(); if(email.isEmpty() || password.isEmpty()) return; //you need to display message to the user mAuth.createUserWithEmailAndPassword(email, password) .addOnCompleteListener(CustomerLoginActivity.this, new OnCompleteListener<AuthResult>() { … }) solved App crashes when registration button is pressed

[Solved] How to login using username instead email on Firebase in Android application [duplicate]

If you want to do something like giving special login access like usernames and passwords, you can use Firebase realtime database to do so. You can create a node named credentials and then store every new username and password in it. Then to check if a person is logging in with correct details, you can … Read more

[Solved] Android: Why can’t I move to another Acivity by using “Intent”?

When you call the method “createNewUser()”, you are inside of an onClickListener. When you pass in ‘this’ as your context, you are passing in the context of your listener. Instead, when calling createNewUser, use ‘MainActivity.this’ as your Context, so then your app knows that the context is the whole activity and not just the listener. … Read more

[Solved] Fetch all children from database

This answer is similar to a prior answer here What you want to do is to treat each child in Customers as a DataSnapshot, then the children can be accessed. Given a Firebase structure: usersDatabase uid_0 Customers Ben Smith data: “Some data” Tom Cruise data: “Some data” uid_1 Customers Leroy Jenkins data: “Some data” uid_2 … Read more

[Solved] I keep getting java.lang.String com.google.firebase.auth.FirebaseUser.getUid()’ error although it has already confirmed they is a user

I keep getting java.lang.String com.google.firebase.auth.FirebaseUser.getUid()’ error although it has already confirmed they is a user solved I keep getting java.lang.String com.google.firebase.auth.FirebaseUser.getUid()’ error although it has already confirmed they is a user