OpenHarmony 4.1 Release now available with over 4,000 new APIs

Thanks to Gamingdeputy netizens cloud past Lead delivery!

Gamingdeputy news on April 1, open sourceHongmeng OpenHarmony 4.1 Release versionReleased yesterday, the development kit was simultaneously upgraded to API 11 Release.

Compared with the 4.0 Release version, 4.1 Release has the following improvements:

Advertisement

  • More than 4,000 new APIs have been added to enrich application development capabilities;

  • The open capabilities of application development are presented in the Kit dimension, providing developers with clearer logic and scenario-based perspectives;

  • The openness and animation capabilities of ArkUI components have been further enhanced;

  • Web capabilities are complemented to facilitate developers to quickly build applications using Web capabilities;

  • Distributed capabilities further enhance network stability, connection security, etc.;

  • The media supports richer encodings, more sophisticated broadcast control capabilities, and more.

Gamingdeputy attaches the update log of OpenHarmony 4.1 Release as follows:

ArkUI

  • Support custom component expansion requirements: The framework provides Modifiers for basic components. Developers can inherit and implement custom Modifiers, and then use Modifiers to implement chain calls and parameter transfers. Modifier is used together with custom components to solve the problem of parameter passing in custom components. The Modifier mechanism supports single-point attribute updates.

  • Canvas supports GraphicContext to improve self-drawing capabilities and performance.

  • Text class controls support attributed strings

  • The controls are equipped with AI enhancement capabilities, including: Image, Video, XCopmonent and Canvas controls support entity recognition; text content information recognition supports extraction of time (schedule) and geographical location.

  • Status management capability optimization:

  • While the new interface retains the basic functions of the current interface, there is no need to call aboutToBeDeleted for deregistration, and it will not cause memory leaks;

  • @StorageLink, @StorageProp, @LocalStorageLink, @LocalStorageProp support undefined, null and union types;

  • The private ordinary variable or state variable processing strategy is enhanced;

  • Supports in-depth observation and can observe attributes in classes.

  • Enhanced pop-up component customization capabilities:

  • By calling the interface provided by promptAction, it supports customized display/exit animation;

  • Configure pop-up box style: set background color, rounded corners, width, height, border (color, width), shadow (offset, rounded corners, transparency, color), bubble arrow size settings;

  • Display/exit interaction: Provide callbacks when all pop-up boxes are about to pop up/exit, and provide callbacks for whether the pop-up boxes are allowed to exit.

  • Sliding scenes to optimize the average time consumption of a single frame.

application framework

  • When the application exits normally, the temp directory will be cleared to improve security and reduce system storage space consumption.

  • Enhanced Extension management and control capabilities: New background management and control of ServiceExtension and unified timeout mechanism are added.

  • ArkTS card capability enhancement: Added transparent card, data agent refresh, monochrome mode and lock screen card capabilities.

Application package management

  • System-level HSP supports OTA upgrade;

  • Added guidance on optimizing the size of modular development packages.

Distributed soft bus

  • Build soft bus transmission QoS interface capabilities to better manage and control underlying link resources and provide routing decisions to improve distributed business experience.

  • Subsystem specification capabilities continue to be enhanced, routing is enhanced with connection reliability confirmation capabilities, and support for dynamic setting of connection parameters based on resource conditions is supported.

  • Completed the enhancement of the subsystem DFX mechanism, such as: supporting interconnected radar management, supporting upper-layer distributed business statistics, and supporting business alarms for network monitoring events.

  • IPC supports interfaces for reference technology query and timestamp query, as well as enhanced dimensionality testing capabilities.

Distributed data management

  • UDMF supports standardized definition and description of data types, supports standard data type queries, supports data access authorization and management, and supports application-defined data types.

  • The newly restricted data is not allowed to be synchronized across devices without classification and rating labels.

  • preferences supports modification, query and persistence of uint8Array format data stream.

  • RDB supports creating databases in the subdirectory of the sandbox path specified by the application.

Graphics images and windows

