DEV Community

kouwei qing
kouwei qing

Posted on

HarmonyOS Next 5.0.5 Beta1 Update Notes and Adaptation Guide

HarmonyOS Next 5.0.5 Beta1 Update Notes and Adaptation Guide

On April 27, 2025, HarmonyOS 5.0.5 Beta1 further enriches the component capabilities of ArkUI and improves the management capabilities of applications in windowed scenarios based on the previously released HarmonyOS 5.0.4 Release.

OS Platform Capabilities

The complete supporting information for HarmonyOS 5.0.5 Beta1 is as follows:

Software Package Release Type Version Number Build Version Release Date
System Beta HarmonyOS 5.0.5 Beta1 Software Version: 5.0.0.160

API Version: 5.0.5 (17)
2025/04/24
DevEco Studio Beta DevEco Studio 5.0.5 Beta1 5.0.13.100 2025/04/24
SDK Beta HarmonyOS 5.0.5 Beta1 SDK Based on OpenHarmony SDK Ohos_sdk_public 5.0.5.160 (API 17 Beta1) 2025/04/24

New Features

The 5.0.5 Beta1 version adds and enhances the following features:

Ability
  • New support for specifying the size of a new window created via the StartOptions attribute of startAbility (minWindowWidth, minWindowHeight, maxWindowWidth, maxWindowHeight).
  • New C API support for passing StartOptions when launching an Ability.
  • New C API support for obtaining child process startup parameters.
  • New C API support for setting the display mode of window and dock icons when launching an Ability.
Operation Old Version New Version d.ts File
Class adds optional members Class: global;

API declaration:

Difference: NA
Class: StartOptions;

API declaration: minWindowWidth?: number;

Difference: minWindowWidth?: number;
api/@ohos.app.ability.StartOptions.d.ts
Class adds optional members Class: global;

API declaration:

Difference: NA
Class: StartOptions;

API declaration: minWindowHeight?: number;

Difference: minWindowHeight?: number;
api/@ohos.app.ability.StartOptions.d.ts
Class adds optional members Class: global;

API declaration:

Difference: NA
Class: StartOptions;

API declaration: maxWindowWidth?: number;

Difference: maxWindowWidth?: number;
api/@ohos.app.ability.StartOptions.d.ts
Class adds optional members Class: global;

API declaration:

Difference: NA
Class: StartOptions;

API declaration: maxWindowHeight?: number;

Difference: maxWindowHeight?: number;
api/@ohos.app.ability.StartOptions.d.ts
Class adds mandatory attribute or non-homonymous method Class: global;

API declaration:

Difference: NA
Class: UIAbilityContext;

API declaration: revokeDelegator(): Promise;

Difference: revokeDelegator(): Promise;
api/application/UIAbilityContext.d.ts
ArkData

UDMF newly supports converting incoming data into a multi-style data structure. If the original data uses multiple records to carry different styles of the same data, this interface can be used to convert the original data into a multi-style data structure.

Operation Old Version New Version d.ts File
Add API NA Class: relationalStore;

API declaration: enum Tokenizer

Difference: enum Tokenizer
api/@ohos.data.relationalStore.d.ts
Add API NA Class: Tokenizer;

API declaration: NONE_TOKENIZER = 0

Difference: NONE_TOKENIZER = 0
api/@ohos.data.relationalStore.d.ts
Add API NA Class: Tokenizer;

API declaration: ICU_TOKENIZER

Difference: ICU_TOKENIZER
api/@ohos.data.relationalStore.d.ts
Add API NA Class: unifiedDataChannel;

API declaration: function convertRecordsToEntries(data: UnifiedData): void;

Difference: function convertRecordsToEntries(data: UnifiedData): void;
api/@ohos.data.unifiedDataChannel.d.ts
Interface adds optional attribute Class: global;

API declaration:

Difference: NA
Class: StoreConfig;

API declaration: tokenizer?: Tokenizer;

Difference: tokenizer?: Tokenizer;
api/@ohos.data.relationalStore.d.ts
AR Engine

New depth estimation provides 3D perception capabilities, enabling measurements, volume estimation, etc.

