ARMCLOUD Documentation Center
  • 简体中文
  • English
  • 简体中文
  • English
  • Product introduction
  • Product billing
  • Server OpenAPI
    • Usage Guide
    • API Signature v1.0
    • API Reference
    • Error Codes
    • Callback Business Type Codes
    • Instance List
    • Android Instance Property List
    • Changelog
  • Android SDK
    • Example Setup
    • Interface Description
    • Callback Function
    • Error Code
    • Changelog
  • Web H5 SDK
    • Example Setup
    • Interface Description
    • Callback Function
    • Error Code
    • Changelog
  • Windows PC SDK
    • Example Setup
    • Interface Description
    • Callback Function
    • Changelog
  • Edge-Cloud Communication Development
    • AIDL Access Method
    • System Service API (AIIDL)
  • Scenario solutions
    • XP-like LSP Hook framework
    • Dynamic simulation of sensor data
  • ADI Collection Tool
  • FAQ
    • Platform Basics
    • Storage
    • Network Connectivity
    • Application Management
    • Development and Integration
    • Performance Optimization
    • Billing
    • Technical Support
  • Related agreements
    • Cloud Phone SDK Privacy Policy

Monitoring Interface

Interface nameInterface 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 nameParametersDescription
onPrepared()NoneInitialization successful, callback

Monitoring Playback Status for Streaming Pulling

Interface: IPlayerListener

Method:

Method nameParametersDescription
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 framePlay successful
onError(code: Int, msg: String)code: error code; msg: Error contentFalse information
onWarning(code: Int, msg: String)code: warning code; msg: Warning contentWarning 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 networkNetwork connection type and status toggle callback
onServiceInit(extras: Map<String, Any>?)extras: Reserved parameters, used to pass on some extra parametersPre-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 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 every 2 seconds
onMultiCloudPhoneJoin(padCode: String)padCode: Cloud machine identifierIn group control mode, cloud phones join group control callbacks
onMultiCloudPhoneLeave(padCode: String)padCode: Cloud machine identifierIn group control mode, the cloud phone leaves and is called back to group control

Video Stream Status Monitoring

Interface: IStreamListener

Method:

Method nameParametersDescription
onFirstAudioFrame(uid: String)uid: Remote instance video stream IDSubscribe to video streaming until the first frame of audio is received
onRemoteAudio(byteBuffer: ByteBuffer)byteBuffer: Audio stream dataRemote 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()NoneCalls pause(), the callback after pausing playback
onStreamConnectionStateChanged(state: Int)state@ConnectionState: Video stream connection statusVideo 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 nameParametersDescription
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 nameParametersDescription
onResult(autoRecycleTime: Int)autoRecycleTime: The duration of non-operation recovery service, unit: sNo operation time is set and the method is called back when the set duration is reached

Screenshot to local monitoring

Interface: ScreenShotCallBack

Method:

Method nameParametersDescription
onScreenShot(bitmap: Bitmap)bitmap: captures bitmaps of cloud device screensCall the screenshot to your local area and then call back

Location Monitoring

Interface: LocationEventListener

Method:

Method nameParametersDescription
onReceivedRemoteLocationRequest(requestOptions: RequestOptions)options: Location request optionsIn manual positioning mode, it receives callbacks from cloud phone instance location requests
onRemoteLocationRequestEnded()NoneIn manual positioning mode, the cloud instance positioning request ends
onSentLocalLocation(locationInfo: LocationInfo)locationInfo: location informationIn automatic positioning mode, the callback after sending local device location information to the cloud phone instance
onRemoteLocationUpdated(locationInfo: LocationInfo)locationInfo: location informationCallbacks after cloud instance location updates

Message Transmission Monitoring

Interface: IMessageReceiver

Method:

Method nameParametersDescription
onReceiveMessage(message: String)message: Transmitting messagesThe transmission message sent by the cloud phone

File upload monitoring

Interface: IUploadFileCallBack

Method:

Method nameParametersDescription
onUpdateStart()NoneUpload begins
onUpdateByteChange(totalByte: Long, updateByte: Long)totalByte: Total file size updateByte: Current upload size Unit: bytesFile upload size has changed
onUpdateProgressChange(progress: Int)progress: Upload progressThe current file upload progress has changed from 0 to 100
onUpdateSuccess(mapData: Map<String, String>)mapData: Reserved dataFile upload successful
onUpdateFail(e: Throwable?)e: Error messageFile upload failed
onUpdateEnd()NoneFile upload complete
onError(code: Int, msg: String)code: error code msg: error messageFile upload failure Other error messages except for file upload errors

Cloud Phone Clipboard Monitoring

Interface: IClipBoardListener

Method:

Method nameParametersDescription
onClipBoardMessageReceived(data: String)data: Clipboard data synchronized with the cloud-machineClipboard data synchronized with cloud-machine data

Monitor the results of the ADB instruction

Interface: IExecuteAdbCommandCallback

Method:

Method nameParametersDescription
onExecuteAdbCommandResult(isSuccess: Boolean, content: String)isSuccess: Whether execution succeeded content: Execution resultMonitor the results of ADB instructions

Video stream injection monitoring

Interface: IINJECT VideoListener

Method:

Method nameParametersDescription
onInjectCallBack(code: String, content: String)code: code code content: injected result informationVideo stream injection result monitoring
onVideoInjectInfo(@VideoInjectState state: Int, videoPath: String?)state: Current injection status videoPath: Current injected video pathCurrent video injects information

VideoInjectState:

field nameDescription
STATE_LIVEIn the process of injection
STATE_OFFLINENot yet injected
Prev
Interface Description
Next
Error Code