Connect with us

OpenHarmony

OpenHarmony 5.0 released with ArkUI and other improvements

Published

on

OpenHarmony 5.0 released with ArkUI and other improvements

OpenHarmony 5.0 operating system release version is out with various new features, ArkUI enhancements, and useful improvements. The latest build also enhances several application aspects for developers and makes the experience more efficient.

The OpenHarmonyOS 5.0 version is released by OpenAtom Foundation. Developers will find major changes in the app development kit, ArkUI, and other segments. These modifications will provide clearer logic and scenario-based views.

Further details in the changelog show refinements for network stability, distributed data management, richer encodings for media, and optimized power supply. Developers can quickly develop apps using enhanced Web capabilities with upgraded tools.

Other sections in the list count communication, security, graphics, camera, event notification, encryption, hardware capabilities, and more. You can check the details below.

OpenHarmony 5.0 Changelog

Highlights:
  • The application framework gets more lifecycle management capabilities and provides sub-process-related capabilities.
  • ArkUI further opens up the rendering capabilities of custom nodes.
  • Application package management improves application packaging efficiency and enriches the operational scenarios for end users to use applications. (For instance, creating application clones, creating desktop shortcuts, and more)
  • It enhanced the distributed data management capabilities and security while ensuring reasonable data sharing.
  • File management further improves Picker’s capabilities and enables reasonable control of permissions and reasonable data sharing.
  • It enhances the media’s audio, video playback, and recording capabilities with the support for multiple audio, video, and image encoding formats. It now has more detailed playback control operations.

OpenHarmony 5.0: Application Framework

  • Supports creating JS/Native sub-processes. Developers can execute time-consuming operations in sub-processes.
  • The lifecycle monitoring ability supports more lifecycles such as onNewWant.
  • Supports the ability to return AbilityResult to the caller without actively destroying itself.
  • The context supports Sendable object conversion for multi-threaded Context transmission.
  • Supports application-level font settings.

ArkUI

  • Enhanced the component customization capability with the addition of new components like a modifier, ContentModifier, and DrawModifier, which support adding new properties based on existing components, customizing component content and fully self-drawing.

The Custom nodes and Native rendering nodes are open. Custom nodes are node objects that have some basic capabilities of underlying entity nodes. These nodes can be mixed with native components through custom placeholder nodes.

Custom nodes can have the ability to calculate the layout of a single node, set basic properties, set event monitoring, and customize the drawing and rendering content. It includes three types of objects: FrameNode, RenderNode, and BuilderNode.

  • BuilderNode: Provides a custom BuilderNode that can mount native components.
  • FrameNode: Provides a custom FrameNode, which represents the entity node of the component tree. NodeController can mount it to NodeContainer through the FrameNode held by BuilderNode, or obtain RenderNode through FrameNode and mount it to other FrameNodes.
  • RenderNode: Provides self-drawing rendering node RenderNode to support custom drawing requirements on the Native side.
  • NodeController: NodeController implements operations such as creation, display, and update of custom nodes. It is responsible for mounting custom nodes on NodeContainer.

Other enhancements in the ArkUI section include the NDK capability for the third-party framework components. It covers component creation, property setting, event registration, customization capabilities, and component tree construction.

The Navigation component has more enhanced capabilities, including single-column and double-column switching effects, interruption and continuation of transition animations, and the ability to monitor the page life cycle.

The control visuals, animations, and interactions have been refreshed and added support for aging-friendly interfaces, mirrored languages, and screen reading. Menu and pop-up components support developers in defining color, shape, rounded corners, size, position, and shadow.

OpenHarmony 5.0: Application package management

  • Supports access and management of application clones. Applications can access application clones through simple configuration.
  • Supports home screen shortcuts. Users can dynamically add shortcuts to the home screen.
  • Supports independent upgrade capabilities of system-level HSP and ArkWeb. It also supports independent updates of preset applications.
  • Supports recovery mechanism after abnormal interruption of OTA upgrade. If a power outage or service crash occurs during the OTA upgrade process, the OTA process will be restored upon restart to continue installing and updating applications.
  • Provides automatic cache directory cleaning capability and supports storage management to automatically clean up the cache directory when the device space is insufficient.
  • Supports Native software packages and provides the capabilities of packaging, installing, and uninstalling native software packages.
  • When the packaging tool packages the app, it compresses the entire app package to reduce its size on the shelf.

Distributed soft bus

  • IPS provides CAPI basic interface capabilities, including serialization or deserialization, message sending and receiving processing interfaces, etc.

OpenHarmony5.0: Distributed Data Management

  • RelationalStore&Preferences support access to common sandbox data.
  • RDB supports opening in read-only mode.
  • UDMF supports the compatibility query between UTD and MIME types.
  • Migration scenario data asset synchronization optimization.
  • Supports distributed data management with Class E encryption.
  • The inverted index construction scenario supports an application-specified external tokenizer.
  • The NDK-based CAPI supports the cross-device drag-and-drop capability of UDMF data.

A Distributed Hardware

  • Provides refined ACL management: It performs refined addition, deletion, modification, and query operations on ACLs based on business devices, users, accounts, and package names.
  • Quality reinforcement to improve functional stability and reliability.

Distributed DeviceProfile

  • Equipment data is reconstructed hierarchically to improve the efficiency of adding, deleting, modifying, and checking data.
  • Quality reinforcement, optimization of background link establishment function, and improved stability and reliability.

File Management

  • Supports incremental file backup.
  • Provides an interface for the backup application to obtain detailed information about the amount of backup data, allows the application to report the number of data records to be backed up (such as the number of text messages), and supports reporting of abnormal events during the backup and recovery process.
  • Added support for SA access backup and recovery framework.
  • Enhanced Picker capabilities: Provides the ability to select multiple files at a time in the Audio Picker; adds a Download Picker, allowing applications to save files directly to the “Download/package name level” directory, and subsequent access to the directory does not require permission to apply, complementing the download experience of applications such as browsers.
  • Apps are supported to obtain access rights to public directories (Download, Desktop, Document) by applying for permissions (supported by some devices and needs to be determined by syscap). Apps cannot directly access public directories without applying for permission.
  • Supports applications to select files or directories through FilePicker and obtain temporary access rights to the directory or file, and supports persistent access capabilities. Non-persistent files or directories cannot be accessed after the application exits.
  • Added CreateStream, fdopenStream, and other streaming file access interfaces .
  • Added new interfaces for setting and getting extended attributes.

Graphics, Images, and Windows

Graphics

  • The NativeImage module based on the NDK’s C API now supports NativeWindowBuffer.
  • The NDK-based C API now supports NativeVsync and multiple callbacks for a single frame.
  • The NDK-based C API now supports variable frame rates.
  • ColorSpaceManager supports sendable capabilities.
  • The font engine supports text-shadow capabilities and underline alignment.
  • The graphics drawing interface improves drawing-related capabilities.

Window

  • Provides the display.getDisplayByIdSync interface for use with the multi-screen feature, allowing applications to synchronously obtain information about the screen where the Ability is located through IDs.
  • Supports obtaining screen available area information.
  • Support setting status bar text color according to page color in ArkUI.

Media: Audio

  • Audio focus enhancement: Supports focus sessions, allowing apps to set concurrent playback policies with other apps, and allowing apps to play silently without interrupting audio playing in the background.
  • Added support for more audio devices such as DP and USB headsets, and support for switching the default sound device function (earpiece and speaker).
  • Added a new audio stream type for video calls to optimize the audio stream playback experience in this scenario.
  • Added a unified volume component to facilitate use and reduce development complexity.
  • Supports customization of the style of in-app casting components.
  • Supports ringtone list query and customized ringtone settings.

