My Problem
08-10 04:23:28.820 21501-21501/my.org.medicare.medicareapp E/AndroidRuntime: FATAL EXCEPTION: main
Your fetchData function already receives DataSnapshot as a child-node, but even here you still loop through the children which will effectively be looping through individual keys (name, contact, centre).
You should simply call getValue on DataSnaphot without looping:
private void fetchData(DataSnapshot dataSnapshot)
{
spacecrafts.clear();
protest spacecraft=dataSnapshot.getValue(protest.class);
spacecrafts.add(spacecraft);
}
I hope this helps.