I do not know why but I can not save my Object to FirebaseDatabase. Can someone help me?
My object:
public class ChatEntity {
public static final String ENTITY_IDENTIFIER = "chats";
private String id;
private String chatTitle;
private Map<String, ProfileEntity> users;
private Map<String, ProfileEntity> administratorsUser;
private Bitmap chatIcon;
... Getters and Setters ...
}
I'm saving this with:
FirebaseDatabase.getInstance().getReference(ChatEntity.ENTITY_IDENTIFIER).child(chat.getId()).setValue(chat);
And only this is saved:
{
"1521122180142&Teste&tduWYxVHRVPVIx6Sv4p8fNwKKJi2" : {
"chatTitle" : "Teste",
"id" : "1521122180142&Teste&tduWYxVHRVPVIx6Sv4p8fNwKKJi2"
}
}
The field chatIcon was null, so it's ok. But the two Maps has 1 and 2 entrys, and don't getting saved.
How can I save it?