Play

  • The player start and seek performance are optimized to reduce latency.
  • Added multiple playback protocols or formats: support DASH streaming protocol playback; support AMR, APE, WAV PCM-MULAW format audio playback.
  • Added a variety of playback control capabilities: support for multi-track video playback, changing the output Surface during video playback, silent playback, precise seek, setting playback range, and subtitles.
  • Supports configuration of streaming media buffer size; supports audio offload mode.
  • Enhanced streaming media playback capabilities: Optimized streaming media cache strategy to reduce lag.

Recording

  • Enhanced audio recording capability. It now supports MP3, WAV PCM-MULAW format audio recording.

Screen Recording

  • Supports exempting the application’s own privacy window from screen recording protection, and provides a privacy confirmation window and screen recording status prompt.
  • Supports excluding the specified window when recording.
  • Supports configuring screen rotation and dynamically adjusting rotation parameters.
  • Supports simultaneous recording of microphone and system sound.

Audio and video codec

  • Added AVTranscoder transcoding interface. It supports bit rate reduction, outputs video files in video encoding AVC, audio encoding AAC, and encapsulation format MP4, and reduces the amount of data transmitted/stored.

DRM

  • AVPlayer / AVCodec supports DRM information parsing of DASH protocol programs, decryption of TS-encapsulated H265 video format, and audio decryption.
  • AVCodec DRM adaptation adds decryption parameter settings.

Camera

  • New model capabilities have been added, including time-lapse photography, panorama, streamer shutter, large aperture video recording, and fluorescent photography.
  • Added a new camera PerConfig one-click configuration mechanism to ensure consistent camera effects and reduce development complexity.
  • Optimize the segmented process to improve the performance and quality of photo/video recording.
  • Benchmark ArkTS API capabilities and complete related C APIs.
  • Enhanced camera experience, including mirroring, zoom, anti-shake, continuous shooting, camera status notification, etc.

Picture

  • EXIF reading and writing capabilities are enhanced, supporting EXIF ​​batch reading and writing, and GIF supports obtaining playback count information.
  • Support HDR capabilities: HDR dual-layer encoding and decoding, and conversion between HDR and SDR.
  • The codec format is enhanced to support HEIF codec and DNG decoding.
  • The editing framework is based on the NDK’s C API, including the effector base class, filter base class, and custom algorithms.

Event Notification

  • CEM tools now support publishing custom public events.
  • Emitter adds a new generic interface that can be used to directly pass Sendable objects.
  • Supports synchronous query notification enablement status.

Basic Communications

  • Support third-party applications to connect to hotspots through network management.

OpenHarmony 5.0: Network Management

Network management capabilities

  • Supports specifying a Wi-Fi hotspot by creating a NetConnection object to connect to it.
  • An NDK-based C API that provides network management status monitoring, application-level proxy monitoring, and other capabilities.

The Network protocol stack capabilities

  • Supports upgrading TCP Socket to TLS Socket to improve communication security.
  • TLS Socket supports skipping certificate verification to avoid scenarios where the certificate cannot be verified under special circumstances.
  • All sockets support obtaining local IP and port.
  • HTTP supports configuring certificate pinning information.
  • HTTP supports the brotli compression algorithm.

Power Supply

  • Supports obtaining the current charging current. Third-party applications can obtain the current device current through nowCurrent.
  • Supports temperature control actions in flight mode. Developers can customize temperature control strategies to control the device to enter flight mode.
  • Supports power consumption control based on the WorkSource agent running a lock-assisted resource scheduling module.
  • It supports automatically entering S4 sleep mode after waking up from S3 sleep mode when the battery is low, achieving ultra-long standby characteristics.
  • After the system starts, it supports reading and broadcasting the presence information of the device shell/case, the battery information kernel node, whether to send a broadcast, etc., which supports developer configuration.

USB

  • USB DEVICE configuration management security access control enhancement.
  • The USB standard data transfer mode (interrupt transfer, bulk transfer) function is enhanced.
  • Supports standard USB peripheral security management and control.