graphic image

  • The system supports variable frame rate and provides API for business access.

  • Supports the rendering and display of HDR Vivid videos.

  • The graphics NDK capabilities are enhanced, supporting adding OnFrameAvailableListener callback for NativeImage, supporting setting color gamut for NativeWindow, adding support for opengl extension interface, further improving Drawing capabilities, etc.

  • Supports screen recording without recording specific windows, and the ability to record private windows as full black frames.

  • Support adjusting system resolution.

  • Support the system to adjust the frame rate based on animation, and support developers to adjust the application business frame rate.

  • Enhanced animation capabilities, support for hardware hollowing out, screen rounding, Navigation transition animation to support shared elements, etc.

  • The graphics rendering pipeline supports the vulkan backend.

  • Graphics access the Drawing interface.

  • nativeWindow supports setting metadata and adapts to HDR video scenes. Dynamic metadata is passed along with the frame.

window

  • Provides Window stage interactive status notifications.

  • Provides a global search window type.

media

  • Support call applications to access media sessions.

  • Supports color customization and status monitoring of broadcast components.

  • Audio and video codec supports AVBuffer structure and zero copy of system data.

  • Decapsulation adds support for AMR/MKV specifications.

camera

  • The camera PipeLine code has been optimized, and each PipeLine stream is decoupled, allowing different streams to configure different resolutions.

  • Complements the USB camera driver function and can control the automatic/manual exposure, focus and white balance of the USB camera.

  • Adding a private TAG channel defines the implementation of private TAG, allowing device manufacturers to define the camera Metadata TAG themselves.

event notification

  • Support system applications to send live window type notifications.

  • Emitter: supports subscribing to string type events; the data passed when sending events supports serializable types; supports obtaining the number of subscribers.

  • Support applications to only receive custom public events published by themselves.

Public basic class library

  • Supports creation of Workers in HAR/HSP.

  • TaskPool supports sending messages to the host thread during execution.

Communication and connection

  • NFC provides HCE card emulation capabilities.

  • Default payment application processing can be displayed and set in system settings, and changes to the default payment application can be identified.

  • Wi-Fi provides hotspot type query, which can query whether the currently connected hotspot is a mobile hotspot.

  • Supports Wi-Fi as a hotspot and supports the ability to add connected STA devices to the blacklist.

Location

  • Supports deleting auxiliary data through the sendCommand interface to support hot and cold startup testing.

  • Supports geocoding, reverse geocoding, querying geocoding service status and other interfaces.

  • Supports MDM calling the location service interface to force the location service function to be turned on or off in MDM control scenarios.

power supply

  • The code structure of DisplayPowerManager has been adjusted, and the brightness management function module has become an independent module.

  • Added support for charging animation display when the device is turned off, and the charging power can be changed and updated.

Safety

  • Certificate management: supports opening user ca certificate paths, supporting certificate chain verification and revocation checking capabilities, and supporting certificate chain construction capabilities.

  • Key asset storage: In response to the request of application developers to locally encrypt and store key and sensitive short data (such as user account passwords, bank card numbers, etc.), the system provides the ability to encrypt key asset storage, as well as corresponding security access control capabilities, including:

    • Support writing and reading of key assets.

    • Support key asset updates.

    • Support the safe destruction of critical assets.

    • Support access control of critical assets.

program access control

authority management

  • Supports raising permission pop-up windows on the UIExtensionAbility interface.

  • Permission usage record adds lock screen status record

  • Supports pop-up options to allow permissions during application use.

DLP Rights Management Services

  • Supports access control on controlled files based on time dimension.

  • Support document creators to open documents offline in any scenario.

  • Supports pop-up box for account login verification when the account is not logged in.

  • Provides a mechanism and channel for sandbox applications to read raw application data.

ArkCompiler

  • The dynamic import capability supports variables as parameters.

  • Provides an API for instrumenting and replacing class methods at runtime.

  • Support using “#” to declare private members of a class.

  • Supports cross-thread serialized transmission of Sendable class.

  • Supports Ecmascript2022 specification.

Resource management

  • support module.json Add a resource index to the configuration file through the right-click menu.

  • Supports packaging and compilation of resfile resource directories.

  • Supports returning resource id based on resource name.

USB

  • Complete USB service device management capabilities, support disabling and disabling of all devices, by device type, and specified devices, and support disabling policy persistence in restart and hot-plug scenarios.

  • Optimize the USB service authentication method, add access control permissions, and refine the USB calling permissions of system services and system applications.

  • Repair the interface vulnerability of USB service batch transmission and control transmission, support the end-to-end availability of the transmission interface, and meet the performance requirements.

Multimode input

  • Supports double-clicking the power button to pull up the ability.

  • Support custom mouse cursor.

  • Multi-mode input settings mouse style optimization.

  • Supports the ability to process keystroke monitoring according to priority.

  • Supports cursor size and color settings, and supports animated cursor styles.

