0

So I'm currently working on an android app for a class project which essentially matches users who use the app to other users in vicinity that have similar interest inside the app as well. So the basic idea is, PersonA open up my app and there is a dropdown box that they can select say 1/10 interests options in the list. Then PersonB, who has already opened the app as well and specified their specific interest from the dropdown before can click a button that says "find a person near me within 100feet with my interest that I just selected". If the PersonA is within 100feet of PersonB with them both matching the interest selected, then PersonA is returned to the screen with where they are. How would you go about doing this solution in Android? Is there a library/class or some api that does this? I'm fairly new to android, so I'm not exactly sure how to approach this.

I've been looking through many forums and even stackoverflow questions, but can't seem to find exactly the way to implement this or even start to go about creating this solution. Any help is appreciated! Thanks :)

  • The main idea is to store users that uses your application in some database on the server. Then, when your application is opened by some user, it must send in background user's location to the server. Then, when new user opens your application, it needs to do server request to get users with specified interests and nearest location. Its simple, because you can send your current location and compare it to other locations in database using simple database query. – Alexander R. Apr 14 '15 at 18:38
  • Thanks for your answer. The problem I see with that is, what if PersonA opens the app in the morning and PersonB opens it in the afternoon. The location that's stored of PersonA is now incorrect because they could've gone somewhere else by afternoon. Thus when Person B clicks the button, it will say the person is there, but in fact they aren't. Is there a strategy to continuously update location even when say the app isn't open? That's why I was wondering if their was some library out there for that. – user1499338 Apr 14 '15 at 19:13
  • This isn't an problem. Simply store in database's table special field location_updated_date, and in query select only users that has updated their location i last 5 minutes. – Alexander R. Apr 14 '15 at 19:39
  • Updating location in background is another task. Just use Service class provided by android. In such way even if your application is closed, service instance continues to work, and it can send data to the server. – Alexander R. Apr 14 '15 at 19:41
  • You don't need external libs to do this thinks. But for simplier development you can use libs that knows to work with network (okhttp for queries, picasso for async downloading images) and data (Gson for json format) – Alexander R. Apr 14 '15 at 19:44

0 Answers0