π Android Quick Start
Six steps from zero to nutrition UI.
Prerequisitesβ
- Android Studio, minSdk 21+
- API key from Client Platform
- Integration checklist
Step 1: Install the SDKβ
Download the AAR from Downloads (version 1.0.9 recommended) and set up local Maven β Installation guide.
In app/build.gradle.kts:
implementation("com.azeoo:sdk:1.0.9")
Required β NDK ABI filters
Before you run the app, add ndk.abiFilters in app/build.gradle.kts (your host app, not optional). See Installation β Step 4b for the exact snippet and why it is required.
Step 2: Initialize in Application or Activityβ
import com.azeoo.sdk.AzeooConfig
import com.azeoo.sdk.AzeooDeepLinkConfig
import com.azeoo.sdk.AzeooSDK
import com.azeoo.sdk.AzeooSafeAreaConfig
private fun initializeSDK() {
val config = AzeooConfig(
locale = "en",
analyticsEnabled = true,
offlineEnabled = true,
connectionTimeoutSeconds = 30L,
persistSession = true,
)
val deepLinks = AzeooDeepLinkConfig(scheme = "https", host = "azeoo.com")
val safeArea = AzeooSafeAreaConfig(top = true, bottom = true, left = true, right = true)
AzeooSDK.initialize(
context = applicationContext,
apiKey = "YOUR_API_KEY",
config = config,
theme = themeConfig, // optional β see ThemeHelper in example
deepLinks = deepLinks,
safeArea = safeArea,
) { error ->
if (error != null) { /* show error UI */ return@initialize }
// Show login / connect UI
}
}
Use initialize, not init
Use initialize, not init. Wait for the callback before connectUser.
Step 3: Connect when user is logged inβ
Pass a User JWT created by your backend. See Creating the User JWT for the payload spec and backend code examples.
AzeooSDK.shared.connectUser(
token = userJwt, // JWT from YOUR backend β see link above
gender = user.gender,
height = user.height,
weight = user.weight,
) { profile, error ->
if (error != null) return@connectUser
// profile?.id is the Azeoo user id β navigate to main UI
}
Do not pass userId β it comes back in profile.
Step 4: Embed nutrition Fragmentβ
val fragment = AzeooSDK.shared.modules.nutrition.getFragment(bottomSafeArea = false)
childFragmentManager
.beginTransaction()
.replace(R.id.flutter_container, fragment)
.commitNow()
Training: modules.training.getFragment(...).
Step 5: Tab bar sync (optional)β
If you use bottom navigation:
sdk.setModuleContainer(
AzeooBottomNavCoordinator(
bottomNav = bottomNavigation,
mapping = mapOf(
AzeooDestination.Module.NUTRITION to R.id.nav_nutrition,
AzeooDestination.Module.TRAINING to R.id.nav_training,
),
)
)
See Navigation and the destination catalogue.
Step 6: Logoutβ
AzeooSDK.shared.disconnect { }
Full teardown: dispose() then initialize again.
Next stepsβ
- Creating the User JWT β payload spec and backend code
- Configuration
- UI components
- Examples