我正在测试createUserWithEmailAndPassword功能,但它似乎没有用。
private void createUserAccount() {
String userEmail, userPassword;
userEmail = emailRegisterEditText.getText().toString();
userPassword = passwordRegisterEditText.getText().toString();
if (!TextUtils.isEmpty(userEmail) && !TextUtils.isEmpty(userPassword)) {
mAuth.createUserWithEmailAndPassword(userEmail, userPassword)
.addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {
@Override
public void onComplete(@NonNull Task<AuthResult> task) {
if (task.isSuccessful()) {
Toast.makeText(RegisterUserActivity.this, "Account created successfully", Toast.LENGTH_LONG).show();
mProgressDialog.dismiss();
startActivity(new Intent(RegisterUserActivity.this, InstagramHomeActivity.class));
} else {
Toast.makeText(RegisterUserActivity.this, "Failed to create account", Toast.LENGTH_LONG).show();
mProgressDialog.dismiss();
}
}
});
}
}
我已经搜索了这个问题,其他人也有类似的问题,但是他们出现了失败的祝酒词。祝酒成功或失败都没有出现,ProgressDialog也没有为我消失。我想也许它正在处理或者firebase方面有错误?任何帮助表示赞赏。感谢