AtomicX Core API

🚀 AtomicX Core API

Tencent Real-Time Communication SDK Core API Documentation

📋 Overview

AtomicX Core API is an SDK designed based on state management patterns. It manages business logic for each module through Store classes, and each Store provides a corresponding State data class to subscribe to state changes.

🏗️ API Overview

ModuleStoreStateDescription
LoginLoginStoreLoginStateUser login, logout, profile management
CallCallStoreCallStateAudio and video calling
LiveLiveListStoreLiveListStateLive room list management
LiveAudienceStoreLiveAudienceStateAudience state management
LiveSeatStoreLiveSeatStateSeat management
CoGuestStoreCoGuestStateAudience co-streaming management
CoHostStoreCoHostStateHost co-streaming management
BattleStoreBattleStatePK battle management
LikeStoreLikeStateLike management
RoomRoomStoreRoomStateRoom management
RoomParticipantStoreRoomParticipantStateRoom participant management
BarrageBarrageStoreBarrageStateBarrage message management
GiftGiftStoreGiftStateGift sending and receiving
DeviceDeviceStoreDeviceStateCamera, microphone management
AudioEffectStoreAudioEffectStateAudio effect management
BaseBeautyStoreBaseBeautyStateBasic beauty management

🔐 Login Module

LoginStore

Core class for login management, responsible for user login, logout, and profile settings.

Core APIs:

MethodDescription
loginUser login
logoutUser logout
setSelfInfoSet profile information
addLoginListenerAdd login listener
removeLoginListenerRemove login listener

State Subscription (LoginState):

PropertyTypeDescription
loginStatusStateFlow<LoginStatus>Login status
loginUserInfoStateFlow<UserProfile?>Current logged-in user info

Related Types: LoginStatus | UserProfile | Gender | AllowType | LoginListener

📞 Call Module

CallStore

Core class for call management, responsible for initiating, answering, rejecting, hanging up calls, group call management, and call history management.

Core APIs:

MethodDescription
callsInitiate a call
acceptAnswer a call
rejectReject a call
hangupHang up a call
joinJoin a group call
inviteInvite users to join a call
queryRecentCallsQuery call history
deleteRecentCallsDelete call records
addListenerAdd call listener
removeListenerRemove call listener

State Subscription (CallState):

PropertyTypeDescription
activeCallStateFlow<CallInfo>Current active call info
recentCallsStateFlow<LinkedHashSet<CallInfo>>Call history list
cursorStateFlow<String>Pagination cursor
selfInfoStateFlow<CallParticipantInfo>Current user info
allParticipantsStateFlow<LinkedHashSet<CallParticipantInfo>>All participants list
speakerVolumesStateFlow<MutableMap<String, Int>>Participant volume info
networkQualitiesStateFlow<MutableMap<String, NetworkQuality>>Participant network quality

Related Types: CallMediaType | CallEndReason | CallDirection | CallParticipantStatus | CallParams | CallParticipantInfo | CallInfo | CallListener

📺 Live Module

CoGuestStore

Audience co-streaming management, handles co-streaming requests, invitations, acceptance, and rejection between hosts and audiences.

Core APIs:

MethodDescription
applyForSeatApply to take seat
cancelApplicationCancel application
acceptApplicationAccept application
rejectApplicationReject application
inviteToSeatInvite to take seat
cancelInvitationCancel invitation
acceptInvitationAccept invitation
rejectInvitationReject invitation
disconnectDisconnect co-streaming
addHostListenerAdd host-side listener
removeHostListenerRemove host-side listener
addGuestListenerAdd guest-side listener
removeGuestListenerRemove guest-side listener

State Subscription (CoGuestState):

PropertyTypeDescription
connectedStateFlow<List<SeatUserInfo>>Connected users list
inviteesStateFlow<List<LiveUserInfo>>Users invited by host
applicantsStateFlow<List<LiveUserInfo>>Users applying to co-stream
candidatesStateFlow<List<LiveUserInfo>>Co-streaming candidate users

Related Types: HostListener | GuestListener | NoResponseReason | SeatUserInfo | LiveUserInfo

CoHostStore

Host co-streaming management, handles cross-room co-streaming between hosts.

Core APIs:

