I am checking whether the Boolean field called attending exists, however I am not sure how to do that.
Is there a function such as .child().exists()<
You can do the following:
if(task.isSuccessful()){
for(QueryDocumentSnapshot document: task.getResult()){
if (document.exists()) {
if(document.getBoolean("attending") != null){
Log.d(TAG, "attending field exists");
}
}
}
}
From the docs:
public boolean exists ()Returns true if the document existed in this snapshot.