Start Recovery

  • It supports Native software package packaging, installation, running, and uninstallation, and builds a Native software package development and release system, which helps to quickly build productivity software ecosystem capabilities and also helps system developers improve development efficiency.
  • Provides a resettable developer anonymous device identifier ODID to replace UDID and other hardware identifiers.
  • Supports running bftpd commands and debugging application sandbox data access in user mode.

Globalization

  • Provides C API to support internationalization capabilities of the ICU4C standard.
  • International formatting processing capabilities support screen size adaptation.
  • Full support for pseudo-localization testing.
  • Provides C API to support resource file management capabilities.
  • String resources support translatability markers.
  • Provides minority language font capabilities.

OpenHarmony 5.0: Safety

Encryption and decryption algorithm library framework

  • ArkTS API provides corresponding C APIs for some commonly used encryption and decryption algorithm capabilities.
  • Support SM4-GCM algorithm interface.

Certificate Management

  • Provides an API for launching the certificate management interface.
  • Provides an API for obtaining an application’s private certificate list.

Program access control

  • Geolocation permissions support a one-time authorization option.
  • Supports opening the permission management application interface of the settings page.

User IAM

  • Supports password validity period checking.
  • Supports recovery keys.

Account

  • Supports logging out of local accounts.
  • Supports specifying a short account name (used as the name of the personal folder) when creating a local account.
  • Support querying local account names.
  • Added new privacy account type.
  • Added unlock authentication intent.
  • Added new credential types: Graphic and Four-digit PIN.

OpenHarmony 5.0: ArkCompiler

The ArkTS front-end compiler

  • Syntax enhancement: the compilation target is switched from es2017 to es2021, and the compilation of source code files with es2018~es2021 syntax features is supported.
  • The obfuscation capability is enhanced to support exception stack restoration, file granularity non-obfuscation, HAP and HSP module file name obfuscation, and whitelist wildcard function.

ArkTS Runtime

  • Supports lazy loading of modules, and synchronously loads executable files when variables are used, improving application startup performance.
  • The concurrency capability is enhanced, providing a Sendable object-sharing mechanism to optimize the object cross-thread communication performance; TaskPool provides functions such as task queues, long-term tasks, and periodic tasks.
  • The debugging function is enhanced to support reverse debugging, Smart Step into, and other functions.
  • The tuning function is enhanced to support hiperf/profiler mixed back stack and multi-instance HeapDump functions.

ArkTS basic library

  • It supports high-precision floating-point operations, provides StringDecoder character stream decoding capabilities, stream data stream processing capabilities, and supports bit vectors.

JSVM

  • Provides a system JS engine that supports the high-performance running of JS and WASM.

Integrated sensor processing platform

Drag frame

  • Supports rotating and dragging the window as the window rotates.
  • Supports dragging between three devices.
  • Supports application-defined configuration to not display quantity badges during dragging.
  • Supports data receiver to customize cut and copy behaviors.

Keyboard and mouse crossing

  • Control both ends to initiate activate interface calls at the same time.
  • Optimize the timing issues of keyboard and mouse crossing, reduce system dependence, and eliminate timing issues between multiple processes.
  • Improve traversal management performance, increase success rate, and reduce traversal delay.

Multimode input

  • Provides C API to support device information query and other related capabilities.

Pan Sensor

Vibrator

  • Some asynchronous query interfaces provide synchronous version APIs.
  • The system can better use motor devices to trigger vibration according to different device capability levels.

Sensor

  • Some asynchronous query interfaces provide synchronous version APIs.
  • Provides C API to support linear acceleration and game rotation vector sensors.

Accessibility

  • Magnification gesture: supports magnifying the screen content through gestures.
  • Active broadcast capability: When the application is adapted for screen reading, it can support active broadcast of changing information through accessibility in some dynamically changing scenarios.
  • Active focus capability: When an application is adapted to screen reading, it can request active focus on components in certain scenarios.

Resource Scheduling

