I have started to develop an Android application where I need a distance based search. The user should be able to choose the maximum distance, let's say 3 km. I have already written some code where I get every user's current location (Lat, Lng) and store it in a mysql database. Then the app retrieves every user's position and finds the distance between the user and the other ones. With an if loop, the app checks if the value entered by the user is less or equal to each user distance.
I have tested it and it's working well, but the problem is that I wonder if this would still work with thousands of users ?
If you have any advice or answer to this, please tell me !
Let the current user location be assigned to currentLocation.