ArkUI
  • New mouse axis event-related interfaces.
  • NavDestination adds onActive and onInactive lifecycles.
  • Enhanced event capabilities in C API, newly supporting obtaining the width, height, X coordinate, Y coordinate, etc., of the component hit by the event.
  • New basic type definitions support clearing the current pre-screen text content.
  • UIContext newly supports creating UI instances independent of windows.
  • Visible area change events for components newly support setting callback parameters for events and limiting their execution intervals.
  • The ImageAnimator component supports setting whether to judge component pause and play through the system's onVisibleAreaChange visibility.
  • Picture-in-picture windows support creating a page-level UI state storage unit via the creation parameter LocalStorage, which can be used to track the main window instance in multi-instance scenarios.
  • Window management for PC/2in1 devices newly supports the size memory function for the main window.
  • Window management for PC/2in1 and tablet devices newly supports setting the blur radius of the edge shadow for sub-windows or floating windows.
  • Window management for PC/2in1 and tablet devices newly supports setting whether sub-windows can be displayed across multiple screens simultaneously when their parent window is being dragged or resized.
Audio Kit

New support for Float32 audio stream sampling format.

AVCodec Kit

Video decoding newly supports software decoding for MPEG2, MPEG4, and H.263.

AVSession Kit

New support for the singleLyricText attribute for single-line/lyric display.

Operation Old Version New Version d.ts File
Interface adds optional attribute Class: global;

API declaration:

Difference: NA
Class: AVMetadata;

API declaration: singleLyricText?: string;

Difference: singleLyricText?: string;
api/@ohos.multimedia.avsession.d.ts
Background Tasks Kit

New background child process management module provides applications with the ability to suppress and unsuppress child processes, preventing excessive system resource consumption by child processes from causing system lag.

Operation Old Version New Version d.ts File
Add API NA Class: global;

API declaration: declare namespace backgroundProcessManager

Difference: declare namespace backgroundProcessManager
api/@ohos.resourceschedule.backgroundProcessManager.d.ts
Add API NA Class: backgroundProcessManager;

API declaration: export enum ProcessPriority

Difference: export enum ProcessPriority
api/@ohos.resourceschedule.backgroundProcessManager.d.ts
Add API NA Class: ProcessPriority;

API declaration: PROCESS_BACKGROUND = 1

Difference: PROCESS_BACKGROUND = 1
api/@ohos.resourceschedule.backgroundProcessManager.d.ts
Add API NA Class: ProcessPriority;

API declaration: PROCESS_INACTIVE = 2

Difference: PROCESS_INACTIVE = 2
api/@ohos.resourceschedule.backgroundProcessManager.d.ts
Add API NA Class: backgroundProcessManager;

API declaration: function setProcessPriority(pid: number, priority: ProcessPriority): Promise;

Difference: function setProcessPriority(pid: number, priority: ProcessPriority): Promise;
api/@ohos.resourceschedule.backgroundProcessManager.d.ts
Add API NA Class: backgroundProcessManager;

API declaration: function resetProcessPriority(pid: number): Promise;

Difference: function resetProcessPriority(pid: number): Promise;
api/@ohos.resourceschedule.backgroundProcessManager.d.ts
Add kit Class: global;

API declaration:

Difference: NA
Class: global;

API declaration: api@ohos.resourceschedule.backgroundProcessManager.d.ts

Difference: BackgroundTasksKit
api/@ohos.resourceschedule.backgroundProcessManager.d.ts
Connectivity Kit

The Bluetooth socket module newly supports obtaining the peer device address via clientSocket.

Operation Old Version New Version d.ts File
Add API NA Class: socket;

API declaration: function getDeviceId(clientSocket: number): string;

Difference: function getDeviceId(clientSocket: number): string;
api/@ohos.bluetooth.socket.d.ts
Delete API Class: opp;

API declaration: function createOppServerProfile(): OppServerProfile;

Difference: function createOppServerProfile(): OppServerProfile;
NA api/@ohos.bluetooth.opp.d.ts
Starting version change Class: global;

API declaration: declare namespace opp

Difference: 15
Class: global;

API declaration: declare namespace opp

Difference: 16
api/@ohos.bluetooth.opp.d.ts
Starting version change Class: opp;

API declaration: interface OppServerProfile

Difference: 15
Class: opp;

API declaration: interface OppServerProfile

Difference: 16
api/@ohos.bluetooth.opp.d.ts
File Manager Service Kit

【New Kit】File Manager Service Kit provides developers with file management capabilities, allowing developers to delete files to the recycle bin, obtain file icons, etc., to meet users' diverse file management needs.

Operation Old Version New Version d.ts File
Add API NA Class: global;

API declaration: declare namespace fileManagerService

