• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# bundle
2
3
4## Overview
5
6The bundle module provides APIs for querying application information.
7
8**System capability**: SystemCapability.BundleManager.BundleFramework.Core
9
10**Since**: 9
11
12
13## Summary
14
15
16### Files
17
18| Name| Description|
19| -------- | -------- |
20| [native_interface_bundle.h](native__interface__bundle.md) | Provides application information structs and functions.<br>**File to include**: &lt;bundle/native_interface_bundle.h&gt;<br>**Library**: libbundle_ndk.z.so|
21
22
23### Structs
24
25| Name| Description|
26| -------- | -------- |
27| [OH_NativeBundle_ApplicationInfo](_o_h___native_bundle_application_info.md) | Describes the application information.|
28| [OH_NativeBundle_ElementName](_o_h___native_bundle_element_name.md) | Describes the application entry information.|
29
30
31
32### Functions
33
34| Name| Description|
35| -------- | -------- |
36| [OH_NativeBundle_GetCurrentApplicationInfo](#oh_nativebundle_getcurrentapplicationinfo) | Obtains the information about the current application.|
37| [OH_NativeBundle_GetAppId](#oh_nativebundle_getappid) | Obtains the appId information about the current application.|
38| [OH_NativeBundle_GetAppIdentifier](#oh_nativebundle_getappidentifier) | Obtains the appIdentifier information about the current application.|
39| [OH_NativeBundle_GetMainElementName](#oh_nativebundle_getmainelementname) | Obtains the application entry information.|
40
41
42## Function Description
43
44
45### OH_NativeBundle_GetCurrentApplicationInfo()
46
47```
48OH_NativeBundle_ApplicationInfo OH_NativeBundle_GetCurrentApplicationInfo()
49```
50
51**Description**
52
53Obtains the information about the current application.
54
55**Since**: 9
56
57**Returns**
58
59Returns the [OH_NativeBundle_ApplicationInfo](_o_h___native_bundle_application_info.md) struct.
60
61### OH_NativeBundle_GetAppId()
62
63```
64char* OH_NativeBundle_GetAppId()
65```
66
67**Description**
68
69Obtains the appId information about the current application.
70
71**Since**: 11
72
73**Returns**
74
75Returns a string that describes the appId information of the application.
76
77### OH_NativeBundle_GetAppIdentifier()
78
79```
80char* OH_NativeBundle_GetAppIdentifier()
81```
82
83**Description**
84
85Obtains the appIdentifier information about the current application. appIdentifier is the unique ID of the application, which is allocated by the cloud. This ID does not change along the application lifecycle, including version updates, certificate changes, public and private key changes, and application transfers.
86
87**Since**: 11
88
89**Returns**
90
91Returns a string that describes the appIdentifier information of the application.
92
93### OH_NativeBundle_GetMainElementName()
94
95```
96OH_NativeBundle_ElementName OH_NativeBundle_GetMainElementName()
97```
98
99**Description**
100
101Obtains the application entry information, including the bundle name, module name, and ability name.
102
103**Since**: 13
104
105**Returns**
106
107Returns the [OH_NativeBundle_ElementName](_o_h___native_bundle_element_name.md) struct.
108