在Firebase,Android中创建用户

时间:2016-07-14 19:39:29

标签: android firebase firebase-authentication

我尝试在Firebase中创建用户,但在使用createUser()函数时没有任何反应。

Firebase ref = new Firebase("https://myApp-88ea7.firebaseio.com/");
                ref.createUser(email, password, new Firebase.ValueResultHandler<Map<String, Object>>() {
                    @Override
                    public void onSuccess(Map<String, Object> result) {
                        Log.i("SUCCESS", "Successfully created user account with uid: " + result.get("uid"));
                    }
                    @Override
                    public void onError(FirebaseError firebaseError) {
                        // there was an error
                        Log.i("Error", firebaseError.getDetails());
                    }
                });

事实上,我似乎没有进入onSuccess()或onError()。我正在尝试关注this guide

我已启用登录方式。调用函数时收到此消息:

  

调用createSocket()返回一个新的套接字

我做错了什么?

1 个答案:

答案 0 :(得分:0)

谢谢!我刚刚关注了过时的指南this is the right one