WuKongIM Docs

HarmonyOS SDK

Integrate the full @wukong/wkim 1.1.7 SDK into a HarmonyOS NEXT application.

@wukong/wkim is the full HarmonyOS NEXT SDK. It owns the persistent connection, message transport, local messages, conversations, and channel metadata. Your application owns login, tokens, routing, and application HTTP APIs.

If Channel, Conversation, or provider is unfamiliar, begin with Core concepts.

What the SDK and your application own

CapabilitySDKYour application
Login identityConnect with a UID and tokenAuthenticate with your backend and obtain the UID and token
Persistent connectionConnection, heartbeat, reconnect, and protocol handlingSupply a reachable host:port
MessagesLocal persistence, sending, receiving, and state updatesChat UI, application payloads, and failure handling
ConversationsStore the chat list and unread countsSupply the multi-device conversation API
ChannelsCache user and group metadataSupply user, group, and member APIs
MediaManage the media-message send flowUpload files and return downloadable URLs

Import paths

The package root currently exports only WKIM:

import { WKIM } from '@wukong/wkim'

WKChannel, state constants, and message payloads require imports from @wukong/wkim/src/main/ets/.... The following guides include the complete paths. Recompile those imports after an SDK upgrade to catch package-layout changes.

The recommended path is Quickstart → Connection → Messages → Conversations → Channels → Advanced. Open the API reference when you need a method lookup.

On this page