Answer the question
In order to leave comments, you need to log in
firebase authentication not working in android studio app?
I will give a link to the git: https://github.com/HoboHub/gramophone_login
The problem is most likely in the MainActivity:
https://github.com/HoboHub/gramophone_login/tree/m...
What is the point: When you enter the application - only the registered user is thrown into SetupActivity where he enters his data (country, name, nickname). After it should be thrown into MainActivity, marked: registration successful, congratulations!!!
In fact: Only congratulations pop up. The user is transferred to MainActivity for half a second and then enter data back into Setup.
Here is the code from Main.
If there is no user data in the Firebase database, it is thrown into SetUpActivity.
private void CheckUserExistence() {
final String current_user_id = mAuth.getCurrentUser().getUid();
UsersRef.addValueEventListener(new ValueEventListener() {
@Override
public void onDataChange(@NonNull DataSnapshot dataSnapshot) {
if (!dataSnapshot.hasChild(current_user_id)) {
SendUserToSetupActivity();
}
}
@Override
public void onCancelled(@NonNull DatabaseError databaseError) {
}
});
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question