Firebase does not work with multiple applications

0

Alright?

I started a project in Firebase and linkei two related applications in the same project.

I made an equal login / signin system for both. It turns out that for an application, the sign in works normal but for the second application, when I click register the app never completes the response. The method for sign in is the same in both:

 public void bntRegistrarRClick(View v)
    {
        (firebaseAuth.createUserWithEmailAndPassword(txtEmail.getText().toString(), txtSenha.getText().toString())).
                addOnCompleteListener(new OnCompleteListener<AuthResult>() {
                    @Override
                    public void onComplete(@NonNull Task<AuthResult> task) {
                        if(task.isSuccessful())
                        {
                            Toast.makeText(RegistroActivity.this, "Registrado com Sucesso", Toast.LENGTH_LONG).show();
                            Intent i = new Intent(RegistroActivity.this, CreateProfileActivity.class);
                            startActivity(i);
                        }
                        else
                        {
                            Log.e("ERROR", task.getException().toString());
                            Toast.makeText(RegistroActivity.this, task.getException().getMessage(), Toast.LENGTH_LONG).show();
                        }
                    }
                });

    }

Does anyone have an idea of the problem?

    
asked by anonymous 21.09.2017 / 06:04

2 answers

0

Thank you for the comment, you may not have explained me very well! What I wanted was for two apps to connect to the same bank, which I could not do.

The problem was that I had placed the applications on projects other than Android Studio and in fact they should be on the same project with different modules.

    
28.09.2017 / 00:31
0

Go to the firebase panel - > Authentication - > Login methods - > Multiple accounts per email address is enable option so the same email can log several times. Follow the users area to see the result.

    
21.09.2017 / 23:24