Well, I am new to Firebase and I want to have my own keys while pushing new data to database.
Problem:
FireBase.push().setValue(mapped_values);
let's say your db look like
"BookShelf" : {
"book1" : {
"bookName" : "book1_push"
...
}
your code to be (don't use push(), push() generate a random key)
DatabaseReference mDatabase = FirebaseDatabase.getInstance().getReference();
Book data = new Book();
mDatabase.child("BookShelf").child("book1").setValue(data);