Chintan Patel
Nov 6 · 1 min read

Yes, sure you can use this in Java class.
You’ll be needed to do following same steps as here https://github.com/chintan369/Geo-FireStore-Query?source=post_page-----bfb0ac1adf0a----------------------#to-retrive-the-list-of-items-from-center-location-with-the-given-radius

In Java

FirebaseFirestore db = FirebaseFirestore.getInstance();Location centerLocation = new Location(centerLatitude, centerLongitude)
Distance distanceForRadius = new Distance(1.0, DistanceUnit.KILOMETERS)
GeoQuery geoQuery = new GeoQuery()
.collection("users")
.whereEqualTo("status","approved")
.whereEqualTo("country","IN")
.whereNearToLocation(centerLocation, distanceForRadius, fieldName)
.startAfter(lastDocument)
.limit(10)
    Chintan Patel

    Written by

    Working as Android Developer Java & Kotlin, can work on multi-technology iOS, PHP, JS, Graphics Designing

    Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
    Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
    Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade