目录

App Data Transmission Quality Feedback (C/C++)

Use Case

When the data transmission performance of your app changes, your app can send the transmission quality and service type data to the network service module of the device via the real-time feedback API. If the performance deteriorates, the module can refine resource scheduling to implement network acceleration.

For example, if frame freezing occurs during video streaming in your app, Network Boost Kit will receive this issue and report it to the network service module. The module will then optimize resource scheduling to accelerate the network.

API Description

For details about the APIs, please refer to API Reference.

API Description
int32_t HMS_NetworkBoost_ReportQoe(NetworkBoost_ServiceType serviceType, NetworkBoost_QoeType qoeType) Sends transmission quality data to the device.

Development Procedure

  1. Import the Network Boost Kit module.

    #include "NetworkBoostKit/network_boost_quality.h"
    #include <cstdio>
  2. Add the following library to the CMakeLists.txt file. For details, please refer to Preparations for C API Development.

    libnetwork_boost.so
  3. Call the ReportQoe API to notify the device of your app's data transmission quality.

    int32_t ReportQoe()
    {
        NetworkBoost_ServiceType serviceType = NB_SERVICE_SHORT_VIDEO;
        NetworkBoost_QoeType qoeType = NB_QOE_BAD_SERVER_ERROR;
        int32_t ret = HMS_NetworkBoost_ReportQoe(serviceType, qoeType);
        printf("Transmission quality feedback result: %d\n", ret);
        return ret;
    }