OpenHarmony 5.1.0 (API 18) is officially launched: further enhancing ArkUI and media capabilities, and improving standard web capabilities
The official version of OpenHarmony 5.1.0 Release was released on April 30 and the Gitee platform was launched, and API 18 was upgraded.
IT Home reported on May 4 that the open source HarmonyOS OpenHarmony is an open source project incubated and operated by the Open Atom Open Source Foundation, with the goal of building a framework and platform for the operating system of intelligent terminal devices for the era of full scenarios, full connections, and full intelligence, so as to promote the prosperity and development of the Internet of Everything industry.
The official version of OpenHarmony 5.1.0 Release was released on April 30 and the Gitee platform was launched, and API 18 was upgraded.
Compared with the previous Release version (OpenHarmony 5.0.3, API 15), OpenHarmony 5.1.0 Release focuses on the following new features or enhancements:
ArkUI is further enhanced to provide richer component property settings, support more exquisite animations, and continue to supplement the ability of components to be called through C APIs.
Further enhance media capabilities, providing richer encoding and decoding capabilities, broadcast control capabilities, and media session management capabilities;
It further enriches the ability to set the details of application launch;
Further enhance the data processing capabilities of UDMF and RDB for distributed data management;
Standard web capabilities have been further refined, and more.
The official release notes attached to IT Home are as follows, which will be listed in the order of API versions:
Apply the framework
Added support for creating an application context based on a specified data encryption level to obtain the corresponding path.
Added support for obtaining the process name of the current process synchronously.
Added support for getting the reason why the app is pulled up (LAUNCH_REASON_MESSAGE).
Added support for HAR/HSP and so files to the startup framework.
Added support for specifying the maximum width and height (maxWindowWidth / maxWindowHeight) and minimum width and height (minWindowWidth / minWindowHeight) of the main window when starting Ability.
Added support for obtaining the detailed reason for the last exit of an app.
Added support for setting the color mode of UIAbility.
Added support for specifying the size of the new window (minWindowWidth, minWindowHeight, maxWindowWidth, maxWindowHeight) via the startAbility property startOptions.
C API added support for passing startOptions when starting Ability.
C API adds support for setting the display mode of window and dock bar icons when starting Ability.
A new batch of C API functions is added to obtain the file directories in the application-level sandbox.
Application package management
Added a new redirection configuration file module.json5: use the abilitySrcEntryDelegator to identify the name of the UIAbility that the current module needs to be redirected to, and use the abilityStageSrcEntryDelegator Identifies the name of the Module corresponding to UIAbility to which the current Module needs to be redirected (not the name of the current Module), and the two are used in combination to specify the target object of the redirect.
ArkUI
Enhancements to the text and input components. Include:
The text component supports the NODE_IMMUTABLE_FONT_WEIGHT property, which does not change with the system font weight.
The text component supports sharing services for selected text and line wrapping by syllables.
Added support for setting the text selection menu to be displayed in a separate window.
The RichEditor component allows you to set the maximum number of lines.
The TextInput component supports setting the text omitted position.
The TextInput / TextArea / Search / RichEditor component supports splitting text lines evenly to the top and bottom of lines.
The TextInput / TextArea component extends the autofill type to include: license plate number, passport number, and so on.
The RichEditor component supports vibration effects when you press and hold the preview menu.
Added support for clearing the current pre-screen text content in the base type definition.
Added the ability to fit round screens. Include:
A new crown rotation event has been added, where the component is focused and twists the crown to obtain timestamp, angular velocity, angle of rotation, and crown action.
The arc list components, ArcList and ArcListItem, have been added to present continuous, multi-row data of the same type.
ArcAlphabetIndexer, a curved index bar component, is added, which can be sorted alphabetically for quick positioning.
ArcScrollBar has been added to add an external scrollbar to the arc list.
ArcButton, a curved button component, has been added, which provides highlight, normal, and warning buttons.
Universal drag and drop capability enhanced. Include:
Support encapsulation of custom placement animations.
Customizable controls trigger auto-scrolling when dragging to the edge of a scrollable component.
The pop-up window capability has been enhanced. Include:
You can set levelOrder to manage the display order of pop-up boxes, so that the pop-up boxes with higher levels are overlaid on top of the pop-up boxes with lower levels.
You can create and disable custom pop-up windows in custom content.
The Popup component supports setting the maximum width via maxWidth.
The half-modal popup-style pop-up window supports setting the display position relative to the target through placement, and setting whether the pop-up window can be overlaid on the target node through placementOnTarget.
Menu and Dialog support setting custom background blur via backgroundBlurStyleOptions and backgroundEffect.
Modal Transitions and MenuItem support!! Bind variables in both directions.
After a custom pop-up supports keyboard avoidance, use keyboardAvoidDistance to set the minimum distance between the pop-up window and the keyboard.
You can use showInSubWindow to set whether the half-modal is displayed in the sub-window, and you can use effectEdge to set the effect of scrolling on the edge of the half-modal panel.
The Menu supports vibration effects when popped up.
The ability of the form selection component has been enhanced. Include:
The SegmentButtonV2 component is added to create tab, single, or multi-select capsule segment buttons.
The TextPicker / TimePicker option triggers an event callback when the selected area is entered.
TimePicker / CalendarPicker supports configuring start and end times via start and end.
TimePicker supports setting 12-hour clock time through enableCascade to follow the time in the morning and afternoon.
Scrolling and sliding components have been enhanced. Include:
The Swiper / Tabs component adds a callback that is triggered when a selected element on the page changes, returning the index value of the currently selected or hidden element.
The Swiper component adds the ability to control whether a subcomponent stops autoplay when a finger or mouse is pressed on the screen, for example.
The Swiper component CAPI capability has been enhanced to set whether the cache node is displayed, the style of the numeric navigation points, and the navigation arrows.
The List component supports 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).
The C API is added to support the gesture interruption event callback function that can be configured with user-defined data.
The C API is added to support obtaining the width, height, and coordinates of the event hit component.
Supports setting custom focus logic for components.
Gesture configuration parameters can be dynamically obtained, and the threshold of consecutive clicks can be returned.
Gesture event information can be returned in the onActionCancel callback triggered when the gesture is canceled.
Accessibility supports customizing the focus order, controlling the screen reading mode of the component, and setting the screen reading scrolling operation.
You can set the occupancy event of the EmbeddedComponent or UIExtensionComponent component to specify how the gesture event is responded.
You can move the current FrameNode to the specified location of the target FrameNode to implement cross-instance node migration.
NodeController adds lifecycle callback APIs (onAttach, onDetach, onWillBind, onWillUnbind, onBind, onUnbind, onUnbind, onUnbind) before and after the node is unbound.
Screenshots of UI components built by ComponentContent are supported.
Added APIs related to mouse axis events.
NavDestination adds OnActive and OnInActive lifecycles.
The event capability of the C API has been enhanced, and the ability to obtain the width, height, X coordinates, and Y coordinates of components hit by an event has been added.
UIContext adds support for creating UI instances that don’t depend on windows.
Added support for setting the callback parameters of the event to limit its execution interval.
The ImageAnimator component supports setting whether to determine whether to pause and play the component by the visibility of the system onVisibleAreaChange.
Window management
Added a monitoring callback for the completion of the pop-up animation of the soft keyboard.
The picture-in-picture window supports the creation of the parameter LocalStorage to achieve a page-level UI state storage unit, which can be used to track the main window instance under multiple instances.
Added support for creating virtual screens in window management.
Graphic images
A new batch of C API functions and enums have been added to support GPU rendering capabilities that draw directly to the screen buffer.
Distributed data management
RelationalStore adds rootDir configuration, which supports opening databases in non-database directories.
ArkData RDB provides a vector data storage approximation query solution.
Relational databases (RDS) support for obtaining column data types based on specified column indexes or column names.
UDMF adds support for converting incoming data into multi-style data structures. If the original data uses multiple records to carry different styles of the same data, you can use this API to convert the original data into a multi-style data structure.
media
audio
Added support for Float32 audio output.
Added support for spatial audio management.
Audio and video codecs
Added support for MPEG2, MPEG4, and H.263 for video decoding.
Playback controls
The player supports transparent transmission of SEI field data to applications, which is suitable for HTTP-FLV live streaming.
When you call AVPlayer to set a playback policy, you can add support for displaying playback policies such as showFirstFrameOnPrepare and preferredBufferDurationForPlaying after Prepare.
The player supports playing pre-downloaded video data.
When you call AVPlayer to set a playback policy, thresholdForAutoQuickPlay is supported.
Enhancements: Apps can create multiple SoundPool instances.
When you call AVPlayer to set a playback policy, the first frame of the video after Prepare (showFirstFrameOnPrepare) is displayed.
Added support for setting the target loop mode (setTargetLoopMode) through AV session command passing, and provides event listening callbacks for setting actions.
Added support for single-sentence/single-lyricText property for audio conversations.
Image
Added C API support for getting editable flags for images.
Recording
Added an enumeration of video fill modes during screen recording.
Added support for configuring the stable recording mode enableStableQualityMode18 in the audio and video recording configuration file.
The language compiler runtime
TaskPool supports the concurrency of task execution and the queuing policy of the specified task.
TaskPool supports canceling tasks in a task pool by task ID.
collections (ArkTS pods) adds support for the following methods in API 18: Array: from, isArray, of, copyWithin, lastIndexOf, some, reduceRight, reverse, toString, every, toLocaleStringTypedArray:toString、toLocaleString、lastIndexOf、reduceRight
Sendable allows you to replace the least recently used data with new data when you don’t have enough cache space.
Workers allow you to specify the priority of a task when you create it.
safe
Added group-based access control for critical assets. By setting group attributes, multiple apps developed by the same developer can share data.
DFX
Added support for dumping raw heap snapshots of virtual machines for the current thread.
Enterprise customization
Disable/enable feature restrictions: add MTP (mtpClient / mtpServer) and factory reset (resetFactory).
Added support for installing user certificates by system account.
Added support for adding, deleting, and switching system events for subscribing accounts.
Basic communication
Added the function of obtaining the virtual MAC address of the peer Bluetooth device on the Bluetooth socket server
Added the ability to obtain the original name of the peer Bluetooth device.
Added the ability to connect to the available profiles of peer Bluetooth devices, such as A2DP, HFP, HID and other protocol profiles.
Added the ability to persistently store the virtual MAC address of the peer Bluetooth device.
The new Bluetooth BLE scanning fence mode allows you to report a BLE broadcast packet to the fence when it is first scanned, and to leave the fence when it does not scan a BLE broadcast packet, and carry the BLE broadcast packet information.
Improve the device information searched by Bluetooth, and add RSSI (signal strength), name, and category information to obtain the device RSSI.
Added the function of reading and sending Bluetooth socket data asynchronously, and if the link is disconnected, an IO exception will be reported.
Location Services
Added support for subscribing to Bluetooth scanning information reporting events for auxiliary positioning.
Network management
Added support for obtaining file descriptors for TLSSocket.
clipboard
The clipboard supports getting the number of times the content of the clipboard has changed.
Input
The input method framework adds support for setting the callback when the preview text is displayed, and supports subscribing to the event of the input method application operation text preview content.
Web
You can get the element information of the last clicked area.
You can set whether the font weight is enabled for web components to change according to the system settings.
Support the audio and video in the web can be connected to the broadcast control center.
Compatible with W3C specifications, you can specify the type of file to be uploaded by accepting.
Provides a static method to clear the resource cache files in your app.
Added support for elements rendered on the same layer with a fixed width and height.
Multimode inputs
Added support for setting callbacks for the specified button of the app operation in the foreground.
Upload and download
Upload and download supports the ability to cache and download applications, and supports caching files to the sandbox directory or memory in advance.
The API for uploading and downloading the agent allows you to set the maximum speed limit of the task and the content-type field of the file to be uploaded in the form.
Resource scheduling
The background sub-process management module is added to provide the ability for applications to suppress and decompress sub-processes, so as to prevent sub-processes from occupying too much system resources and causing system lag.
The new growth time mission car key subtype CAR_KEY. The new growth time mission car key subtype CAR_KEY.
In the background agent reminder, you can set the resource ID for the reminder title and reminder content fields for global adaptation.
globalization
Added support for obtaining the user’s preferred temperature unit and the start day of the week.
Added support for refined formatting of date/number, which is convenient for more flexible use of formatting capabilities.
Added support for number formatting that returns rich text.
Added the ability to display paths locally, which can determine whether the path needs to be mirrored based on the input language.
Test the framework
Added the ability to find the ID and type of the widget that meet the requirements according to fuzzy matching/regular matching.
Added support for getting control prompt text and finding control based on control prompt text.
Added support for horizontal and vertical search controls, which is only applicable to controls that support swiping.
Source: OpenHarmony 5.1.0 (API 18) is officially launched: further enhancing ArkUI and media capabilities, and improving standard web capabilities - HarmonyOSHub + ITHome (China)