Skip to main content

AFCore Documentation

AFCore is the Kotlin Multiplatform SDK behind health and wellness apps built on the Advanta Health platform. One shared business-logic layer ships as native artifacts for Android, iOS and watchOS, so your app gets the same member experience and the same behavior on every platform.

AFCore 1.12

The current release is 1.12.1, with fixes for 1.12.0. AFCore 1.12 adds the locations(), content() and activePerks() modules, member-safe error messages and the realm setting for Horizon apps, and has breaking changes -- see Upgrading to 1.12.

What you can do​

  • Sign members in with username and password, an external identity from your SSO, or tokens issued by your backend.
  • Read member data: profile, programs and entitlements, monthly activity and goals.
  • Credit activity automatically: gym visits through visit detection, steps through Apple Health and Health Connect, plus self-reports, barcode check-ins and Fit@Home selfies.
  • Find places: favorites, nearby and map search, nominations of new locations.
  • Render server-driven content: bottom navigation, home banners and the Explore menu, localized.
  • Offer rewards and premium programs such as ActivePerks, Mental Fitness and MyCarePath, gated by the member's entitlements.
  • Keep working offline: submissions made without a connection are delivered automatically when the device is back online.

Getting access​

The SDK is gated through the AIDE Developer Portal, a separate Advanta Health product for account access, API keys, member rosters and support. Before you integrate, your team needs an AIDE account, API credentials for your organization and a configured member roster -- your Advanta Health Account Manager can set these up.

At a glance​

val config = AFCoreConfig.builder()
.baseUrl("https://api.example.com")
.build()
AFCore.initialize(config)

val result = AFCore.authentication().authenticateWithCredentials(username, password)
if (result.status) {
val programs = AFCore.programs().getAvailablePrograms()
}

Apps whose members are on the Horizon platform also set the realm -- see Initialization.

Where to go next​

SectionUse it when
Getting StartedYou want the integration steps in order
InstallationYou are adding the SDK to an Android or iOS project
Upgrading to 1.12You are moving an app from 1.11
Core ConceptsYou want the lifecycle, session and error model
EntitlementsYou are wiring up a product feature such as Gym Visits or SmartWalking
Sample AppsYou would rather read working code first
UI ComponentsYou want themed SwiftUI / Compose building blocks
API ReferenceYou need the full Kotlin/Swift symbol surface

Learn more​

The API Reference documents every public type and method. Complete integration guides are in AIDE Docs. For help, use the AIDE Developer Portal, email support@advantahealth.com or contact your Account Manager.