register Movr Profile
Registers a Movr profile for the current user.
Typically called after isMovrProfileRegistered returns false. Once registration succeeds the user can begin logging sessions via submitMovrSessions. Registering an already-registered profile is safe and simply resolves successfully.
Return
true if the profile was registered successfully; false otherwise.
Throws
if registration fails.
Android (Kotlin)
lifecycleScope.launch {
try {
if (AFCore.movementHealth().registerMovrProfile()) {
showMovrDashboard()
} else {
showError("Movr registration failed")
}
} catch (t: Throwable) {
showError("Could not register Movr profile: ${t.message}")
}
}Content copied to clipboard
iOS (Swift)
Task {
do {
let registered = try await AFCore.shared.movementHealth().registerMovrProfile()
registered ? self.showMovrDashboard()
: self.showError("Movr registration failed")
} catch {
self.showError("Could not register Movr profile: \\(error.localizedDescription)")
}
}Content copied to clipboard