1.4K Star 7.4K Fork 8K

OpenHarmony/docs

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
OpenHarmony-v5.1.0-release.md 51.42 KB
一键复制 编辑 原始数据 按行查看 历史
ester.zhou 提交于 1个月前 . Update docs (84618)

OpenHarmony 5.1.0 Release

Version Description

API version 18 is officially released in OpenHarmony 5.1.0 Release. Compared with the preceding OpenHarmony 5.0.3 Release featuring API version 15, this version introduces several notable new features and enhancements:

The ArkUI framework offers a broader range of component attribute settings, supports more sophisticated and visually appealing animations, and expands the capabilities of components that are called through C APIs. The media capabilities are enhanced with broader encoding and decoding support, refined playback control, and improved media session management. Application startup allows for more detailed configuration options. For distributed data management, the data processing capabilities of the Unified Data Management Framework (UDMF) and the Relational Database (RDB) are further strengthened. The standard web capabilities are further refined.

The following provides a detailed breakdown of the new features and enhancements, presented by the API version:

Application Framework

  • Adds the API for creating an application context based on the specified data encryption level to obtain the corresponding path. (API Reference)

  • Adds the processName property for obtaining the process name of the current process synchronously. (API Reference)

  • Adds support for obtaining the reason why an application is started (LAUNCH_REASON_MESSAGE). (API Reference)

  • Adds support for HAR, HSP, and SO files to the startup framework. (Development Guidelines, API Reference)

  • Adds support for specifying the maximum and minimum widths and heights (using maxWindowWidth, maxWindowHeight, minWindowWidth, and minWindowHeight) of the main window when starting an ability. (API Reference)

  • Adds support for obtaining the detailed reason why an application exits last time. (Development Guidelines, API Reference)

  • Adds support for setting the color mode of UIAbility. (API Reference)

  • Adds the minWindowWidth, minWindowHeight, maxWindowWidth, and maxWindowHeight properties to startOptions, an input parameter of startAbility, for specifying the maximum and minimum widths and heights of a new window. (API Reference)

  • Adds support for passing startOptions when starting an ability using C APIs. (API Reference)

  • Adds the C APIs for setting the display mode of the window and dock bar icons when an ability is started. (API Reference)

  • Adds the C APIs for obtaining application-level file directories. (API Reference)

Bundle Manager

Adds the following fields to the module.json5 file that jointly specify the redirection target: abilitySrcEntryDelegator, which indicates the name of the UIAbility to which the current module should be redirected, and abilityStageSrcEntryDelegator, which specifies the name of the module (which cannot be the current module name) to which the current module should be redirected. (Development Guidelines)

ArkUI

  • Enhances text and input component capabilities as follows:

  • Adds the following APIs to enhance the general drag and drop capabilities:

    • APIs for defining custom drop animations (API Reference, API Reference)

    • API for customizing whether to trigger automatic scrolling for dragging to the edge of a scrollable component (API Reference)

  • Enhances the dialog box capabilities as follows:

  • Enhances the selection component capabilities as follows:

  • Enhances the scrollable and swipeable component capabilities as follows:

    • Adds the callbacks triggered when the selected element changes in the Swiper or Tabs component, returning index of the element that is about to be hidden is returned. (API Reference – Swiper, API Reference – Tabs)
    • Adds the API to the Swiper component for setting whether child components stop autoplay when the screen is pressed by fingers, a mouse device, or other input devices. (API Reference – Swiper)
    • Enhances the C APIs of the Swiper component for setting whether to display the cached nodes, and the style of the digit-style navigation indicator and navigation arrow. (API Reference – C APIs)
    • Adds the C APIs to the List component for setting layout styles and scrolling effects (NODE_LIST_SCROLL_TO_INDEX_IN_GROUP, NODE_LIST_LANES, NODE_LIST_SCROLL_SNAP_ALIGN, NODE_LIST_MAINTAIN_VISIBLE_CONTENT_POSITION). (API Reference – C APIs)
  • Adds the C API for configuring the callback for gesture interruption events. (API Reference)

  • Adds the C API for obtaining the width, height, and coordinates of the component hit by an event. (API Reference – C APIs)

  • Adds the APIs for setting the custom focus movement logic for the component. (API Reference – ArkTS APIs, API Reference – C APIs)

  • Adds the API for dynamically obtaining gesture configuration parameters, including the number of consecutive taps required for the gesture to be recognized. (API Reference)

  • Adds support for returning gesture event information in the onActionCancel callback triggered when a gesture is canceled. (API Reference – LongPressGesture, API Reference – PanGesture, API Reference – PinchGesture, API Reference – RotationGesture)

  • Adds the following accessibility APIs: API for setting the next focus target for the component during focus traversal (API Reference), API for setting the role type of the accessibility component, which affects how the component is announced by screen readers (API Reference), API for setting whether to enable automatic scrolling for screen readers when the current page has no focusable components (API Reference).

  • Adds support for setting the events occupied by the EmbeddedComponent or UIExtensionComponent component. (API Reference)

  • Adds the APIs for moving the current FrameNode to the specified position of the target FrameNode to implement cross-instance node migration. (API Reference – ArkTS APIs, API Reference – C APIs)

  • Adds the lifecycle callbacks for NodeController: onAttach, onDetach, onWillBind, onWillUnbind, onBind, and onUnbind. (API Reference)

  • Adds the API for taking a snapshot of the provided ComponentContent object. (API Reference)

  • Added APIs related to mouse axis events. (API Reference – ArkTS APIs, API Reference – C APIs)

  • Adds the OnActive and OnInActive lifecycle callbacks to the NavDestination component. (API Reference)

  • Adds the C APIs for obtaining the width, height, and coordinates of the component hit by an event. (API Reference)

  • Adds the API to the UIContext module for creating a UI instance that does not depend on a window. (API Reference)

  • Adds the API for setting the callback parameters for the onVisibleAreaChange event to restrict its execution interval. (API Reference – ArkTS APIs, API Reference – C APIs)

  • Adds the API to the ImageAnimator component for setting whether the component should automatically pause or resume based on its visibility using the system's onVisibleAreaChange event. (API Reference)

Window Manager

  • Adds a listener for the completion of the soft keyboard display animation. (API Reference)

  • Adds the LocalStorage parameter to PiPConfiguration for creating a page-level UI state storage unit, which can be used to track the main window instance when multiple instances are involved. (API Reference)

  • Adds the API for creating a virtual screen. (API Reference)

Graphics

Adds the C APIs, including functions and enums, for offering GPU rendering capabilities for direct drawing to the screen buffer. (API Reference

Distributed Data Management

  • Adds the rootDir configuration to RelationalStore, which allows you to open databases in non-database directories. (API Reference)

  • Adds the APIs to RelationalStore for obtaining the column data type based on the specified column index or column name. (API Reference)

  • Adds the API to UDMF for converting the provided data into a multi-style data structure, which is useful when the original data uses multiple records to represent different styles of the same data. (API Reference)

Media

Audio

Audio/Video Codecs

Playback control

  • Adds the API for transparently transmitting SEI field data from the media player to an application, which is applicable to HTTP-FLV live streaming. (API Reference)

  • Adds showFirstFrameOnPrepare (whether to show the first frame after prepare is called) and preferredBufferDurationForPlaying (preferred buffer duration for playback) to the list of AVPlayer playback strategies. (API Reference)

  • Adds support for playing pre-downloaded video data. (API Reference)

  • Adds thresholdForAutoQuickPlay to the list of AVPlayer playback strategies. (API Reference)

  • Adds support for creating multiple SoundPool instances. (API Reference)

  • Adds showFirstFrameOnPrepare (whether to show the first frame after prepare is called) to the list of AVPlayer playback strategies. (API Reference)

  • Adds 'setTargetLoopMode' to the list of commands that can be sent by a cast controller (API Reference) and a listener for the loop mode setting event (API Reference).

  • Adds the singleLyricText property to audio sessions to support the display of lyrics of a single media asset. (API Reference)

Image

  • Adds the C API for obtaining the editable flag of images. (API Reference)

Recording

  • Adds the enum that defines the video fill mode during screen capture. (API Reference)

  • Adds the enableStableQualityMode18 property to AVRecorderProfile for configuring whether to enable stable quality mode for video recording. (API Reference)

Programming Language Runtime

  • Adds to TaskPool the support for specifying the task execution concurrency and queuing policy. (API Reference)

  • Adds to TaskPool the support for canceling a task in the task pool by task ID. (API Reference)

  • Adds the following API to the collections module (API Reference): Array: from, isArray, of, copyWithin, lastIndexOf, some, reduceRight, reverse, toString, every, toLocaleString

    TypedArray: toString, toLocaleString, lastIndexOf, reduceRight

  • Adds the Sendable feature for discarding the least recently used data to make room for new elements when the cache is full. (API Reference)

  • Adds to Worker the support for specifying the priority of a task during task creation. (API Reference)

Security

Adds support for group-based asset access control, which means you can add multiple applications of the same developer to a group to allow the applications in the same group to access data with each other. (Development Guidelines)

DFX

Adds support for dumping the original heap snapshot of the VM for the calling thread. (API Reference)

Enterprise Customization

  • Adds the mtpClient, mtpServer, and resetFactory APIs for enabling or disabling the corresponding features. (API Reference)

  • Adds support for installing a user certificate based on the system account. (API Reference)

  • Add support for subscribing to system events of account addition, deletion, and switching. (API Reference)

Communications

  • Adds the API for obtaining the virtual MAC address of the peer Bluetooth device over a client socket from the socket server. (API Reference)

  • Adds the API for obtaining the name of a remote Bluetooth device. (API Reference)

  • Adds the API for connecting all profiles, such as A2DP, HFP, and HID, allowed for a remote Bluetooth device. (API Reference)

  • Adds the API for persisting the virtual MAC address of a remote Bluetooth device. (API Reference)

  • Adds geofence reporting modes that allow for reporting entry into the fence when an advertising packet is detected for the first time and reporting exit from the fence when no advertising packet is detected, with the reports including information from the advertising packets. (API Reference)

  • Adds the APIs for obtaining the RSSI, name, and Bluetooth class of the discovered Bluetooth device. (API Reference)

  • Adds the APIs for reading data from and writing data to the remote device through the socket. It supports returning of I/O errors, if any, when the connection is disconnected. (API Reference)

Geolocation Manager

Adds the API for enabling listening for Bluetooth scan information reporting events to help auxiliary positioning. (API Reference)

Network Management

Adds the API for obtaining the file descriptor of the TLSSocket object. (API Reference)

Pasteboard

Adds the APIs for obtaining the number of times that the pasteboard data changes. (API Reference – ArkTS APIs, API Reference – C APIs)

Input Method

Adds the callback triggered when the input method framework needs to display the text preview (API Reference) and the API for subscribing to the event for text preview operations in an input method application (API Reference).

Web

  • Adds the API for obtaining the element information of the area being clicked last time. (API Reference)

  • Adds the API for setting whether the Web component can change the font weight according to the system settings. (API Reference)

  • Adds the API for setting whether to support an application to connect to the media controller. (API Reference)

  • Adds support for setting accept to specify the acceptable file types, which are in compliance with the W3C specifications. (API Reference)

  • Adds the static method for removing all webview cache files in an application. (API Reference)

  • Adds support for setting elements for same-layer rendering with a fixed width and height. (API Reference)

Multimodal Input

Adds the API for subscribing to key press events. If the current application is in the foreground focus window, a callback is triggered when the specified key is pressed. (API Reference)

Upload and Download

  • Adds support for the application cache download capability, which allows applications to cache files to the application memory or sandbox directory. (API Reference)

  • Adds the APIs for setting the maximum number of bytes that can be transmitted by a task per second (API Reference) and for setting the content type of the file to be uploaded in the form (API Reference).

Resource Scheduler

  • Adds the backgroundProcessManager module, which provides APIs to suppress and unsuppress child processes to prevent child processes from consuming excessive system resources and causing system stuttering. (API Reference)

  • Adds resource ID properties for specifying the reminder title and content, facilitating globalization. (API Reference)

Globalization

  • Adds the APIs for obtaining the preferred temperature unit and start day of a week for a user. (API Reference)

  • Adds the APIs for date/time formatting and number formatting. (API Reference)

  • Adds the API for formatting a number to a rich text object. (API Reference)

  • Adds the API for file path mirroring. (API Reference)

Test Framework

  • Adds the APIs for searching for matching components by ID and type in fuzzy matching or regular expression matching mode. (API Reference – id, API Reference – type)

  • Adds the APIs for obtaining the component hint text (API Reference) and searching for components by hint text (API Reference).

  • Adds the APIs for scrolling on a component to search for the target component in the horizontal or vertical direction, which is available for swipeable components. (API Reference)

Mapping Relationship

Table 1 Version mapping of software and tools

Software/Tool Version Remarks
OpenHarmony 5.1.0 Release NA
Public SDK Ohos_sdk_public 5.1.0.107 (API Version 18 Release) This toolkit is intended for application developers and does not contain system APIs that require system permissions. It is provided as standard in DevEco Studio.
(Optional) HUAWEI DevEco Studio 5.1.0 Release Recommended for developing OpenHarmony applications.
To be released
(Optional) HUAWEI DevEco Device Tool 4.0 Release Recommended for developing OpenHarmony smart devices.

Source Code Acquisition

Prerequisites

  1. Register your account with Gitee.

  2. Register an SSH public key for access to Gitee.

  3. Install the git client and git-lfs, and configure user information.

    git config --global user.name "yourname"
    git config --global user.email "your-email-address"
    git config --global credential.helper store
    
  4. Install the repo tool.

    curl -s https://gitee.com/oschina/repo/raw/fork_flow/repo-py3 > /usr/local/bin/repo  # If you do not have the permission, download the tool to another directory and add that directory to environment variables. chmod a+x /usr/local/bin/repo
    pip3 install -i https://repo.huaweicloud.com/repository/pypi/simple requests
    

Acquiring Source Code Using the repo Tool

Method 1: Using SSH (Recommended)

This method requires an SSH public key for access to Gitee.

  • Obtain the source code from the version branch. You can obtain the latest source code of the specified version branch, which includes all changes up to the time you run the commands.

    repo init -u git@gitee.com:openharmony/manifest.git -b OpenHarmony-5.1.0-Release --no-repo-verify
    repo sync -c
    repo forall -c 'git lfs pull'
    
  • Obtain the source code from the specified version tag, which is the same as that released with the version.

    repo init -u git@gitee.com:openharmony/manifest.git -b refs/tags/OpenHarmony-v5.1.0-Release --no-repo-verify
    repo sync -c
    repo forall -c 'git lfs pull'
    

Method 2: Using HTTPS

  • Obtain the source code from the version branch. You can obtain the latest source code of the specified version branch, which includes all changes up to the time you run the commands.

    repo init -u https://gitee.com/openharmony/manifest -b OpenHarmony-5.1.0-Release --no-repo-verify
    repo sync -c
    repo forall -c 'git lfs pull'
    
  • Obtain the source code from the specified version tag, which is the same as that released with the version.

    repo init -u https://gitee.com/openharmony/manifest -b refs/tags/OpenHarmony-v5.1.0-Release --no-repo-verify
    repo sync -c
    repo forall -c 'git lfs pull'
    

Acquiring Source Code from Mirrors

Table 2 Mirrors for acquiring source code

Source Code Version Mirror SHA-256 Checksum Software Package Size
Full code base (for mini, small, and standard systems) 5.1.0 Release Download Download 49.1 GB
Hi3861 solution (binary) 5.1.0 Release Download Download 28.4 MB
Hi3516 solution-LiteOS (binary) 5.1.0 Release Download Download 350.0 MB
Hi3516 solution-Linux (binary) 5.1.0 Release Download Download 223.6 MB
RK3568 standard system solution (binary) 5.1.0 Release Download Download 9.7 GB
Public SDK package for the standard system (macOS) 5.1.0.107 Download Download 1.3 GB
Public SDK package for the standard system (macOS-M1) 5.1.0.107 Download Download 1.2 GB
Public SDK package for the standard system (Windows/Linux) 5.1.0.107 Download Download 3.2 GB

Resolved Issues

Table 3 Resolved issues

Issue No. Description
IBTXFK It may take more than 1000 ms to delete multiple images from Gallery.
IBTCJQ The frame rate for zooming in or out of an FWX image is less than 60 fps.
IBINUK There is a probability that system freezing occurs in libcamera_framework.z.so due to LIFECYCLE_TIMEOUT in the com.ohos.camera process.

Known Issues

Table 4 Known issues

ISSUE Description Impact To Be Resolved By
IBTCKR It may take more than 160 ms from when the SystemUI status bar is pulled down to when the content rendering is complete. User experience is affected. 2025-05-30
IBBZPS There is a low probability that a C++ crash occurs in the OS_IPC_0_1067 thread of the com.ohos.systemui process, and the crash stack is ld-musl-arm.so.1(__libc_free+172). The system malfunctions, and users may not notice the exception. 2025-05-30
IBE36X
IBO3MF
There is a low probability of system freezing in render_service due to SERVICE_BLOCK. A black screen is displayed when the home screen does not respond. After the screen recovers, the home screen is displayed. 2025-05-30
IC313T The animation frame rate of scrolling the thumbnail list in Gallery does not meet the baseline requirements. User experience is affected. 2025-05-10
IC32I0 The animation frame rates of scrolling on the Weibo home page and zooming on the Tmall page in the browser do not meet the baseline requirements. User experience is affected. 2025-05-30
IC32SL The time taken to complete the first browser startup does not meet the baseline requirements. User experience is affected. 2025-06-23
IBUCOT The measured resident memory of the com.ohos.settingsdata process is 16 MB, far exceeding the baseline requirements. The memory usage does not meet the expectation, but does not affect actual use. 2025-05-30
IC4UFM The key response delay of the call dialer does not meet the baseline requirements. User experience is affected. 2025-05-16
IC04TG A C++ crash may occur in libarkweb_engine.so of the com.ohos.note thread of the com.ohos.note process. The Notepad application malfunctions and can be restored by restarting. 2025-05-08
IBZYWM A C++ crash may occur in libmali-bifrost-g52-g7p0-ohos.so of the com.ohos.CompositorGpuTh thread of the com.ohos.note process. The Notepad application malfunctions and can be restored by restarting. 2025-05-08
IC22OQ There is a low probability that a C++ crash occurs in libskia_canvaskit.z.so of the RSRenderThread thread of the com.ohos.note process. The Notepad application malfunctions and can be restored by restarting. 2025-05-15
IC4ZPS During the XTS test, the ActslocationErrorCodeApiTest suite fails because the location service of the RK3568 development board does not support geofencing. This issue has been solved in the master branch, and it can be handled by adding configuration items.
For details about the configuration, see rk3568/config.json.
2025-04-30
IC57IO Tapping the flight mode icon in Control Panel (accessed by swiping down from the upper right corner on the home screen) does not work. This issue has been solved in the master branch, and it can be avoided by manually modifying the code.
For details about how to modify the code, see data_provider_config.cpp configuration change.
2025-04-30
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
其他
1
https://gitee.com/openharmony/docs.git
git@gitee.com:openharmony/docs.git
openharmony
docs
docs
master

搜索帮助