harmony 鸿蒙bundle
bundle
Overview
The bundle module provides APIs for querying application information.
System capability: SystemCapability.BundleManager.BundleFramework.Core
Since: 9
Summary
Files
Name | Description |
---|---|
native_interface_bundle.h | Provides application information structs and functions. File to include: <bundle/native_interface_bundle.h> Library: libbundle_ndk.z.so |
Structs
Name | Description |
---|---|
OH_NativeBundle_ApplicationInfo | Describes the application information. |
OH_NativeBundle_ElementName | Describes the application entry information. |
Functions
Name | Description |
---|---|
OH_NativeBundle_GetCurrentApplicationInfo | Obtains the current application information. |
OH_NativeBundle_GetAppId | Obtains the appId information about the current application. |
OH_NativeBundle_GetAppIdentifier | Obtains the appIdentifier information about the current application. |
OH_NativeBundle_GetMainElementName | Obtains the entry information about the current application. |
OH_NativeBundle_GetCompatibleDeviceType | Obtains the compatible device type of the current application. |
Function Description
OH_NativeBundle_GetCurrentApplicationInfo()
OH_NativeBundle_ApplicationInfo OH_NativeBundle_GetCurrentApplicationInfo()
Description
Obtains the current application information.
Since: 9
Returns
Returns the OH_NativeBundle_ApplicationInfo struct.
OH_NativeBundle_GetAppId()
char* OH_NativeBundle_GetAppId()
Description
Obtains the appId information about the current application.
Since: 11
Returns
Returns a string that describes the appId information of the application.
OH_NativeBundle_GetAppIdentifier()
char* OH_NativeBundle_GetAppIdentifier()
Description
Obtains the appIdentifier information about the current application. appIdentifier is the unique ID of the application. It is the app ID, which is a random string, allocated by AppGallery Connect during the creation of the application. This ID does not change along the application lifecycle, including version updates, certificate changes, public and private key changes, and application transfers. If you use multiple debugging devices, perform debugging offline, or need to interact with other applications, you are advised to use manual signature.
Since: 11
Returns
Returns a string that describes the appIdentifier information of the application.
OH_NativeBundle_GetMainElementName()
OH_NativeBundle_ElementName OH_NativeBundle_GetMainElementName()
Description
Obtains the application entry information, including the bundle name, module name, and ability name.
Since: 13
Returns
Returns the OH_NativeBundle_ElementName struct.
OH_NativeBundle_GetCompatibleDeviceType()
char* OH_NativeBundle_GetCompatibleDeviceType()
Description
Obtains the compatible device type of the current application. It helps you optimize the layout and font size when distributing mobile applications to tablets or 2-in-1 devices.
Since: 14
Returns
Returns a string indicating the compatible device type.
你可能感兴趣的鸿蒙文章
harmony 鸿蒙AbilityAccessControl
harmony 鸿蒙OH_NativeBundle_ApplicationInfo
harmony 鸿蒙OH_NativeBundle_ElementName
harmony 鸿蒙ability_access_control.h
- 所属分类: 后端技术
- 本文标签:
热门推荐
-
2、 - 优质文章
-
3、 gate.io
-
8、 golang
-
9、 openharmony
-
10、 Vue中input框自动聚焦