Mobile Development 15 min read

How HarmonyOS Distributed Soft Bus Enables Multi‑Device Live Streaming for 1688 Sellers

This article explains how 1688's live‑streaming platform leverages HarmonyOS's distributed soft bus to coordinate multiple devices—phones, cameras, and large screens—allowing seamless data migration, interactive large‑screen displays, and low‑cost, high‑efficiency multi‑device broadcasting for merchants.

Alibaba Terminal Technology
Alibaba Terminal Technology
Alibaba Terminal Technology
How HarmonyOS Distributed Soft Bus Enables Multi‑Device Live Streaming for 1688 Sellers

Business Background

More than 100 million devices have upgraded to HarmonyOS 2.0, but many developers see it as merely Android with minor adaptations. The core innovation—distributed soft bus—remains unclear to most. 1688’s live‑streaming supply side needed a solution to lower merchants' broadcasting costs and improve capabilities, leading to a multi‑device broadcasting scheme based on the distributed soft bus.

Current Situation

1688 serves factories, shop owners, and other B2B sellers who, due to the pandemic, are shifting to live commerce. Their main pain points are:

Lack of dedicated product‑camera and interactive large‑screen devices, forcing hosts to move close to cameras and screens.

Difficulty synchronizing multiple broadcasting tools, causing fragmented operation and poor host‑assistant interaction.

Low‑budget equipment with poor portability, limiting multi‑angle streaming in factory environments.

Solution Design

We propose a HarmonyOS‑based multi‑device collaborative broadcasting solution that uses the distributed soft bus to:

Enable high‑efficiency coordination among devices (host phone, product camera, large screen).

Provide large‑screen interactive displays controlled remotely from the host phone.

Minimize wiring by using a single LAN for wireless connections.

Allow configurable hardware (selectable cameras, screens) for cost‑effective deployment.

Technical Implementation

The solution hinges on two capabilities:

Cross‑device migration of live interaction.

Coordinated transmission of audio‑video streams.

Both are built on extensions of HarmonyOS's distributed soft bus. The soft bus creates virtual connections among devices, offering low‑latency, high‑bandwidth communication without physical cables.

Key implementation steps include:

Registering continuation devices in LiveControlAbility.

ContinuationRegisterManager continuationRegisterManager = getContinuationRegisterManager();
continuationRegisterManager.register(getBundleName(), null, callback, requestCallback);

Connecting to the large‑screen ScreenServiceAbility after device discovery.

private IContinuationDeviceCallback callback = new IContinuationDeviceCallback() {
    @Override
    public void onDeviceConnectDone(String selectDeviceId, String deviceType) {
        connectAa(selectDeviceId);
        continuationRegisterManager.updateConnectStatus(abilityToken, selectDeviceId, DeviceConnectState.CONNECTED.getState(), null);
    }
};

Handling remote connections on the large screen.

public IRemoteObject onConnect(Intent intent) {
    jumpScreen();
    return new ScreenRemoteForController();
}

Transmitting encoded YUV data from product cameras to the large screen.

private void sendEncodedDataToRemote(byte[] data, BufferInfo bufferInfo) {
    byte[] msgTemp = new byte[bufferInfo.size];
    System.arraycopy(data, position, msgTemp, 0, msgTemp.length);
    mScreenServiceProxy.onYuvData(CameraUtil.IRemoteMsg.MSG_TYPE_SLICE_END, bufferInfo.size, 0, data);
}

Audio‑video streams are encoded, sliced, and sent over the soft bus, enabling 720p transmission within the LAN.

Summary and Outlook

The software‑only approach overcomes hardware limitations, offering merchants a cost‑effective, scalable multi‑device broadcasting solution. Future work includes extending similar capabilities to Android/iOS, developing standardized control boxes, and exploring multi‑camera setups for richer live content.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

live streamingHarmonyOSCode ExamplebroadcastingDistributed Soft BusMulti-Device Collaboration
Alibaba Terminal Technology
Written by

Alibaba Terminal Technology

Official public account of Alibaba Terminal

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.