如何使用android firebase访问带圆圈的电子邮件和密码。到目前为止,我已尝试使用以下代码,但它不起作用。
Mref = new Firebase("https://blah blah/");
Firebase objRef = Mref.child("Administrators");
objRef.addChildEventListener(new ChildEventListener() {
@Override
public void onChildAdded(DataSnapshot dataSnapshot, String s) {
Map<String, String>map=dataSnapshot.getValue(Map.class);
String password = map.get("password");
String email = map.get("email");
Log.d("email",email);
Log.d("password",password);
if(ed1.getText().toString().equals(password)&& ed2.getText().toString().equals(email)){
Intent intent=new Intent(Main2Activity.this, MapsActivity.class);
startActivity(intent);
Log.d("password",password);
}
else{
Toast.makeText(Main2Activity.this, "Wrong Credentials",Toast.LENGTH_LONG).show();
}
}