Can anyone tell me, what's going wrong? It works only in Unity Editor. When buildo for android, it does not work, but does not report any kind of error. When testing on the pc it works normally.
public void CadastrarPorEmail()
{
email = _textEmail.text;
password = _texSenha.text;
auth.CreateUserWithEmailAndPasswordAsync(email, password).ContinueWith(task =>
{
if (task.IsCanceled)
{
_imgDeAvisos.SetActive(true);
_textAviso.text = "Erro ao criar usuário: " + task.Exception;
Debug.LogWarning("CreateUserWithEmailAndPasswordAsync was canceled.");
return;
}
if (task.IsFaulted)
{
Debug.LogWarning("CreateUserWithEmailAndPasswordAsync encountered an error: " + task.Exception);
_imgDeAvisos.SetActive(true);
_textAviso.text = "Erro ao criar usuário: " + task.Exception;
return;
}
// Firebase user has been created.
Firebase.Auth.FirebaseUser newUser = task.Result;
Debug.LogFormat("Firebase user created successfully: {0} ({1})", newUser.DisplayName, newUser.UserId);
_imgDeAvisos.SetActive(true);
_imgDeAvisos.GetComponent<Image>().color = new Color32(0, 185, 156, 100);
_textAviso.text = " Cadastro Criado com sucesso !" + newUser.DisplayName + newUser.UserId;
//Send Emails Verification
newUser.SendEmailVerificationAsync().ContinueWith(t => {
Debug.Log("Verifique o seu e-mail");
});
});
}