connectFitbit

abstract suspend fun connectFitbit()

Connects Fitbit to the member’s SmartWalking profile (OAuth-based).

Throws

if connection fails.

Android (Kotlin)

lifecycleScope.launch {
try {
AFCore.smartWalking().connectFitbit()
showMessage("Fitbit connected")
} catch (t: Throwable) {
showError("Fitbit connection failed: ${t.message}")
}
}

iOS (Swift)

Task {
do {
try await AFCore.shared.smartWalking().connectFitbit()
self.showMessage("Fitbit connected")
} catch {
self.showError("Fitbit connection failed: \\(error.localizedDescription)")
}
}