HarmonyOS Next 5.0.3 Beta1 Update Notes and Adaptation Guide
On March 3, 2025, Huawei released the HarmonyOS 5.0.3 Beta1 documentation. HarmonyOS 5.0.3 Beta1 is the first Beta version of API 15. Compared with HarmonyOS 5.0.2 Release, it enriches development scenarios through new APIs, such as providing more open functions for 2in1 devices, enhancing basic upload/download capabilities, and further expanding C APIs.
It is important to emphasize what a 2in1 device is. The official explanation is that "2in1 devices integrate screen touch and keyboard-mouse interaction methods, maintaining portability while fully unleashing device productivity to help users complete tasks efficiently." In a narrow sense, we can understand it as a PC, meaning HarmonyOS officially provides PC development functions. The characteristics of 2in1 devices are as follows:
Hardware Features | Screen: Large screens with medium to high resolution, spanning a wide range of sizes and proportions. Camera: Generally equipped with a high-quality front camera. Audio: Strong audio input/output capabilities. Biometric Recognition: Typically includes fingerprint, facial recognition, etc. Others: Gyroscopes, etc., to obtain device motion status information. |
Usage Modes | Users usually use 2in1 devices in relatively stable workplaces with workstations, placing the device on a desk at a distance of 500-600mm. In the touch state of 2in1 devices, the operation hotspots are similar to those of tablet stands; in the keyboard-mouse operation state, there are no obvious operation blind spots. |
Interaction Methods | 2in1 devices have rich interaction methods, with keyboard-mouse and touchpad being the primary means. |
Usage Scenarios | 2in1 devices are widely used in scenarios ranging from office to entertainment; they are suitable for long-term, concentrated use and frequent file operations, often used in collaboration with other devices. |
The complete supporting information for HarmonyOS 5.0.3 Beta1 is as follows:
Software Package | Release Type | Version Number | Build Version | Release Date |
---|---|---|---|---|
System | Beta | HarmonyOS 5.0.3 Beta1 | 5.0.0.130 | 2025/02/28 |
DevEco Studio | Beta | DevEco Studio 5.0.3 Beta1 | 5.0.9.100 | 2025/02/28 |
SDK | Beta | HarmonyOS 5.0.3 Beta1 SDK | Based on OpenHarmony SDK Ohos_sdk_public 5.0.3.130 (API 15 Beta1) | 2025/02/28 |
OS Platform Capabilities
New Features
New and updated features are as follows:
Ability Kit
- In ApplicationInfo of Package Management, the definition of application installation source (installSource) is enhanced, adding three installation sources: ota, recovery, and installation package name. (API Reference)
- New C API definitions and interfaces for component startup parameters Want. (API Reference)
Account Kit
Child accounts support one-click login with Huawei accounts. (Guide)
App Linking Kit
【New Kit】App Linking Kit (Application Link Service) provides deferred linking capability, supporting the preservation of application links clicked by users for ten minutes, ensuring that when users download, install, and open the application, they can still obtain the relevant links clicked previously. (Guide, API Reference)
AppGallery Kit (Formerly Store Kit)
The Kit name is changed from Store Kit to AppGallery Kit, and the reference method for related Kit APIs is updated accordingly. (Guide, API Reference)
ArkData
UDMF newly supports adding data of specified types and contents, along with corresponding query interfaces. (API Reference)
ArkGraphics 2D
- New tool class Tool for converting ResourceColor values to common2D.Color objects. (API Reference)
- New support for setting whether the drawn font follows theme font changes. (API Reference - C API, API Reference - ArkTS API)
- New C API support for obtaining transformation matrices calculated based on the rotation angle set by the production end and the actual effective content area of the buffer. (API Reference)
ArkUI
- Navigation newly supports customizing the enable/disable of animation when switching between single and dual-column displays. (API Reference)
- Video component newly supports setting shortcut key responses. (API Reference)
- TextInput/TextArea/Search components newly support configuring callbacks that do not intercept back key operations (onBackPressed). (API Reference - TextInput, API Reference - TextArea, API Reference - Search)
- UIContext newly supports setting OverlayManager parameters, such as whether to render the overlay root node. (API Reference)
- RichEditor newly supports setting the keyboard appearance. (API Reference)
- Security components support setting the alignment of icon text. (API Reference)
- Security components support setting the radius of the four rounded corners of the border separately. (API Reference)
- New C API support for callback methods when component layout and drawing are completed. (API Reference - Component Layout Completion Callback, API Reference - Component Drawing Completion Callback)
- New C API attribute style NODE_IMMUTABLE_FONT_WEIGHT supports setting text weight to not follow system font weight changes. (API Reference)
- Windows newly support obtaining information about picture-in-picture windows, such as ID and size. (API Reference)
- Windows newly support obtaining information about the layout of visible windows on a specified screen. (API Reference)
- Windows newly support obtaining information about the display size scaling coefficient of the screen where the current window is located (API Reference), setting up listening for changes in the system display size scaling coefficient of the screen where the window is located (API Reference), and allowing the application's main window to customize its display size scaling coefficient (API Reference).
- Windows newly define window movement options, currently allowing the definition of screen ID to support moving windows to other screens. (API Reference)
- Windows newly define C APIs for window management, mainly used to set and obtain properties of specified windows, as well as set the status bar and navigation bar styles of specified windows. (API Reference)
AVCodec Kit
New C API support for variable frame rate video capabilities. (Guide)
Background Tasks Kit
New support for listening callbacks when long-running tasks are canceled. (API Reference)
Basic Service Kit
- Upload/download newly supports task grouping and displaying notifications by group. (API Reference)
- The URL length supported by upload/download is expanded from 2048 to 8192 characters. (API Reference)
- Upload/download newly supports customizing notification bar information. (API Reference)
- System accounts newly support obtaining domain account information associated with the account. (API Reference)
Cloud Foundation Kit
New pre-installation and periodic pre-loading functions support pre-downloading required data to local storage, allowing direct local data rendering when pages are opened. (Guide, API Reference)
Connectivity Kit
Wi-Fi newly supports querying whether a hotspot is active. (API Reference)
Core File Kit
- New definition and operation capabilities for atomic files. (API Reference)
- New support for obtaining the total and available sizes of built-in device storage. (API Reference)
- The file information attribute Stat adds three new properties: last access time (atimeNs), last modification time (mtimeNs), and last file status change time (ctimeNs). (API Reference)
Image Kit
- New method to create a PixelMap object from a Surface ID, which does not require specifying a region compared to the original method. (API Reference)
- New C API support for obtaining the memory address of Pixelmap pixel data. (API Reference)
IME Kit
- New support for querying the enabled status of input methods. (API Reference)
- New series of APIs to support custom communication between input method applications and input/editing boxes. (API Reference - Input Method Framework, API Reference - Input Method Service)
Live View Kit
- Support for configuring whether to display navigation direction arrow collection images in the navigation template extension area. (API Reference)
- Support for configuring whether to display live capsule content. (API Reference)
Localization Kit
The standard ICU C library (ICU4C) supported by internationalization adds Unicode string processing (ustring.h) and ICU text abstract representation (utext.h). (API Reference)
Media Kit
The C API for screen recording newly supports setting whether to display the cursor in the recorded content. (API Reference)
Network Kit
New support for setting the system-level proxy auto-configuration (PAC) script address. (API Reference - C API, API Reference - ArkTS API)
Performance Analysis Kit
HiLog supports setting the minimum log level for application printing. (API Reference - C API, API Reference - ArkTS API)
Share Kit
The tap-to-share callback newly adds a rejection method to help developers handle exception logic. (API Reference)
Vision Kit
Card recognition supports setting the margin for cropped card images. (API Reference)
NDK Development
New support for development capabilities based on the OpenMP library. (Guide)
Debugging and Tuning
- New support for accessing the sandbox of debug applications via hdc to read logs and resources in the application sandbox during debugging. (Guide)
- Enhanced monitoring capabilities of HiAppEvent for main thread timeout events. (Guide, API Reference)
Adaptation Guide
Changes for all applications are as follows:
Kit | Change Description | Adaptation Suggestion for Historical Projects | Adaptation Guide |
---|---|---|---|
Ability | Specification change of the installSource field | No adaptation needed | |
AppGallery Kit | The kit.StoreKit.d.ts file is deprecated and replaced with kit.AppGalleryKit.d.ts | Adaptation required | Take importing moduleInstallManager as an example. When importing moduleInstallManager, use the new kit file, and other code does not need to be modified: Before change: import { moduleInstallManager } from '@kit.StoreKit'; After change: import { moduleInstallManager } from '@kit.AppGalleryKit';
|
ArkTS | The signal processing method registration interface sigaction supports the SA_RESETHAND flag change | Adaptation required | 1. Globally search for sigaction interface calls to review code related to setting signal processing methods. 2. Check whether the SA_RESETHAND flag is specified in the sa_flags of the sigaction structure parameter (SA_RESETHAND is the POSIX standard name, and SA_ONESHOT is an obsolete non-standard name, with consistent functions). 3. If the application expects the signal processing method to take effect only once, explicitly specify the SA_RESETHAND flag. If the application expects the signal processing method to take effect multiple times, remove the SA_RESETHAND flag to avoid the flag enabling the signal processing method to revert to the default value SIG_DFL, causing crashes. 4. Before calling the sigaction method, set the sa_flags flag as needed to avoid unexpected behaviors from uninitialized random values (which may include the SA_RESETHAND flag). |
ArkUI | The return value of the isVisible interface changes when FrameNode is wrapped by UINode | No adaptation needed | |
ArkUI | Behavioral change when preventDefault() is set in the onCopy callback of the rich text component RichEditor | No adaptation needed | |
AVCodec Kit | Default behavior change of OH_AVCodecOnStreamChanged in audio decoding scenarios | No adaptation needed | |
Localization Kit | Changes to the display names of Burmese, Malay, and Thai | No adaptation needed | |
Media Kit | Change in the screenshot interface called by the system screen recording application | No adaptation needed | |
Application Configuration File | The shortcut configuration file does not support configuring the shortcutId field via resource indexing (starting with $) | Adaptation required | If the shortcutId field in the shortcut configuration file is configured with a resource index string starting with $, it needs to be changed to a common string (not starting with $). |
Application Configuration File | When supportWindowModes options are configured for fullscreen and split, the window starts in fullscreen | Adaptation required | In API version 15 and later, developers need to note that when supportWindowModes is configured for fullscreen and split, the window starts in fullscreen on PC. If starting in a free window is expected, the supportWindowModes should add the floating configuration item. |
Debugging Tools | The default log level of hilog logs in the commercial version (nolog version) developer mode changes from info to warning | No adaptation needed |
UI style changes are as follows:
Change Description | Adaptation Suggestion for Historical Projects |
---|---|
The semi-modal SheetMode.EMBEDDED mode supports exiting by pressing the ESC key | No adaptation needed |
DevEco Studio
Changes in DevEco Studio Beta1 (5.0.9.100) are as follows:
New Features
- DevEco Studio supports developing API 15 projects.
- When creating a new project/module, a layered icon configuration file layered_image.json, and foreground/background icons foreground.png and background.png will be automatically generated in the AppScope/resource/base/media directory, and the icon field in app.json5 will be set to the layered icon configuration file. For details, refer to the icon tag.
- AppAnalyzer's scenario-based inspection newly supports three scenarios: page scrolling, cold application startup, and in-page transitions. For details, refer to Application and Meta-Service Inspection.
- New support for automatically applying for some ACL permissions through auto-signing. For details, refer to Support for ACL Permissions.
- The build-profile.json5 of project-level and HAR modules adds a branchElimination field under buildOption/arkOptions, used to specify whether to enable code branch pruning to reduce the size of compiled artifacts. When enabled, in release compilation mode, code branches that are not executed will be pruned. For details, refer to build-profile.json5.
- The following parameters are newly added to project-level and module-level build-profile.json5. For details, refer to build-profile.json5.
- The buildOption adds a removePermissions array to specify redundant permissions in dependent packages to be deleted during compilation. Permissions of the module itself will not be deleted, and this only takes effect for HAP/HSP modules.
- The buildOption/resOptions adds a copyCodeResource object to specify whether to package resource files (non-source code files) in the src/main/ets directory into the artifacts, supporting exclusion of matched files based on glob syntax, which will not be packaged into the artifacts.
- The hvigor-config.json5 adds an ohos.arkCompile.emptyBundleName field under properties to specify whether the bundleName field in the compiled artifact is empty. For details, refer to hvigor-config.json5.
Changed Features
- The application sandbox supports operations such as creating, deleting, uploading, and downloading folders, and command-line access to the application sandbox is changed to using the hdc tool. For details, refer to Accessing Device Files.
- The opening method of the Obfuscation Assistant is changed to Menu Bar > Tools > ObfuscationHelper. For details, refer to Configuring Retention Options via the Obfuscation Assistant.
Top comments (0)