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

Overview of SDK Callbacks

Cloud Phone Callback (SessionObserver)

Interface nameInterface description
[onConnected] (#connection-successful-callback)Network connection successful
[onDisconnected] (#connection-disconnect-and-callback)The network is disconnected
[onClose] (#connection-closes-the-callback)The network remote is shut down
[onScreenChange] (#resolution-change-callback)Receives callbacks to cloud phone width, height, and angle changes
[onClipboardMessage] (#shear-board-pullback)Clipboard data callbacks returned by the cloud phone real column
[onFirstVideoFrame] (#the-first-frame-of-the-video-is-called-back)Launch the cloud phone real stream and subscribe to the video stream to pullback the first frame of the video
[onLocalScreenshot] (#local-screenshot-pullback)Callback of video frames after calling screenshot(true).
[onNetworkQuality] (#network-status-pullback)Current network status pullback
[onIdeTimeout] (#idle-time-outtime-tunes)Currently, there is no operation timeout callback in the cloud phone real list
[onError] (#error-callback)Currently, the cloud phone has an error callback
[onCameraChanged] (#camera-status-pullback)Currently, the cloud phone camera status has reverted

Video Frame Callback (VideoRenderSink)

Interface nameInterface description
[onFrame] (#video-frame-callback)Video frame callback

Batch Pull Flow Callback (BatchControlObserver)

Interface nameInterface description
[onBatchPodStartResult] (#batch-pull-results-are-pullback)Batch pull results are pullback
[onError] (#batch-pulling-error-callback)Batch pulling error callback

Video Frame

Interface nameInterface description
[width] (#video-frame-width)Video frame width, unit: PX
[height] (#video-frame-height)Video frame height, unit: px
[rotation] (#video-frame-rotation-angle)Video frame rotation angles (0°, 90°, 180°, 270°)
[buffer] (#video-frame-data)Video frame data
[size] (#video-frame-size)Video frame size

Detailed explanation of SDK callbacks

Connection successful, callback

Description: Network connection successful Syntax:

void onConnected()

Disconnect and pullback back

Description: Network disconnected Syntax:

void onDisconnected()

Connection Closes Callback

Description: Network remote shutdown end Syntax:

void onClose()

Resolution change callback

Description: Received cloud device width and height Syntax:

void onScreenChange(int width, int height, int rotation)
ParametersDescription
widthCloud machine width
heightCloud machine height
rotationCloud machine rotation angle

Shear board pullback

Description: Clipboard data callback received from a cloud phone real column Syntax:

void onClipboardMessage(const std::string& text)
ParametersDescription
textCloud phone clipboard text, UTF-8 encoded

First frame recall of video

Description: Launch the cloud phone real-frame account and call back the first frame of the video after subscribing to the video stream Syntax:

void onFirstVideoFrame()

Local screenshot pullback

Description: Video frame callback after calling screenshot(true). Syntax:

void onLocalScreenshot(std::shared_ptr<VideoFrame>& frame)
InterfaceDescription
frameVideo frame callback, refer to VideoFrame

Network status pullback

Description: Current network status callback Syntax:

void onNetworkQuality(int rtt)
ParametersDescription
rttNetwork latency

Idle timeout pullback

Description: Currently, there is no operation timeout callback in the cloud phone real column Syntax:

void onIdeTimeout()

Cloud Phone Error Callback

Description: Currently, there is no operation timeout callback in the cloud phone real column Syntax:

void onError(int error, const std::string& msg)
ParametersDescription
errorError code
msgMisdescription

Camera Status Callback

Description: Currently, there is no operation timeout callback in the cloud phone real column Syntax:

void onCameraChanged(bool isFront, bool isOpen)
ParametersDescription
isFrontIs it the front camera?
isOpenWhether to open it

Video Frame Callback

Description: Video frame callback Syntax:

void onFrame(std::shared_ptr<VideoFrame>& frame)
ParametersDescription
frameRefer to VideoFrame

Batch Pullback Results

Description: Batch pull result callback Syntax:

void onBatchPodStartResult(int error, const std::string& msg, const std::vector<std::string>& podList)
ParametersDescription
errorBatch load pulling results
msgBulk pulling error messages
podListList of cloud phones for batch pulling

Batch Pulling Error Callback

Description: Batch pulling stream error callback Syntax:

void onError(int error, const std::string& msg)
ParametersDescription
errorBatch load pulling results
msgBulk pulling error messages

Video frame width

Description: Video frame width, unit: PX Syntax:

uint32_t width()

Video frame height

Description: Video frame height, unit: px Syntax:

uint32_t height()

Video Frame Rotation Angle

Description: Video frame rotation angles (0°, 90°, 180°, 270°) Syntax:

uint32_t rotation()

Video frame data

Description: Video frame data Syntax:

uint8_t* buffer()

Video Frame Size

Description: Video frame size Syntax:

uint32_t size()
Prev
Interface Description
Next
Changelog