SDK API (Android)
The Azeoo SDK exposes a single entry point, AzeooSDK. After init and connect, you use the same instance to access user, theme, navigation, and the nutrition and training modules.
Entry point
- AzeooSDK.init(...) — Initialize once with context, API key, and optional config (locale, theme, deep links, safe area).
- AzeooSDK.shared — The singleton instance after init.
- connect(userId, token, 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. |
| Training | AzeooSDK.shared.modules.training | getFragment(), getView(), showWorkouts(), showPlans(), showExercises(), etc. |
Quick example
// 1. Init (e.g. in Application)
AzeooSDK.init(context, apiKey, config)
// 2. Connect when user is authenticated
AzeooSDK.shared.connect("user-123", "jwt-token") { result ->
result.onSuccess {
// 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, nutrition, and training modules