Skip to content

Product: Geofence v1

Rebecka Z edited this page Apr 20, 2018 · 1 revision
name signoff?
product rz
design aq
dev y
stakeholder sc

Goal:

Create a geofence v1 that helps introduce the product.


Knowns:

- -
1 If "Pat" disables footprint CTA, all other guests receive a notification that "Pat" left the bot. Even if "Pat" is still physically in the bot.
2 (timeout logic) The client side will be uploading location to the server side every 4 minutes. If the server side does not receive a location after x tries. Then it's going to consider that the user is no longer in that bot. (Could happen with low battery, phone dead)
3 If user joins or creates a geofence bot, and they are already in the geofence bot they do not appear in the bot. Even after k/r. Being worked on

Latest Changes:

  1. Geofence has been featured renamed to Presence. Applies to user facing content.
  2. All bots can have geofence now (private and public)
  3. If a bot owner disables presence (by disabling the footprint) the geofence bot still functions for everyone else who has enabled presence. rn-chat link here, 1957
  4. A geofence bot has geofence removed when bot owner toggles geofence functionality: OFF or when they delete the bot. rn-chat link here, 1958

Some suggestions for terminology per @bengtan:

Each bot has a property or flag which enables or disables this functionality. I'm gonna go ahead and call it geofence. We actually have an existing, albeit unused, field alerts for this purpose but in hindsight, alerts is not a good name either so I'd rather replace it with geofence.

Each user which opts into sharing visits is called a 'guest' (for lack of a better term). It's not a perfect name either but it's the best I came up with. The idea is that ... sharing visits is analoguous to adding oneself to a guest list or a roll call. [1]

A 'visitor' is a user who is a 'guest' and also is currently within the perimeter of the bot (after applying debouncing rules).

'persistent HS banner' can be replaced by one of: HS header, HS preamble or HS preface. You could also use the term 'sticky' to mean that it is always positioned (if it appears) before the first HS item.

BTW, the 'accept-ignore-an-invite-to-share-visits' isn't actually part of the HS. In the sense that ... it's not part of the data structure that makes up the HS. Server side and protocol-wise ... it's a separate and independent thing.

[1] An alternative is to say that a user who was chosen to share visits is an opted-in user. Hence, every bot has non-subcribers, opted-out subscribers, and opted-in subscribers. This is attaching a new meaning to the term 'opt in' ... but maybe it works.

Terminology:

  1. Guest: Each user which opts into sharing visits is called a 'guest'
  2. Visitor: A 'visitor' is a user who is a 'guest' and also is currently within the perimeter of the bot (after applying debouncing rules).
  3. HS header: a sticky at the top header that is always positioned (if it appears) before the first HS item. It does not stick when a user scrolls down

Product Requirements:

Assumptions:

In order for geofence to work, the following must happen:

  1. User needs to enable Always for iOS Location Access Permission
  2. User needs to create or accept tracking (by enabling the footprint CTA) from a bot with sharing visits enabled.

High Level Rules:

  1. Geofence only works for private ALL bots.
  2. In order to disable geofence for everyone who has enabled tracking on a bot, the bot owner can delete the bot, make the bot public [edited] or disable the geofence CTA (footprint CTA). 1 If the bot owner disables the geofence CTA (footprint CTA) ALL users are automatically taken off tracking from this bot. If the user reenables the footprint CTA, all guests who have previously enabled the footprint CTA get a notification asking them to reenable the footprint CTA.
  3. Bot owner is a guest. If they disable their own geofence bot they simply do not receive "geofence updates" [user arrived, user left]
  4. Once a user sets iOS permission: Only While Using App users sees disabled bots UI. They will need to reenable the iOS settings in order to reenable the bots.
  5. Once a bot owner sets iOS permission: Only While Using App they are no longer able to see the geofence UI until they reenable the setting. Instead, they only see a disabled version of the bot. However, everyone else in the bot owner's bots can still see each other's geofence UI.
  6. Geofence detection is bidirectional, User A and User B can always see each other's geofence. It should not be possible for User A to see User B's geofence only. Or vice versa.
  7. If a user enables the footprint CTA, they automatically subscribe to the bot. The CTAs should reflect this.
  8. Default radius: 100 meters, no other type of radius should be possible when geofence is enabled.
  9. In efforts to introduce this totally new product, all users will automatically have the footprint CTA enabled for tinyrobot HQ bot. (And thus, automatic subscribers to tinyrobot HQ.
  10. Persistent HS banner is persistent (even if there are no visits) for v1. (Need mock for this)
  11. All users that have enabled geofence detection for a bot have access to the Visitors list.
  12. On Explore Nearby, bots that have enabled shared geofence will display their respective accurate default 100 meters radiuses.
  13. In order for a user to be considered as visiting, they need to be there for 120 seconds.
  14. In order for a user to be considered as out of the bot, they need to be out of the geofence for 60 seconds.

image


Case 1:

  1. User A (bot owner) sends a request to User B (receiving user) and User C (receiving user).
  2. User B and C accept (by enabling the footprint CTA).
  3. Users A, B, and C can see Users A, B and C's geofence even if Users B and C are not friends or have any relation on tr.

Case 2:

  1. User A (bot owner) sends a request to User B (receiving user) and User C (receiving user).
  2. User B and C accept (by enabling the footprint CTA).
  3. If User A disables tracking (by disabling the footprint CTA) ALL users can still see the bot. Users B and C will continue to receive geofence push notifications. User A will not receive push notifications until they reenable the footprint CTA.
  4. User A reenables tracking, by tapping on the footprint CTA. ALL users who previously allowed tracking receiving a notification asking them to reenable tracking.

Case 3:

  1. User A (bot owner) sends a request to User B (receiving user) and User C (receiving user).
  2. User B and C accept (by enabling the footprint CTA).
  3. User A deletes bot.
  4. The bot is removed across the app. Geofence UI is also removed (from persistent banner and Explore Nearby).

Push Notifications:

  1. See https://github.com/hippware/rn-chat/issues/1904