π€ User API
Access user and profile operations through AzeooSDK.shared.user. Available after connectUser succeeds.
Accessβ
val user: AzeooUser = AzeooSDK.shared.user
Methods (overview)β
- getProfile() β Returns the current user profile (id, name, email, height, weight, etc.)
- getId(), getName(), getEmail(), getHeight(), getWeight(), getGender() β Convenience accessors
- updateProfile(data) β Updates profile; returns updated profile via callback
- refreshProfile() β Refetches profile from the server
- uploadImage(imageData) β Uploads profile image; returns URL via callback
- getSettings() / updateSettings(settings) β User settings
- hasAccess(featureId) β Feature access check
Exact signatures follow the Android SDK implementation. See the API Reference or SDK source for the current method list.
Exampleβ
AzeooSDK.shared.connectUser(
token = jwt,
gender = user.gender,
height = user.height,
weight = user.weight,
) { profile, error ->
if (error != null) return@connectUser
val name = AzeooSDK.shared.user.getName()
val email = AzeooSDK.shared.user.getEmail()
AzeooSDK.shared.user.updateProfile(mapOf("name" to "New Name")) { updateResult ->
updateResult.onSuccess { updated -> /* ... */ }
}
}
Next stepsβ
- Navigation, modules, theme
- SDK entry point β initialize and connectUser