Facilities
Facilities feature — manage the facilities associated with the authenticated member.
This interface provides operations to retrieve, update, delete, monitor, and nominate facilities. Implementations connect to backend services and manage local persistence internally; developers interact only with these methods.
Capabilities
Get: retrieve all facilities for the current member.
Update: change verification status of a facility.
Delete: remove a facility from the member’s list.
Monitoring: start/stop monitoring facilities for presence and updates (leverages geofencing/proximity if available).
Nomination: submit a new facility for consideration and retrieve a list of past nominations.
Platform & threading
All functions are
suspendand must be called from a coroutine.Errors surface as
Throwableand should be handled at call sites.
Typical flows
Initialization: call get to fetch facilities and display them in UI.
Status change: call update when a facility is verified or blacklisted.
Removal: call delete when a facility should no longer appear.
Real-time monitoring: call startMonitoring at login/onboarding, and stopMonitoring at logout or when presence tracking is no longer needed.
New facility suggestion: use nominateFacility to submit a new club. Check its status later by calling getNominatedFacilities.
Properties
A SharedFlow that emits AFGeofenceEvent instances as geofence transitions occur for the member's monitored facilities.
Functions
Submits a new facility for nomination.
Starts monitoring presence events for the member’s facilities.
Stops monitoring facilities.
Subscribes to geofence transition events for monitored facilities.
Subscribes to live geofencing-status changes. Replays the latest value to the new collector and emits whenever the SDK transitions states (e.g., from PAUSED to ACTIVE once the user grants Always location, or to PERMISSIONS_DENIED if the permission is revoked in Settings).