MethodDescription
requestConnectionRequest connection
cancelRequestCancel request
acceptConnectionAccept connection
rejectConnectionReject connection
disconnectDisconnect

State Subscription (CoHostState):

PropertyTypeDescription
connectedUsersStateFlow<List<LiveUserInfo>>Connected hosts list
sentConnectionRequestsStateFlow<List<LiveUserInfo>>Sent connection requests
receivedConnectionRequestsStateFlow<List<LiveUserInfo>>Received connection requests

BattleStore

PK battle management, handles PK battle logic between hosts.

Core APIs:

MethodDescription
requestBattleRequest PK battle
cancelRequestCancel request
acceptBattleAccept PK battle
rejectBattleReject PK battle
exitBattleExit PK battle

State Subscription (BattleState):

PropertyTypeDescription
isBattlingStateFlow<Boolean>Whether in PK battle
battleUsersStateFlow<List<BattleUserInfo>>PK battle users list
sentBattleRequestsStateFlow<List<LiveUserInfo>>Sent PK requests
receivedBattleRequestsStateFlow<List<LiveUserInfo>>Received PK requests

LiveSeatStore

Seat management, controls seat status in live rooms.

Core APIs:

MethodDescription
takeSeatTake seat
leaveSeatLeave seat
lockSeatLock seat
kickUserOffSeatKick user off seat

State Subscription (LiveSeatState):

PropertyTypeDescription
seatListStateFlow<List<SeatInfo>>Seat list

LiveListStore

Live room list management.

Core APIs:

MethodDescription
fetchLiveListFetch live list
fetchRecommendedListFetch recommended list

State Subscription (LiveListState):

PropertyTypeDescription
liveListStateFlow<List<LiveInfo>>Live list

LiveAudienceStore

Audience state management.

Core APIs:

MethodDescription
joinLiveJoin live room
leaveLiveLeave live room

State Subscription (LiveAudienceState):

PropertyTypeDescription
liveInfoStateFlow<LiveInfo?>Current live info

LikeStore

Like management.

Core APIs:

MethodDescription
likeSend like

State Subscription (LikeState):

PropertyTypeDescription
likeCountStateFlow<Int>Like count

🏠 Room Module

RoomStore

Core class for room management, responsible for room creation, joining, leaving, and scheduling.

Core APIs:

MethodDescription
createAndJoinRoomCreate and join room
joinRoomJoin room
leaveRoomLeave room
endRoomEnd room
scheduleRoomSchedule room
cancelScheduledRoomCancel scheduled room
callUserToRoomCall user to join room
acceptCallAccept call
rejectCallReject call
addRoomListenerAdd room listener
removeRoomListenerRemove room listener

State Subscription (RoomState):

PropertyTypeDescription
currentRoomStateFlow<RoomInfo?>Current room info
scheduledRoomListStateFlow<List<RoomInfo>>Scheduled room list

Related Types: RoomStatus | RoomInfo | RoomUser | RoomCall | RoomListener

RoomParticipantStore

Room participant management, handles participant permissions, device control, message muting, etc.

Core APIs:

MethodDescription
getParticipantListGet participant list
transferOwnerTransfer owner
setAdminSet admin
revokeAdminRevoke admin
kickUserKick user
closeParticipantDeviceClose participant device
disableAllDevicesDisable all devices
disableAllMessagesMute all messages
requestToOpenDeviceRequest to open device
inviteToOpenDeviceInvite to open device

State Subscription (RoomParticipantState):

PropertyTypeDescription
participantListStateFlow<List<RoomParticipant>>Participant list
participantListWithVideoStateFlow<List<RoomParticipant>>Participants with video
participantWithScreenStateFlow<RoomParticipant?>Participant sharing screen
localParticipantStateFlow<RoomParticipant?>Local participant
pendingDeviceApplicationsStateFlow<List<DeviceRequestInfo>>Pending device applications

Related Types: ParticipantRole | RoomParticipant | DeviceRequestInfo | RoomParticipantListener

💬 Barrage Module

BarrageStore

Core class for barrage management, responsible for sending and syncing barrage messages.

Core APIs:

MethodDescription
sendTextMessageSend text barrage
sendCustomMessageSend custom barrage
appendLocalTipAppend local tip message

