SDK API (Android)
The Azeoo SDK exposes a single entry point, AzeooSDK. After initialize and connectUser, you use the same instance to access user, theme, navigation, and the nutrition module.
Entry pointβ
- AzeooSDK.initialize(...) β Initialize once with context, API key, and optional config (locale, theme, deep links, safe area).
- AzeooSDK.shared β The singleton instance after initialize.
- connectUser(token, gender, height, weight, callback) β Attach a user; required before using modules or user API.
- onReady(callback) β Callback when Flutter-side initialization is complete.
API surfaceβ
| Area | Access | Purpose |
|---|---|---|
| User | AzeooSDK.shared.user | Profile, getProfile, updateProfile, refreshProfile, etc. |
| Theme | AzeooSDK.shared.theme | setMode, setPrimaryColor, setLightMode, setDarkMode, getCurrentTheme, etc. |
| Navigation | AzeooSDK.shared.navigation | to(), back(), backToRoot(), handleDeepLink(), getCurrentRoute() |
| Nutrition | AzeooSDK.shared.modules.nutrition | getFragment(), getView(), showDiary(), showPlans(), showScanner(), etc. |
Quick exampleβ
// 1. Init (e.g. in Application)
AzeooSDK.initialize(
context = context,
apiKey = apiKey,
config = config,
) { initError ->
if (initError != null) return@initialize
}
// 2. Connect when user is authenticated
AzeooSDK.shared.connectUser(
token = "user-token",
gender = "male",
height = AzeooHeight(178.0),
weight = AzeooWeight(75.0),
) { _, error ->
if (error == null) {
// 3. Use modules
val fragment = AzeooSDK.shared.modules.nutrition.getFragment()
// or: AzeooSDK.shared.modules.nutrition.showDiary(null)
// 4. User API
val profile = AzeooSDK.shared.user.getProfile()
// 5. Theme
AzeooSDK.shared.theme.setDarkMode()
}
}
Next stepsβ
- User API β Profile and user operations
- Theme and modules β Theme and nutrition module