Browse SDKs · HarmonyOS
Platform
SDKsHarmonyOSEnterprise

User overview

Understand user profiles, account-level preferences, and online presence in the OpenIM HarmonyOS SDK.

Copy

OpenIMClientSDK uses userID as the unique user identifier. The user domain manages personal profiles, public profiles of other users, global notification settings, friend application permissions, and online presence. Friendships, friend applications, and blocklists belong to the relationship domain, whereas group-specific nicknames and role levels belong to the group domain.

Data models

ModelPurpose
IMUserAccount-level and public profile information for self and other users.
IMFriendFriend relationship record, including private remarks and relationship extensions.
IMBlackBlocklist entry maintained by the current account.
IMGroupMemberGroup-specific nickname, avatar, role level, and mute status.
UserOnlinePlatformPlatform presence details for online users.

A single user can appear simultaneously across multiple data sources. Contact lists should prioritize friend remarks, group rosters should display group member nicknames, and conversation headers should use showName. Never overwrite context-specific display labels with public nicknames.

Common operations

Query APIs establish initial data snapshots, while event listeners merge incremental updates in real time. Remember that API Promise resolution, asynchronous event arrival, and post-reconnection reconciliation represent three distinct stages.