Difference: declare namespace fileManagerService
api/@hms.filemanagement.fileManagerService.d.ts
Add API NA Class: fileManagerService;

API declaration: function deleteToTrash(uri: string): Promise;

Difference: function deleteToTrash(uri: string): Promise;
api/@hms.filemanagement.fileManagerService.d.ts
Add API NA Class: fileManagerService;

API declaration: function getFileIconSync(fileType: string): string \
Resource;

Difference: function getFileIconSync(fileType: string): string \
Add API NA Class: fileManagerService;

API declaration: function getFileIcon(fileType: string): Promise<string \
Resource>;

Difference: function getFileIcon(fileType: string): Promise<string \
Add kit Class: global;

API declaration:

Difference: NA
Class: global;

API declaration: api@hms.filemanagement.fileManagerService.d.ts

Difference: FileManagerServiceKit
api/@hms.filemanagement.fileManagerService.d.ts
Add kit Class: global;

API declaration:

Difference: NA
Class: global;

API declaration: kits@kit.FileManagerServiceKit.d.ts

Difference: FileManagerServiceKit
kits/@kit.FileManagerServiceKit.d.ts
IME Kit

The input method framework newly supports setting callbacks for displaying preview text and subscribing to events where the input method application operates on text preview content.

Operation Old Version New Version d.ts File
Add API NA Class: inputMethod;

API declaration: export type SetPreviewTextCallback = (text: string, range: Range) => void;

Difference: export type SetPreviewTextCallback = (text: string, range: Range) => void;
api/@ohos.inputMethod.d.ts
Interface adds optional or mandatory method Class: global;

API declaration:

Difference: NA
Class: InputMethodController;

API declaration: on(type: 'setPreviewText', callback: SetPreviewTextCallback): void;

Difference: on(type: 'setPreviewText', callback: SetPreviewTextCallback): void;
api/@ohos.inputMethod.d.ts
Interface adds optional or mandatory method Class: global;

API declaration:

Difference: NA
Class: InputMethodController;

API declaration: off(type: 'setPreviewText', callback?: SetPreviewTextCallback): void;

Difference: off(type: 'setPreviewText', callback?: SetPreviewTextCallback): void;
api/@ohos.inputMethod.d.ts
Interface adds optional or mandatory method Class: global;

API declaration:

Difference: NA
Class: InputMethodController;

API declaration: on(type: 'finishTextPreview', callback: Callback): void;

Difference: on(type: 'finishTextPreview', callback: Callback): void;
api/@ohos.inputMethod.d.ts
Interface adds optional or mandatory method Class: global;

API declaration:

Difference: NA
Class: InputMethodController;

API declaration: off(type: 'finishTextPreview', callback?: Callback): void;

Difference: off(type: 'finishTextPreview', callback?: Callback): void;
api/@ohos.inputMethod.d.ts
Media Kit

When setting the playback strategy for the media player AVPlayer, new support for displaying the first frame of the video after Prepare (showFirstFrameOnPrepare).

Operation Old Version New Version d.ts File
Interface adds optional attribute Class: global;

API declaration:

Difference: NA
Class: PlaybackStrategy;

API declaration: showFirstFrameOnPrepare?: boolean;

Difference: showFirstFrameOnPrepare?: boolean;
api/@ohos.multimedia.media.d.ts
Payment Kit

New capability to guide users to bind cards.

Operation Old Version New Version d.ts File
Add API NA Class: paymentService;

API declaration: interface BindCardResult

Difference: interface BindCardResult
api/@hms.core.payment.paymentService.d.ts
Add API NA Class: BindCardResult;

API declaration: hasBankCard: boolean;

Difference: hasBankCard: boolean;
api/@hms.core.payment.paymentService.d.ts
Add API NA Class: BindCardResult;

API declaration: hasJustBoundCard?: boolean;

Difference: hasJustBoundCard?: boolean;
api/@hms.core.payment.paymentService.d.ts
Add API NA Class: paymentService;

API declaration: function requestBindCard(context: common.UIAbilityContext \
common.UIExtensionContext): Promise;

Difference: function requestBindCard(context: common.UIAbilityContext \
PDF Kit

New support for encrypting PDF documents.

Operation Old Version New Version d.ts File
Class adds mandatory attribute or non-homonymous method Class: global;

API declaration:

Difference: NA
Class: PdfDocument;

API declaration: setPdfPassword(password: string): boolean;

Difference: setPdfPassword(password: string): boolean;
api/@hms.

Top comments (0)