Skip to main content

Run the Android Sample

The Android sample is a Jetpack Compose app that uses AFCore and AFCoreUI for Compose the way a production app would.

git clone https://github.com/AdvantaHealth/AFCore.git
cd AFCore
./gradlew :sample:android:assembleDebug # or open the project in Android Studio

In Android Studio, select the sample.android run configuration and run it on an emulator (API 26+) or a device. Maps need a Google Maps API key in the sample's strings.xml; the app builds without one, but map tiles stay blank.

Signing in​

On first launch the app starts on QA by itself, with no keys to enter, and offers:

  • Sign in -- username and password, with a Bismuth / Horizon realm selector.
  • Sign in with External ID -- asks for your organization's Client ID and Client Secret from AIDE → API Keys at that step.
  • Inject tokens (advanced) -- a token pair issued by your backend.

Change under the sign-in methods points the app at another base URL or realm. Sign out keeps the environment and clears everything that belonged to the member.

What's wired up​

  • Initialization, sign-in, session state and onboarding.
  • Profile, programs and the activity calendar, including pending (offline) visits.
  • Favorites, visit detection, a clustered facility map, nominations and problem reports.
  • SmartWalking, Mental Fitness, Self-Report, barcode check-in, Fit@Home and permissions.
  • ActivePerks (from Explore) and server-driven content (content() next to userInterface()).
  • Push notifications with deep links.

To run without a QA backend, use local mode.

Learn more​

See the API Reference. Complete integration guides are in AIDE Docs.