suiko1984 / geofirestore-android

GeoFire for Android - Realtime location queries with Firebase Cloud Firestore
13 stars 4 forks source link

how to limit the number of result #11

Closed awscoolboy closed 4 years ago

awscoolboy commented 4 years ago

how to limit the number of result

zoro238 commented 4 years ago

How can I know the number of results?

suiko1984 commented 4 years ago

@awscoolboy To limit the number of results, you can refer to https://github.com/suiko1984/geofirestore-android#compound-query Example: GeoFire geoFire = new GeoFire(ref, ref.limit(30));

@zoro238 The number of results depends on the limit you choose for the query. If no query is set, the number of results is undefined. You can then retrieve the number of results in the callback.

zoro238 commented 4 years ago

no no no.. sure you did not understand what I mean. Now I did a search and found an example of 20 people. I want it. After completing the research, the number 20 appears, it is the number of people he found The second point, when I exit my activity, stops searching ..