Background Tasks

  • Apply for long-duration task types and support applying for multiple types of long-duration tasks at the same time.
  • The application applies for DATA_TRANSFER download-related long-term tasks, and supports returning download notifications to the application for progress updates.

Performance, power consumption, thermal integration control

  • The system load fusion gear is determined based on information such as the current temperature, load, and whether it is in a high-load scenario. After the application registers the system load callback, it can adaptively downgrade its own business load according to the different levels of the system load fusion gear, thereby reducing the load of the entire machine.

Agent reminder

  • When an application applies for a recurring calendar reminder, it supports specifying an exclusion day, on which no reminder will be given.
  • When the application applies for a reminder, wantAgent supports passing parameters. When jumping to the target UIAbility after clicking the reminder, the parameters are carried.
  • When the application queries for published reminders, the corresponding reminderId is returned in the query results.

Testing Framework

  • Supports compatibility testing of cross-platform interfaces.

DFX

  • Provides an API to determine whether the HDC debugger is connected.
  • Support turning on the trace function in developer mode.
  • Enable awareness of main thread timeout events.
  • errorManager supports TaskPool and Worker to listen for unhandled Reject events.

Kernel

  • Provide thread QoS level marking and scheduling based on user interaction relationships.

Upload and download

  • request.agent.Fault refines the error types to help developers quickly locate API usage problems.
  • request.agent.Config adds a new proxy member to support setting the network proxy address of the task.
  • request.agent.Task.start supports restarting failed\stopped tasks, making it easier for developers to quickly recover failed tasks.
  • request.agent.Task supports configuring TLS certificate pinning fingerprints using the network.json configuration file.
  • request.agent.FileSpec supports specifying all file paths under the base directory of the application sandbox, making it easier for developers to manage sandbox files. It also supports uploading public files on the front end, such as gallery files and album files, to reduce the overhead caused by additional copies.

Input Method Framework

  • The NDK-based C API now supports self-drawn UI components using input methods, including launching and exiting input methods, and processing text on-screen requests.
  • Optimize the callback timing when pulling up the keyboard, so that the input method application can adjust the keyboard display content in time according to the input box properties.

Time Zone

  • Provides system APIs for forcing NTP time to refresh and obtaining the current NTP time.
  • The NDK-based C API provides the ability to obtain the time zone.

Clipboard

  • The NDK-based C API supports clipboard capabilities.
  • Provides a cross-device clipboard switch.
  • When the app is upgraded to API 12 or later, add a read permission check to the clipboard reading interface.

Web

  • The network takeover feature is enhanced to support obtaining the FrameUrl of the request and the ResourceType of the intercepted request.
  • Supports the pre-screening capability of the Web scene input method.
  • Supports Web Components keyboard hosting capabilities.
  • Supports synchronous drawing capabilities of Web components and ArkUI native components.
  • Supports setting whitelist directories that can be accessed across domains using the File protocol.
  • Support applications to specify rendering subprocesses.
  • Web components support an accelerometer and gyroscope.
  • Web components support intelligent filling of H5 pages.
  • Web components support BFCache capabilities.
  • Improve the soft keyboard avoidance mechanism of Web components and support Resize and Offset modes.

Theme Framework

  • Supports enabling themes through folder directories, which improves the performance of enabling themes compared to enabling through compressed packages.
  • Supports the management of card resources, and the ability to add, delete, modify and query added subject cards.
  • Provides characterization functions for external screen devices and supports enabling external screen themes.
  • Theme enablement support does not switch the current “active” directory.

Compile and build

  • The CMake version required for compiling and building dependencies has been upgraded from 3.16.5 to 3.28.2.
OpenHarmony 5.0 released with ArkUI and other improvements

OpenHarmony 5.0 released with ArkUI and other improvements (Image Credits: OpenHarmony)

(source)

I like to listen to music, sing, dance, and play outdoor games. I have a huge interest in reading novels and cooking. I'm good enough as a speaker. Besides, I have the willingness to learn new things and increase my knowledge in different aspects with full dedication and determination.