I'm developing an Android App with Firebase as a backend.
So far it worked very smoothly and I loved it, but now I encountered a major roadblock.
The app has to search for deals around a certain location and then populate a ListView
(or a RecyclerView
) accordingly.
I've already included Geofire in my Firebase structure, having a main deals node and a geofire node with the same keys, and the Geoquery is returning them fine.
My problem is that the FirebaseListAdapter
that I've grabbed from the Firebase examples doesn't have a single item add method, that it's what I'll need as the Geoquery will return only one key at time.
After a long search, I've haven't been able to find an example of code that was dealing with the same issue, so I would like to ask for some advice on how, and which is the most efficient way to implement this.
Thanks
P.S.: my firebase structure:
{
"deals" : {
"-JikH6yjJ9TblE8_4fX4" : {
"category" : "Food",
"description" : "example description",
"location" : "George St, Brisbane",
"title" : "some title",
}
},
"geofire" : {
"-JikH6yjJ9TblE8_4fX4" : {
".priority" : "r7hgf2d639",
"g" : "r7hgf2d639",
"l" : [ -27.46268003, 153.03172851 ]
}
}
}