I am working with Parse.com and have created a profile page where users enters a variety of information like age, name, and sets their minimum age allowed and maximum age allowed through seekbars. These information get recorded, and when populating the list of users, with support I have created a matching system that returns the list of users who within the age range of the current user.
Below is my code to achieve this:
ParseQuery<ParseUser> query = ParseUser.getQuery(); query.whereGreaterThanOrEqualTo("Minimum_Age", minimumAge); query.whereLessThanOrEqualTo("Maximum_Age", maximumAge);
This seem to have partially worked. In the same that when the minimum age and maximum age values of two users are equal, than it would show that user since its fall within that age range, however, if the minmum age of the current user was 22, and the other user on the list was 20 than it would not show. This code only seems to work when both values of maximum and minimum are equal. My question is this i set it up properly, because it seems that unless the values are identical even if users in that list falls within that age range, they would not be displayed.
If you require further information let me know.