I have my kotlin class as
class Center : Serializable {
var active: Boolean? = null
var address: String? = null
var isJobAccessGranted: Boolean? = null
}
here is how i am getting value
//from java class
@Override
public void onChildChanged(DataSnapshot dataSnapshot, String s) {
centerMap.put(dataSnapshot.getKey(), dataSnapshot.getValue(Center.class));
}
but problem is that i am getting value of active
field without any issue. But isJobAccessGranted
boolean field always remains null. I have tested with some other boolean removing is
prefix which works fine. I don't get Boolean value when i use isActive
or isJobAccessGranted
. Can anyone explain me why i am facing this issue. #AskFirebase
@field:JvmField
overvar isJobAccessGranted: Boolean? = null
solved my problem