Listening to interfaces

interface nameinterface description
ICloudCoreManagerStatusListenerInitializeListener
IPlayerListenerPullStreamPlayStateListener
IStreamListenerVideoStreamStatusListener
StreamProfileChangeCallBackClaritySwitchSuccessListener
SetAutoRecycleTimeCallbackNoAutoRecycleServiceTimeListener
ScreenShotCallBackScreenshot to local listener
LocationEventListenerLocationEventListener
IMessageReceiverMessage Passthrough Listener
IUploadFileCallBackFile upload monitoring
IClipBoardListenerCloud Clipboard Listener

Listening to interfaces

Initialize listener

Interface: ICloudCoreManagerStatusListener
method:
Method NameParametersDescription
onPrepared()NoneInitialization success callback

Pull stream playback status listening

Interface: IPlayerListener
method:
Method NameParametersDescription
onPlaySuccess(videoStreamProfileId: Int)videoStreamProfileId: the clarity of the current cloud phone screen, the callback is triggered when the first frame is rendered to the screenPlay Success
onError(code: Int, msg: String)code: Error code; msg: Error contentError messages
onWarning(code: Int, msg: String)code: warning code; msg: warning contentwarning message
onNetworkChanged(int type)type: -1: Network connection type is unknown; 0: Network connection has been disconnected; 1: Network type is LAN; 2: Network type is Wi-Fi (including hotspot); 3: Network type is 2G mobile; 4: Network type is 3G mobile; 5: Network type is 4G mobile; 6: Network type is 5G mobileNetwork type and status switch callback
onServiceInit(extras: Map<String, Any>?)extras: reserved parameters, used to passthrough some extra parameterspre-join room callback, used to get and initialize each functional service, such as setting up various event listeners
networkQualityRtt(rtt: Int)rtt: the time it takes for data to go back and forth between the client and the serverAfter joining a room and publishing or subscribing to a stream, report upstream and downstream network quality information for local users and subscribed remote users at a frequency of every 2 seconds
onMultiCloudPhoneJoin(padCode: String)padCode: CloudPhoneIdentifierCloudPhoneJoinGroupControlCallback in GroupControl state
onMultiCloudPhoneLeave(padCode: String)padCode: CloudPhoneIdentifierCloudPhoneLeaveGroupControlCallback in GroupControl state

Video Streaming Status Listening

Interface: IStreamListener
method:
Method NameParametersDescription
onFirstAudioFrame(uid: String)uid: remote instance video stream IDsubscribe to video stream to receive audio first frame callback
onFirstRemoteVideoFrame(uid: String, width: Int, height: Int)uid: Remote Instance Video Stream ID
width: Width of the cloud machine frame
height: Height of the cloud machine frame
Subscribing to a video stream to receive the first frame of the video Callbacks
onVideoSizeChanged(uid: String, width: Int, height: Int)uid: Remote Instance Video Stream ID
width: Width of the cloud machine screen
height: Height of the cloud machine screen
Callback when the width or height of the cloud machine screen changes
onStreamPaused()Nonecall pause(), callback after pausing playback
onStreamConnectionStateChanged(state: Int)state@ConnectionState: VideoStreamConnectionStateVideoStreamConnectionStateChangedCallback
onScreenRotation(rotationType: String)rotationType: TYPE_LANDSCAPE(HORIZONTAL), TYPE_PORTRAIT(VERTICAL)Callbacks for when a rotation occurs on the screen of the cloud machine

Sharpness Switching Successful Listening

Interface: StreamProfileChangeCallBack
Methods.
Method NameParametersDescription
onVideoStreamProfileChange(isSuccess: Boolean, from: String, current: String)isSuccess: (whether or not the clarity was successfully switched) from: (the clarity before the switch) current: (the current clarity)Clarity Switching Callbacks

No Action Recycling Service Duration Listening

Interface: SetAutoRecycleTimeCallback
Methods.
Method NameParametersDescription
onResult(autoRecycleTime: Int)autoRecycleTime: no-operation recycling service duration Unit sCallback this method after the no-operation duration reaches the set duration

Screenshot to local listener

Interface: ScreenShotCallBack
Methods.
Method NameParametersDescription
onScreenShot(bitmap: Bitmap)bitmap: Bitmap of the screen of the intercepted cloud machineCallback after calling screenshot to local

Positioning listener

Interface: LocationEventListener
Methods.
Method NameParametersDescription
onReceivedRemoteLocationRequest(requestOptions: RequestOptions)options: location request optionsCallback for receiving a location request for a cloud instance in manual location mode
onRemoteLocationRequestEnded()NoneIn manual location mode, the cloud instance location request ended
onSentLocalLocation(locationInfo: LocationInfo)locationInfo: LocationInfoCallback after sending local device location information to the cloud instance in auto-location mode
onRemoteLocationUpdated(locationInfo: LocationInfo)locationInfo: LocationInfoCallback after cloud instance location update

Message passthrough listener

Interface: IMessageReceiver
Methods.
Method NameParametersDescription
onReceiveMessage(message: String)message: the body of the passthrough messagepassthrough message from the cloud machine

File Upload Listener

Interface: IUploadFileCallBack
Methods.
Method NameParametersDescription
onUpdateStart()noneUploadStart
onUpdateByteChange(totalByte: Long, updateByte: Long)totalByte: total file size updateByte: current upload size Unit: bytesfile upload size changed
onUpdateProgressChange(progress: Int)progress: upload progressFile current upload progress change 0 ~ 100
onUpdateSuccess(mapData: Map<String, String>)mapData: reserved dataFile upload success
onUpdateFail(e: Throwable?)e: Error MessageFile Upload Fail
onUpdateEnd()NoneEnd of file upload
onError(code: Int, msg: String)code: Error code msg: Error messageFile Upload Failed Error message other than file upload error

Cloud Clipboard Listening

Interface: ICLipBoardListener
Methods.
Method NameParametersDescription
onClipBoardMessageReceived(data: String)data: Clipboard data synchronized by cloud machineClipboard data synchronized by cloud machine