I want to save an object in my firebase database, which contains an array.
when i use this:
mDatabaseReference.child("user").child(id).setValue(user);
i dont see the array in my database.
#####edited#####
this is my class UserInformation:
public class UserInformation {
private String email1;
private String Password1;
public HashMap<String, Boolean> levels=new HashMap<>();
public UserInformation (String email, String Password){
this.email1=email;
this.Password1=Password;
levels.put("level1", false);
levels.put("level2", false);
levels.put("level3", false);
}
and its still not working, i dont see my hash in the root of mt data base: when I use
UserInformation user=new UserInformation(email1,password1);
String id=mDatabaseReference.push().getKey();
mDatabaseReference.child("user").child(id).setValue(user);
startActivity(new Intent(getApplicationContext(),ProfileActivity.class));
what can i do?