State Subscription (BarrageState):

PropertyTypeDescription
messageListStateFlow<List<Barrage>>Barrage message list

Related Types: Barrage | BarrageType

🎁 Gift Module

GiftStore

Core class for gift management, handles gift sending and receiving.

Core APIs:

MethodDescription
sendGiftSend gift
refreshUsableGiftsRefresh available gifts list
setLanguageSet gift info display language
addGiftListenerAdd gift event listener
removeGiftListenerRemove gift event listener

State Subscription (GiftState):

PropertyTypeDescription
usableGiftsStateFlow<List<GiftCategory>>Available gift categories

Related Types: Gift | GiftCategory | GiftListener

📱 Device Module

DeviceStore

Core class for device management, controls hardware devices like camera and microphone.

Core APIs:

MethodDescription
openLocalMicrophoneOpen microphone
closeLocalMicrophoneClose microphone
openLocalCameraOpen camera
closeLocalCameraClose camera
switchCameraSwitch front/back camera
switchMirrorSwitch mirror mode
updateVideoQualityUpdate video quality
setAudioRouteSet audio route
setCaptureVolumeSet capture volume
setOutputVolumeSet output volume
startScreenShareStart screen sharing
stopScreenShareStop screen sharing
startCameraTestStart camera test
stopCameraTestStop camera test

State Subscription (DeviceState):

PropertyTypeDescription
microphoneStatusStateFlow<DeviceStatus>Microphone status
microphoneLastErrorStateFlow<DeviceError>Microphone error
cameraStatusStateFlow<DeviceStatus>Camera status
cameraLastErrorStateFlow<DeviceError>Camera error
isFrontCameraStateFlow<Boolean>Is front camera
localMirrorTypeStateFlow<MirrorType>Local mirror type
localVideoQualityStateFlow<VideoQuality>Local video quality
currentAudioRouteStateFlow<AudioRoute>Current audio route
screenStatusStateFlow<DeviceStatus>Screen sharing status
networkInfoStateFlow<NetworkInfo>Network info
captureVolumeStateFlow<Int>Capture volume
outputVolumeStateFlow<Int>Output volume
currentMicVolumeStateFlow<Int>Current mic volume

Related Types: DeviceType | DeviceStatus | DeviceError | AudioRoute | VideoQuality | MirrorType | NetworkQuality | NetworkInfo

AudioEffectStore

Audio effect management, provides voice changer, reverb and other audio effects.

State Subscription (AudioEffectState):

PropertyTypeDescription
changerTypeStateFlow<AudioChangerType>Voice changer type
reverbTypeStateFlow<AudioReverbType>Reverb type
musicVolumeStateFlow<Int>Music volume
voiceVolumeStateFlow<Int>Voice volume
voicePitchStateFlow<Double>Voice pitch

Related Types: AudioChangerType | AudioReverbType

BaseBeautyStore

Basic beauty management, provides whitening, smoothing and other beauty features.

State Subscription (BaseBeautyState):

PropertyTypeDescription
smoothLevelStateFlow<Int>Smooth level
whitenessLevelStateFlow<Int>Whiteness level
ruddyLevelStateFlow<Int>Ruddy level

🖼️ View Module

LiveCoreView

Live core view component, provides live video rendering capability.

CameraView

Camera preview view component.

RoomParticipantView

Room participant video view component, used to display participant video.

Core APIs:

MethodDescription
initInitialize view
updateStreamTypeUpdate video stream type
updateParticipantUpdate participant info
setFillModeSet fill mode
setActiveSet active state

Related Types: VideoStreamType | FillMode

📦 Package Structure

PackageDescription
io.trtc.tuikit.atomicxcore.api.loginLogin related
io.trtc.tuikit.atomicxcore.api.callCall related
io.trtc.tuikit.atomicxcore.api.liveLive related
io.trtc.tuikit.atomicxcore.api.roomRoom related
io.trtc.tuikit.atomicxcore.api.barrageBarrage related
io.trtc.tuikit.atomicxcore.api.giftGift related
io.trtc.tuikit.atomicxcore.api.deviceDevice related
io.trtc.tuikit.atomicxcore.api.viewView components
© 2025 Tencent. All rights reserved.

Packages

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard