startMonitoring

abstract suspend fun startMonitoring(): Boolean

Starts monitoring presence events for the member’s facilities.

This may include real-time updates using geofencing or proximity detection, depending on the active programs for the tenant.

Call stopMonitoring when monitoring is no longer required to release resources.

Throws

if monitoring cannot be started.

Android (Kotlin)

lifecycleScope.launch {
try {
AFCore.facilities().startMonitoring()
} catch (t: Throwable) {
showError("Unable to start monitoring: ${t.message}")
}
}

iOS (Swift)

Task {
do {
try await AFCore.shared.facilities().startMonitoring()
} catch {
self.showError("Unable to start monitoring: \\(error.localizedDescription)")
}
}