How to create a location-based group

Create group process

  1. The app sends an HTTP request to the App Server with the location and range to create a group
  2. The App Server creates the group and caches the location and range
  3. The App Server calls the RC Server API (/group/create.json) to notify RC of the group information

Join and quit group process

  1. The app collects the user’s location in real time and periodically sends an HTTP request to the App Server with the user’s location
  2. The App Server checks the user’s group based on the location. If the user leaves the group range, it triggers the quit group process. If the user enters a group range, it triggers the join group process

Join group process (after the App Server receives the user’s location)

  1. The App Server calls the RC Server API (/message/private/publish.json) to send a custom message inviting the user to join the group
  2. The app shows a pop-up to prompt the user to join. The app sends an HTTP request to the App Server when the user agrees or declines
  3. The App Server processes the user’s join or decline request based on the HTTP request parameters
  4. If the user joins, the App Server calls the RC Server API (/group/join.json) to notify RC of the user joining

Quit group process (after the App Server receives the user’s location)

  1. The App Server removes the user from the group
  2. The App Server calls the RC Server API (/group/quit.json) to notify RC of the user quitting
  3. The App Server calls the RC Server API (/message/private/publish.json) to send a custom message about the user quitting
  4. The app notifies the user that they’ve quit the group