VMOS Cloud API
  • 简体中文
  • English
  • 简体中文
  • English
  • Product Introduction
  • Product Type
  • Product Billing
  • OpenAPI
    • User Guide
    • API Documentation
    • Error Code
    • Instance Property List
    • Android device modification attribute list
    • Callback Task Business Type Codes
    • Changelog
  • Android SDK
    • Example Construction
    • API Documentation
    • Callback Functions
    • Error Code
    • Changelog
  • Web H5 SDK
    • Example Build
    • API Documentation
    • H5 SDK Callback Functions
    • Error Code
    • Change log
  • Windows PC SDK
    • Example Setup
    • API Documentation
    • Callback Functions
    • Changelog
  • Edge-Cloud Communication Development
    • AIDL Integration Method
    • System Service API (AIDL)
  • Similar to XP, LSP Hook framework

    • Xposed-like / LSPosed Framework
    • Sensor Data Dynamic Simulation
  • Related agreements

Listener Interfaces

Interface NameInterface Description
ICloudCoreManagerStatusListenerInitialization listener
IPlayerListenerStream playback status listener
IStreamListenerVideo stream status listener
StreamProfileChangeCallBackResolution change success listener
SetAutoRecycleTimeCallbackIdle recycle service time listener
ScreenShotCallBackLocal screenshot listener
LocationEventListenerLocation listener
IMessageReceiverMessage passthrough listener
IUploadFileCallBackFile upload listener
IClipBoardListenerCloud phone clipboard listener
IExecuteAdbCommandCallbackADB command execution result listener

Initialization Listener

Interface: ICloudCoreManagerStatusListener

Methods:

Method NameParametersDescription
onPrepared()NoneInitialization success callback

Stream Playback Status Listener

Interface: IPlayerListener

Methods:

Method NameParametersDescription
onPlaySuccess(videoStreamProfileId: Int)videoStreamProfileId: Current cloud phone resolutionTriggered when the first frame is rendered to the screen (playback success)
onError(code: Int, msg: String)code: Error code; msg: Error messageError information
onWarning(code: Int, msg: String)code: Warning code; msg: Warning messageWarning information
onNetworkChanged(type: Int)type: -1: Unknown network type; 0: Network disconnected; 1: LAN; 2: Wi-Fi (including hotspot); 3: 2G mobile; 4: 3G mobile; 5: 4G mobile; 6: 5G mobileNetwork type and status change callback
onServiceInit(extras: Map<String, Any>?)extras: Reserved parameters for passing additional dataCalled before joining the room; used to obtain and initialize various services (e.g., setting event listeners)
networkQualityRtt(rtt: Int)rtt: Round-trip time for data between client and serverAfter joining the room and publishing/subscribing streams, reports local and remote user network quality every 2 seconds
onMultiCloudPhoneJoin(padCode: String)padCode: Cloud phone identifierIn multi-control mode, callback when a cloud phone joins the group
onMultiCloudPhoneLeave(padCode: String)padCode: Cloud phone identifierIn multi-control mode, callback when a cloud phone leaves the group

Video Stream Status Listener

Interface: IStreamListener

Methods:

Method NameParametersDescription
onFirstAudioFrame(uid: String)uid: Remote instance video stream IDCallback when first audio frame is received after subscribing to stream
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 phone screen width
height: Cloud phone screen height
Callback when first video frame is received after subscribing to stream
onVideoSizeChanged(uid: String, width: Int, height: Int)uid: Remote instance video stream ID
width: Cloud phone screen width
height: Cloud phone screen height
Callback when cloud phone screen resolution changes
onStreamPaused()NoneCallback after calling pause() to pause playback
onStreamConnectionStateChanged(state: Int)state@ConnectionState: Video stream connection stateVideo stream connection state change callback
onScreenRotation(rotationType: String)rotationType: TYPE_LANDSCAPE (landscape), TYPE_PORTRAIT (portrait)Callback when cloud phone screen rotates

Resolution Change Success Listener

Interface: StreamProfileChangeCallBack

Methods:

Method NameParametersDescription
onVideoStreamProfileChange(isSuccess: Boolean, from: String, current: String)isSuccess: Whether resolution switch succeeded
from: Previous resolution
current: Current resolution
Resolution change callback

Idle Recycle Service Time Listener

Interface: SetAutoRecycleTimeCallback

Methods:

Method NameParametersDescription
onResult(autoRecycleTime: Int)autoRecycleTime: Idle recycle time in secondsCallback triggered when idle time reaches the set duration

Local Screenshot Listener

Interface: ScreenShotCallBack

Methods:

Method NameParametersDescription
onScreenShot(bitmap: Bitmap)bitmap: Bitmap of captured cloud phone screenCallback after taking screenshot to local

Location Listener

Interface: LocationEventListener

Methods:

Method NameParametersDescription
onReceivedRemoteLocationRequest(requestOptions: RequestOptions)options: Location request optionsIn manual location mode, callback when receiving location request from cloud phone
onRemoteLocationRequestEnded()NoneIn manual location mode, when cloud phone ends location request
onSentLocalLocation(locationInfo: LocationInfo)locationInfo: Location informationIn auto location mode, callback after sending local device location to cloud phone
onRemoteLocationUpdated(locationInfo: LocationInfo)locationInfo: Location informationCallback after cloud phone location is updated

Message Passthrough Listener

Interface: IMessageReceiver

Methods:

Method NameParametersDescription
onReceiveMessage(message: String)message: Passthrough message bodyPassthrough message sent from cloud phone

File Upload Listener

Interface: IUploadFileCallBack

Methods:

Method NameParametersDescription
onUpdateStart()NoneUpload started
onUpdateByteChange(totalByte: Long, updateByte: Long)totalByte: Total file size
updateByte: Current uploaded size (bytes)
Callback when uploaded bytes change
onUpdateProgressChange(progress: Int)progress: Upload progressCallback when upload progress changes (0 ~ 100)
onUpdateSuccess(mapData: Map<String, String>)mapData: Reserved dataFile upload succeeded
onUpdateFail(e: Throwable?)e: Error informationFile upload failed
onUpdateEnd()NoneUpload ended
onError(code: Int, msg: String)code: Error code
msg: Error message
Upload failed due to errors other than file upload issues

Cloud Phone Clipboard Listener

Interface: IClipBoardListener

Methods:

Method NameParametersDescription
onClipBoardMessageReceived(data: String)data: Clipboard data synced from cloud phoneClipboard data synced from cloud phone

ADB Command Execution Result Listener

Interface: IExecuteAdbCommandCallback

Methods:

Method NameParametersDescription
onExecuteAdbCommandResult(isSuccess: Boolean, content: String)isSuccess: Whether execution succeeded
content: Execution result
ADB command execution result listener
Prev
API Documentation
Next
Error Code