imperiumlabs / GeoFirestore-Android

GeoFirestore for Android - Realtime location queries with Firestore
MIT License
123 stars 36 forks source link

Add ability to get queries from GeoQuery #21

Closed percula closed 5 years ago

percula commented 5 years ago

I needed a way to get the plain Firestore queries so that I could query them once (rather than listen). I also went this route due to issue #7 . This simply exposes the query (or queries) that the GeoQuery would listen to.

Usage:


val queries = geoFirestore.queryAtLocation(GeoPoint(latitude, longitude), radius).queries
queries.forEach {
   it.get()?.addOnSuccessListener { 
     // Do work here
  }?.addOnFailureListener {  }
}