Issue
I want to fetch the list of phone numbers who are opted for "plumber" job in this list also the numbers who has accepted the job or not in firebase using kotlin.
.
Solution
I think you're looking to use a query in a nested property, which you can do with:
// TODO: set ref to point to the parent node of your results
val query = ref.orderByChild("Plumber/accepted").equalTo(true)
query.addChildEventListener(object : ChildEventListener {
override fun onChildAdded(snapshot: DataSnapshot, previousChildKey: String?) {
println(snapshot.key) // "+91111111111"
}
...
})
Answered By - Frank van Puffelen
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.