我们的要求
在Android上使用Firebase SDK使用电子邮件/密码注册
问题
onComplete()方法未被调用.不会抛出任何错误/异常.注意:我们已在Firebase控制台上启用了电子邮件/密码提供程序
请找到以下代码 -
public void onClick(View v) {
try {
if (v == saveView) {
String email = emailView.getText().toString();
String password = passwordView.getText().toString();
if (validate(email, password)) {
mAuth.createUserWithEmailAndPassword(email, password)
.addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {
@Override
public void onComplete(@NonNull Task<AuthResult> task) {
Log.d(TAG, "createUserWithEmail:onComplete:" + task.isSuccessful());
// If sign in fails, display a message to the user. If sign in succeeds
// the auth state listener will be notified and logic to handle the
// signed in user …Run Code Online (Sandbox Code Playgroud) 在下面的接口中,使用TypeScript语言" ?: "和" : "符号进行解除,我无法理解这两个符号之间的区别.我是新手稿,所以请帮助我.
interface SquareConfig {
color?: string;
width: number
}
Run Code Online (Sandbox Code Playgroud)