realtalk403/realtalkserver — pull request #29 by joryrice (2013-05-11 13:23:52+00:00)
Title: ChatServerManager: location-based active user queries implemented (correctly this time)

- Fixed iNumUsers, rgstGetRegistrationIds, and rguserinfoGetRoomUsers. The bug that caused these to fail was in the SQL query. I was missing a space in the query, so it was being executed as:
SELECT DISTINCTu.username...
instead of
SELECT DISTINCT u.username...

- Resolved TODOs in ChatServerManager: distance between two locations is now calculated correctly, number of users is calculated correctly, and methods return the right things now.

- Created LocationLogic.java: contains location logic (computing distance, sorting by distance, etc)

- Removed e.printstacktrace lines, commented stuff (javadoc + regular), cleaned up the code.

This should unblock people. Retrieving registration IDs should work (for GCM) and retrieving nearby rooms should work (for GPS stuff).