Browse SDKs · Android
Platform
SDKsAndroidIncludes Enterprise features

User overview

Understand current user profiles, public profiles, account settings, and presence management in the OpenIM Android SDK.

Copy

The OpenIM Android SDK identifies users through unique userID values. User APIs read and update the current user's profile, retrieve public user information, and subscribe to real-time online presence states.

Friend relationships, friend applications, and blocklists belong to relationship management; for their associated data types, APIs, and state updates, see Relationship overview.

User data models

The Android SDK uses distinct data models tailored to different application contexts:

ClassApplication scenarioPrimary operations
LocalUserThe authenticated user's profile, settings screens, avatar, nickname, and account preferences.Get current user profile, Update the current user profile
PublicUserInfoQuerying application users and presenting public profile cards.Get user profiles
UsersOnlineStatusOnline presence, connection status, and active platform lists.Subscribe to user status, Refresh subscribed user status, Unsubscribe from user status

LocalUser represents the authenticated user, whereas PublicUserInfo models queryable public contact profiles. Group member profiles, in-group nicknames, and member moderation belong to group capabilities.

TaskDocumentation page
Query public profiles by userID to display contact cardsGet user profiles
Retrieve or update the current user's nickname, avatar, and custom extensionsGet current user profile, Update the current user profile
Set account-level message reception and notification rulesSet global message reception
Configure how incoming friend requests are evaluatedSet friend request permissions
Subscribe to, query, and cancel user online presenceSubscribe to user status, Refresh subscribed user status, Unsubscribe from user status
Manage friends, applications, or blocklistsRelationship overview

State updates

The Android SDK's UserInfoManager retains a single listener instance. Register OnUserListener centrally within an application event manager, and merge local cached user state using userID as the unique key before dispatching updates to UI observers: