Good afternoon! I have a difficulty in an app that I'm creating with firebase ... Next, I have the login login and in it I have the login button with the google account, what I want to do is the following, when the person selects the account of google, after the authentication I want to make a select there in the firebase and confirm if all the data of cadastre were filled, if yes, the person is directed to the main activity, if it is lacking data like education, profession etc, it means that it still does not have an account in realtime database, so it is directed to make the register using google mail ... my validation is like this, however, below and only a test, as I am querying the identifier q is the ID it should already I can see in the firebase console, however, it always falls as false the first time and is taken to the registration screen, so I understand that the following logic is missing something:
if (firebase.child("USUARIOS").child(identificador).equals( usuario.getId() ) ){
openMainActivity();
} else {
usuario.salvar();
openCadastroActivity();
}