我正在尝试使用Firebase Auth服务和电子邮件和密码.当我点击注册时,我在模拟器上收到一条警告说:
"Update Google Play services : Firebase Auth won't run unless you update Google Play services"
Run Code Online (Sandbox Code Playgroud)
当我查看日志时,我可以阅读这两行:
DynamiteModule: Local module descriptor class for com.google.firebase.auth not found.
GooglePlayServicesUtil: Google Play services out of date. Requires 9256000 but found 9080480
Run Code Online (Sandbox Code Playgroud)
在SDK Manager中,Google Play服务是最新的.我怀疑它是模拟器的一个问题,它不知何故是最新的.
我正在使用的模拟器:Nexus 5X API 21(使用Google API)
任何的想法?谢谢!
android firebase google-play-services firebase-authentication
我正在构建一个Android应用程序,我希望我的用户成为Auth,然后添加到数据库中.目前我只使用电子邮件和密码进行身份验证,然后单击"注册",用户将在Firebase控制台的"身份验证"部分中创建.
但我也希望将我的用户添加到数据库中.我想添加更多字段(例如名称,地址等),这些字段将存储在Firebase的用户数据库中.
我只是不知道该怎么做.有人可以解释一下吗?
谢谢!
android firebase firebase-authentication firebase-realtime-database
我想通过身份验证在我的数据库中读取和写入,但我得到了Permission denied
两者.我试图找出它为什么不起作用.
我使用默认规则,因为我想要身份验证,如文档中所述.
默认规则需要身份验证.它们允许对应用程序的经过身份验证的用户进行完全读写>访问.如果您希望数据打开>应用程序的所有用户但不希望它向全世界开放,则它们非常有用.
Firebase规则:
{
"rules": {
".read": "auth != null",
".write": "auth != null"
}
}
Run Code Online (Sandbox Code Playgroud)创建用户 :
auth.createUserWithEmailAndPassword(email, password)
.addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {
@Override
public void onComplete(@NonNull Task<AuthResult> task) {
Log.d("USER_CREATE", "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 can be handled in the listener.
if (!task.isSuccessful()) { …
Run Code Online (Sandbox Code Playgroud)android firebase firebase-security firebase-authentication firebase-realtime-database
我正在尝试使用a FirebaseRecyclerAdapter
来填充片段中的RecyclerView,其中包含来自Firebase数据库的数据.
我的主要问题是该populateViewHolder
方法永远不会被调用,因此我没有显示任何内容RecyclerView
.
我按照Firebase UI
文档中的步骤操作:
https://github.com/firebase/FirebaseUI-Android/blob/master/database/README.md
我的Firebase数据库中的规则:
{
"rules": {
".read": "true",
".write": "true"
}
}
Run Code Online (Sandbox Code Playgroud)
在我的gradle中,我添加了这个依赖:
compile 'com.firebaseui:firebase-ui-database:0.4.1'
Run Code Online (Sandbox Code Playgroud)
这是我片段中的onCreateView方法:
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
View rootView = inflater.inflate(R.layout.fragment_dev_list, container, false);
Log.d("ROOT_VIEW", rootView.toString());
mRecyclerView = (RecyclerView) rootView.findViewById(R.id.recycler_view);
Log.d("RECYCLER_VIEW", mRecyclerView.toString());
mRecyclerView.setHasFixedSize(true);
mRecyclerView.setLayoutManager(new LinearLayoutManager(getActivity()));
Log.d("ITEM_RECYCLER", Integer.toString(mRecyclerView.getLayoutManager().getItemCount()));
DatabaseReference devs = FirebaseDatabase.getInstance().getReference().child("users").child("devs");
FirebaseRecyclerAdapter<Developer, DeveloperViewHolder> adapter =
new FirebaseRecyclerAdapter<Developer, DeveloperViewHolder>(
Developer.class,
R.layout.dev_list_row,
DeveloperViewHolder.class,
devs
) {
@Override
protected …
Run Code Online (Sandbox Code Playgroud) android firebase recycler-adapter firebase-realtime-database firebaseui