Accessing Firebase Database Objects Below Child
问题 I have a data structure as such: I am calling .addListenerForSingleValueEvent() on my Polls reference, and I have a Pojo class mapped to the poll. However, since I do not know the value of the key, I cannot access my poll items. Is there a way to access, let's say, display_name, or would I need to know the value of the key? 回答1: If you don't know anything about the poll to show, the best you can do is show all polls. This can be done by attaching a listener to /Polls : DatabaseReference ref =