Skip to main content

Movement Health

Movement Health connects members to movr, a partner experience with guided routines and short movement exercises ("movement snacks") through the day. AFCore links the member to movr and reports the sessions they complete, which then appear in the member's activity history; the routines themselves come from the movr SDK, which your app embeds alongside AFCore. Requires Movement Health to be enabled for your client.


What you can do​

  • Check whether the member already has a movr profile.
  • Link the member to movr and get the id your app configures the movr SDK with.
  • Report completed sessions so they count toward the member's activity.

Key APIs​

CallWhat it is for
isMovrProfileRegistered()Whether the member is already linked to movr
registerMovrProfile()Links the member and returns their movr id
submitMovrSessions(sessions)Reports the sessions the member completed

lifecycleScope.launch {
try {
// Links the member; calling it again returns the same id
val movrId = AFCore.movementHealth().registerMovrProfile()
if (movrId != null) startMovrSdk(userId = movrId) else showUnavailable()

// Later, when the movr SDK reports completed sessions
val result = AFCore.movementHealth().submitMovrSessions(sessions = completedCount)
if (!result.status) showError(result.statusMessage)
} catch (t: Throwable) {
showError(t)
}
}

Learn more​

  • API Reference -- every Movement Health call and model.
  • Complete integration guides for Movement Health and the movr SDK are in AIDE Docs.