Pan-Sensor

  • Supports reporting of sensor data accuracy, allowing the system to perceive the sensor accuracy of different devices and optimize application adaptation.

  • Added C API interfaces for sensor and vibration related capabilities.

  • The custom vibration format has been expanded to support the curve field to describe complex continuous vibration effects.

Device management

Supported on small device platforms @ohos.deviceInfo.d.ts related APIs.

testing framework

Automated testing framework arkxtest

  • Supports simulated UI operation capabilities such as simulating mouse wheel sliding, sliding left and right keys and double-clicking.

  • Supports Shell command mode for UI simulation operations, and supports common operations such as clicking, sliding, double-clicking, and text input.

  • Improve the efficiency of UI testing framework in finding control information.

  • Enhanced dump information content, adding text size and text color information.

  • Add asynchronous listening capabilities to monitor system pop-up events, obtain their text information and return it.

Test scheduling framework xDevice

  • Added the ability to automatically retest failed items during a single test, and supports configuring the number of retests, and finally generates a test report.

  • Optimize test reports and unify test report header information for lightweight systems, small systems, and standard systems.

  • Added support for configuring a remote download address when the test suite test resource does not exist locally.

Stability testing tool WuKong

  • Added the configuration capability of page page and Ability page to support configuring page shielding during testing to improve testing efficiency.

  • A new single-scenario stress test capability is added, which supports cyclic injection of operation events for a certain control and supports the configuration of the number of cycles.

Performance development tool SmartPerf Host

  • Added support for collection, analysis and display of hilog and hisysevent.

  • Added support for analysis and display of hiperf event count.

  • Improve the ability to capture traces, which can be paused and debugged dynamically.

  • Added support for fast tracking of thread wake-up relationship trees.

Performance testing tool SmartPerf Device

  • Optimize the existing ability to capture memory and CPU data.

  • Added a new command to start and stop collection.

  • Added the ability to regularly obtain screenshots, resolution and refresh rate.

DFX

  • Provides CPU, GPU, memory, IO, network, and trace collection capabilities.

  • The fault type data ecosystem is open.

  • HiDebug supports collection of resource information during application runtime.

  • HiProfiler supports in-depth tuning of high-power applications in CPU, GPS, AUDIO, DISPLAY, and GPU; supports time-consuming analysis of dynamic scenes (start, exit, screen rotation, transition, and sliding); supports lightweight collection of ftrace data.

  • HiProfiler/HiDumper jointly provide collection and enhancement of memory process extended memory information.

  • HiTrace supports lightweight and long-term collection.

  • HiPerf supports symbol parsing and stack aggregation capabilities.

Upload Download

  • Supports the ability to share the number of tasks between multiple front-end mode tasks and background mode tasks.

  • Supports monitoring the status and progress of background tasks.

  • Supports the priority of tasks. Tasks in front-end (or background) mode can also use priority to adjust the order of execution.

  • Automatically use system-level proxies.

input method framework

  • Optimized the input method experience of the Webview focus scene.

  • Optimized the input method experience in window focus switching scenarios.

  • Added support for safe mode input method.

  • Added support for Logo key + Space switching input method.

  • Added input method switching list control.

Time time zone

  • Supports configuring NTP server addresses through system parameters, up to 5 configurations are supported.

  • Supports configuring time and time zone automatic synchronization switch through system parameters.

globalization

  • Supports obtaining application language list.

  • Supports fast date calculation.

  • Support text time recognition.

  • Supports setting and obtaining application preference language.

  • Support periods are expressed according to the customs of different countries or regions.

AI

MindSpore Lite's lightweight client-side learning capabilities open C API.

upgrade

  • The ability to support differential multi-threaded upgrades.

  • Add a hardware failure retry mechanism during the upgrade process to improve upgrade reliability.

  • The language parameters in normal mode can be updated synchronously to the updater simplified system used in the upgrade phase.

Web

  • Added support for web accessibility.

  • Added page jump event reporting interface.

  • Supports application and network proxy and application certificate management.

  • Supports same-layer rendering capabilities (only for some components such as xcomponent and button).

  • The component supports executing JS scripts injected in advance after the DOM is built.

  • Open the C API interface of RegisterJavaScriptProxy and RunJavaScript capabilities.

  • The resource interception feature supports setting to ArrayBuffer data type.

Advertisement