I have a method that returns values of firebase
. When received, I create a new ArrayList<Visitante
> and the saved in Object
.
ArrayList<Visitante> visitantes = new ArrayList<>();
for (DataSnapshot snapshot : dataSnapshot.getChildren()) {
visitantes.add(snapshot.getValue(Visitante.class));
Log.e("***", snapshot.getValue(Visitante.class).getNome());
}
event.emit(new Result(visitantes));
event.emit()
expects a type Object
.
How do I redraw this Object to ArrayList<Visitante>
?