Monitoring Interface
| Interface name | Interface description |
|---|---|
| [ICloudCoreManagerStatusListener] (#initialize-the-listening) | Initialize the listening |
| [IPlayerListener] (#monitor-the-playback-status-of-the-pull-stream) | Monitor the playback status of the pull stream |
| [IStreamListener] (#video-stream-status-monitoring) | Video stream status monitoring |
| [StreamProfileChangeCallBack] (#clarity-switching-successfully-monitors) | Clarity switching successfully monitors |
| [SetAutoRecycleTimeCallback] (#no-operation-recovery-service-duration-monitoring) | No operation recovery service duration monitoring |
| [ScreenShotCallBack] (#screenshot-to-local-monitoring) | Screenshot to local monitoring |
| [LocationEventListener] (#location-monitoring) | Location monitoring |
| [IMessageReceiver] (#leaks-and-eavesdropping) | Leaks and eavesdropping |
| [IUploadFileCallBack] (#file-upload-monitoring) | File upload monitoring |
| [IClipBoardListener] (#cloud-machine-clipboard-monitoring) | Cloud machine clipboard monitoring |
| [IExecuteAdbCommandCallback] (#monitor-the-results-of-adb-instructions) | Monitor the results of ADB instructions |
| [IInjectVideoListener] (#video-stream-injection-monitoring) | Video stream injection monitoring |
Initialize the listener
Interface: ICloudCoreManagerStatusListener
Method:
| Method name | Parameters | Description |
|---|---|---|
| onPrepared() | None | Initialization successful, callback |
Monitoring Playback Status for Streaming Pulling
Interface: IPlayerListener
Method:
| Method name | Parameters | Description |
|---|---|---|
| onPlaySuccess(videoStreamProfileId: Int) | videoStreamProfileId: The current clarity of the cloud phone's image; this callback is triggered when the first frame is rendered into the frame | Play successful |
| onError(code: Int, msg: String) | code: error code; msg: Error content | False information |
| onWarning(code: Int, msg: String) | code: warning code; msg: Warning content | Warning information |
| onNetworkChanged(int type) | type: -1: Network connection type unknown; 0: Network connection disconnected; 1: Network type is LAN; 2: Network type is Wi-Fi (including hotspots); 3: Network type: 2G mobile network; 4: Network type: 3G mobile network; 5: Network type: 4G mobile network; 6: Network type: 5G mobile network | Network connection type and status toggle callback |
| onServiceInit(extras: Map<String, Any>?) | extras: Reserved parameters, used to pass on some extra parameters | Pre-room callback, used to obtain and initialize various functional services, such as setting up various event listener callbacks |
| networkQualityRtt(rtt: Int) | RTT: The time it takes for data to travel back and forth between client and server | After joining a room and publishing or subscribing to a stream, report upstream and downstream network quality information for local users and subscribed remote users every 2 seconds |
| onMultiCloudPhoneJoin(padCode: String) | padCode: Cloud machine identifier | In group control mode, cloud phones join group control callbacks |
| onMultiCloudPhoneLeave(padCode: String) | padCode: Cloud machine identifier | In group control mode, the cloud phone leaves and is called back to group control |
Video Stream Status Monitoring
Interface: IStreamListener
Method:
| Method name | Parameters | Description |
|---|---|---|
| onFirstAudioFrame(uid: String) | uid: Remote instance video stream ID | Subscribe to video streaming until the first frame of audio is received |
| onRemoteAudio(byteBuffer: ByteBuffer) | byteBuffer: Audio stream data | Remote audio stream data |
| onFirstRemoteVideoFrame(uid: String, width: Int, height: Int) | uid: Remote instance video stream ID width: Cloud machine screen width height: Cloud machine image height | Subscribe to video streaming until the first frame of the video is received |
| onVideoSizeChanged(uid: String, width: Int, height: Int) | uid: Remote instance video stream ID width: Cloud machine screen width height: Cloud machine image height | Pullback when the cloud phone's screen width and height change |
| onStreamPaused() | None | Calls pause(), the callback after pausing playback |
| onStreamConnectionStateChanged(state: Int) | state@ConnectionState: Video stream connection status | Video stream connection status change callback |
| onScreenRotation(rotationType: String) | rotationType: TYPE_LANDSCAPE (landscape), TYPE_PORTRAIT (portrait) | The cloud phone screen rotates and pulls back |
Clarity switching successfully monitored
Interface: StreamProfileChangeCallBack
Method:
| Method name | Parameters | Description |
|---|---|---|
| onVideoStreamProfileChange(isSuccess: Boolean, from: String, current: String) | isSuccess: (Whether the clarity was successfully switched) from: (Clarity before switching) current: (Current clarity) | Clarity toggle pullback |
No operation for recovery service duration monitoring
Interface: SetAutoRecycleTimeCallback
Method:
| Method name | Parameters | Description |
|---|---|---|
| onResult(autoRecycleTime: Int) | autoRecycleTime: The duration of non-operation recovery service, unit: s | No operation time is set and the method is called back when the set duration is reached |
Screenshot to local monitoring
Interface: ScreenShotCallBack
Method:
| Method name | Parameters | Description |
|---|---|---|
| onScreenShot(bitmap: Bitmap) | bitmap: captures bitmaps of cloud device screens | Call the screenshot to your local area and then call back |
Location Monitoring
Interface: LocationEventListener
Method:
| Method name | Parameters | Description |
|---|---|---|
| onReceivedRemoteLocationRequest(requestOptions: RequestOptions) | options: Location request options | In manual positioning mode, it receives callbacks from cloud phone instance location requests |
| onRemoteLocationRequestEnded() | None | In manual positioning mode, the cloud instance positioning request ends |
| onSentLocalLocation(locationInfo: LocationInfo) | locationInfo: location information | In automatic positioning mode, the callback after sending local device location information to the cloud phone instance |
| onRemoteLocationUpdated(locationInfo: LocationInfo) | locationInfo: location information | Callbacks after cloud instance location updates |
Message Transmission Monitoring
Interface: IMessageReceiver
Method:
| Method name | Parameters | Description |
|---|---|---|
| onReceiveMessage(message: String) | message: Transmitting messages | The transmission message sent by the cloud phone |
File upload monitoring
Interface: IUploadFileCallBack
Method:
| Method name | Parameters | Description |
|---|---|---|
| onUpdateStart() | None | Upload begins |
| onUpdateByteChange(totalByte: Long, updateByte: Long) | totalByte: Total file size updateByte: Current upload size Unit: bytes | File upload size has changed |
| onUpdateProgressChange(progress: Int) | progress: Upload progress | The current file upload progress has changed from 0 to 100 |
| onUpdateSuccess(mapData: Map<String, String>) | mapData: Reserved data | File upload successful |
| onUpdateFail(e: Throwable?) | e: Error message | File upload failed |
| onUpdateEnd() | None | File upload complete |
| onError(code: Int, msg: String) | code: error code msg: error message | File upload failure Other error messages except for file upload errors |
Cloud Phone Clipboard Monitoring
Interface: IClipBoardListener
Method:
| Method name | Parameters | Description |
|---|---|---|
| onClipBoardMessageReceived(data: String) | data: Clipboard data synchronized with the cloud-machine | Clipboard data synchronized with cloud-machine data |
Monitor the results of the ADB instruction
Interface: IExecuteAdbCommandCallback
Method:
| Method name | Parameters | Description |
|---|---|---|
| onExecuteAdbCommandResult(isSuccess: Boolean, content: String) | isSuccess: Whether execution succeeded content: Execution result | Monitor the results of ADB instructions |
Video stream injection monitoring
Interface: IINJECT VideoListener
Method:
| Method name | Parameters | Description |
|---|---|---|
| onInjectCallBack(code: String, content: String) | code: code code content: injected result information | Video stream injection result monitoring |
| onVideoInjectInfo(@VideoInjectState state: Int, videoPath: String?) | state: Current injection status videoPath: Current injected video path | Current video injects information |
VideoInjectState:
| field name | Description |
|---|---|
| STATE_LIVE | In the process of injection |
| STATE_OFFLINE | Not yet injected |