【发布时间】:2020-12-12 14:32:54
【问题描述】:
我正在尝试使用我的 android 应用程序连接到 firebase 数据库,但我无法使用“路径”关键字来获取参考。它强调了它。我不知道为什么我是 Android 的初学者,而且我从未使用过 firebase,所以我对 firebase 数据库知之甚少。这是代码
progressBar.setVisibility(View.VISIBLE);
mAuth.createUserWithEmailAndPassword(email, password)
.addOnCompleteListener(new OnCompleteListener<AuthResult>() {
@Override
public void onComplete(@NonNull Task<AuthResult> task) {
if(task.isSuccessful()){
User user = new User(fullName, age, email);
FirebaseDatabase.getInstance().getReference( path: "Users")
}
}
});
【问题讨论】:
-
带路径...您可以引用数据库中的位置,这样基本上就是存储或存储数据的位置。
标签: android firebase-realtime-database firebase-authentication