I am using the new Firebase console. I am trying to save an object to the database but its not getting saved. Following is the code.
DatabaseReference mFirebaseRef = FirebaseDatabase.getInstance().getReference();
mFirebaseRef.push().setValue(object, new DatabaseReference.CompletionListener() {
@Override
public void onComplete(DatabaseError databaseError, DatabaseReference reference) {
if (databaseError != null) {
Log.e(TAG, "Failed to write message", databaseError.toException());
}
}
});
the 'object' is created properly. There is no error I am getting and I have checked in debugging that the onComplete method is not getting triggered. Security Rule is also true for write.
object? Or at least the minimalobjectwith which you can reproduce the problem?