1# @ohos.bundle.innerBundleManager (innerBundleManager) (System API) 2 3The innerBundleManager module provides APIs for the Home Screen application. 4 5> **NOTE** 6> 7> The initial APIs of this module are supported since API version 8. Newly added APIs will be marked with a superscript to indicate their earliest API version. 8> 9> This module is deprecated since API version 9. You are advised to use [launcherBundleManager](js-apis-launcherBundleManager-sys.md) and [bundleMonitor](js-apis-bundleMonitor-sys.md) instead. 10> 11> The APIs provided by this module are system APIs. 12 13## Modules to Import 14 15```typescript 16import innerBundleManager from '@ohos.bundle.innerBundleManager'; 17``` 18 19## System Capability 20 21SystemCapability.BundleManager.BundleFramework 22 23 24## innerBundleManager.getLauncherAbilityInfos<sup>(deprecated)</sup> 25 26getLauncherAbilityInfos(bundleName: string, userId: number, callback: AsyncCallback<Array<LauncherAbilityInfo>>) : void 27 28Obtains an array of the launcher ability information based on a given bundle name. This API uses an asynchronous callback to return the result. 29 30> **NOTE** 31> 32> This API is deprecated since API version 9. You are advised to use [launcherBundleManager.getLauncherAbilityInfo](js-apis-launcherBundleManager-sys.md#launcherbundlemanagergetlauncherabilityinfo9) instead. 33 34**Required permissions** 35 36ohos.permission.GET_BUNDLE_INFO_PRIVILEGED 37 38**System capability** 39 40SystemCapability.BundleManager.BundleFramework 41 42**System API** 43 44This is a system API. 45 46**Parameters** 47 48| Name | Type | Mandatory| Description | 49| ---------- | ------------------------------------------------------------ | ---- | ------------------------------------------ | 50| bundleName | string | Yes | Bundle name. | 51| userId | number | Yes | User ID. The value must be greater than or equal to 0. | 52| callback | AsyncCallback\<Array<[LauncherAbilityInfo](js-apis-bundle-LauncherAbilityInfo-sys.md)>> | Yes | Callback used to return an array of the launcher ability information.| 53 54 55## innerBundleManager.getLauncherAbilityInfos<sup>(deprecated)</sup> 56 57getLauncherAbilityInfos(bundleName: string, userId: number) : Promise<Array<LauncherAbilityInfo>> 58 59Obtains an array of the launcher ability information based on a given bundle name. This API uses a promise to return the result. 60 61> **NOTE** 62> 63> This API is deprecated since API version 9. You are advised to use [launcherBundleManager.getLauncherAbilityInfo](js-apis-launcherBundleManager-sys.md#launcherbundlemanagergetlauncherabilityinfo9) instead. 64 65**Required permissions** 66 67ohos.permission.GET_BUNDLE_INFO_PRIVILEGED 68 69**System capability** 70 71SystemCapability.BundleManager.BundleFramework 72 73**System API** 74 75This is a system API. 76 77**Parameters** 78 79| Name | Type | Mandatory| Description | 80| ---------- | ------ | ---- | ----------------------------- | 81| bundleName | string | Yes | Bundle name. | 82| userId | number | Yes | User ID. The value must be greater than or equal to 0.| 83 84**Return value** 85 86| Type | Description | 87| ------------------------------------------------------------ | ------------------------- | 88| Promise\<Array<[LauncherAbilityInfo](js-apis-bundle-LauncherAbilityInfo-sys.md)>> | Promise used to return an array of the launcher ability information.| 89 90## innerBundleManager.on<sup>(deprecated)</sup> 91 92on(type:"BundleStatusChange", bundleStatusCallback : BundleStatusCallback, callback: AsyncCallback<string>) : void 93 94Registers a callback to receive bundle status changes. This API uses an asynchronous callback to return the result. 95 96> **NOTE** 97> 98> This API is deprecated since API version 9. You are advised to use [bundleMonitor.on](js-apis-bundleMonitor-sys.md#bundlemonitoron) instead. 99 100**Required permissions** 101 102ohos.permission.LISTEN_BUNDLE_CHANGE 103 104**System capability** 105 106SystemCapability.BundleManager.BundleFramework 107 108**System API** 109 110This is a system API. 111 112**Parameters** 113 114| Name | Type | Mandatory| Description | 115| -------------------- | --------------------- | ---- | ---------------------------------------------------- | 116| type | string | Yes | Event type. Only **BundleStatusChange** is supported. | 117| bundleStatusCallback | [BundleStatusCallback](js-apis-Bundle-BundleStatusCallback-sys.md) | Yes | Callback to register. | 118| callback | AsyncCallback\<string> | Yes | Callback used to return a successful result or error information.| 119 120## innerBundleManager.on<sup>(deprecated)</sup> 121 122on(type:"BundleStatusChange", bundleStatusCallback : BundleStatusCallback) : Promise<string> 123 124Registers a callback to receive bundle status changes. This API uses a promise to return the result. 125 126> **NOTE** 127> 128> This API is deprecated since API version 9. You are advised to use [bundleMonitor.on](js-apis-bundleMonitor-sys.md#bundlemonitoron) instead. 129 130**Required permissions** 131 132ohos.permission.LISTEN_BUNDLE_CHANGE 133 134**System capability** 135 136SystemCapability.BundleManager.BundleFramework 137 138**System API** 139 140This is a system API. 141 142**Parameters** 143 144| Name | Type | Mandatory| Description | 145| -------------------- | ------------------------------------------------------------ | ---- | ------------------------------------------ | 146| type | string | Yes | Event type. Only **BundleStatusChange** is supported.| 147| bundleStatusCallback | [BundleStatusCallback](js-apis-Bundle-BundleStatusCallback-sys.md) | Yes | Callback to register. | 148 149**Return value** 150 151| Type | Description | 152| --------------- | ----------------------------------- | 153| Promise\<string> | Promise used to return a successful result or error information.| 154 155## innerBundleManager.off<sup>(deprecated)</sup> 156 157off(type:"BundleStatusChange", callback: AsyncCallback<string>) : void 158 159Deregisters the callback that receives bundle status changes. This API uses an asynchronous callback to return the result. 160 161> **NOTE** 162> 163> This API is deprecated since API version 9. You are advised to use [bundleMonitor.off](js-apis-bundleMonitor-sys.md#bundlemonitoroff) instead. 164 165**Required permissions** 166 167ohos.permission.LISTEN_BUNDLE_CHANGE 168 169**System capability** 170 171SystemCapability.BundleManager.BundleFramework 172 173**System API** 174 175This is a system API. 176 177**Parameters** 178 179| Name | Type | Mandatory| Description | 180| -------- | --------------------- | ---- | ---------------------------------------------------- | 181| type | string | Yes | Event type. Only **BundleStatusChange** is supported. | 182| callback | AsyncCallback\<string> | Yes | Callback used to return a successful result or error information.| 183 184## innerBundleManager.off<sup>(deprecated)</sup> 185 186off(type:"BundleStatusChange") : Promise<string> 187 188Deregisters the callback that receives bundle status changes. This API uses a promise to return the result. 189 190> **NOTE** 191> 192> This API is deprecated since API version 9. You are advised to use [bundleMonitor.off](js-apis-bundleMonitor-sys.md#bundlemonitoroff) instead. 193 194**Required permissions** 195 196ohos.permission.LISTEN_BUNDLE_CHANGE 197 198**System capability** 199 200SystemCapability.BundleManager.BundleFramework 201 202**System API** 203 204This is a system API. 205 206**Parameters** 207 208| Name| Type | Mandatory| Description | 209| ------ | ------ | ---- | ------------------------------------------ | 210| type | string | Yes | Event type. Only **BundleStatusChange** is supported.| 211 212**Return value** 213 214| Type | Description | 215| --------------- | ----------------------------------- | 216| Promise\<string> | Promise used to return a successful result or error information.| 217 218## innerBundleManager.getAllLauncherAbilityInfos<sup>(deprecated)</sup> 219 220getAllLauncherAbilityInfos(userId: number, callback: AsyncCallback<Array<LauncherAbilityInfo>>) : void 221 222Obtains the information about all launcher abilities. This API uses an asynchronous callback to return the result. 223 224> **NOTE** 225> 226> This API is deprecated since API version 9. You are advised to use [launcherBundleManager.getAllLauncherAbilityInfo](js-apis-launcherBundleManager-sys.md#launcherbundlemanagergetalllauncherabilityinfo9) instead. 227 228**Required permissions** 229 230ohos.permission.GET_BUNDLE_INFO_PRIVILEGED 231 232**System capability** 233 234SystemCapability.BundleManager.BundleFramework 235 236**System API** 237 238This is a system API. 239 240**Parameters** 241 242| Name | Type | Mandatory| Description | 243| -------- | ------------------------------------------------------------ | ---- | ----------------------------------------------------- | 244| userId | number | Yes | User ID. The value must be greater than or equal to 0.| 245| callback | AsyncCallback\<Array<[LauncherAbilityInfo](js-apis-bundle-LauncherAbilityInfo-sys.md)>> | Yes | Callback used to return an array of the launcher ability information. | 246 247## innerBundleManager.getAllLauncherAbilityInfos<sup>(deprecated)</sup> 248 249getAllLauncherAbilityInfos(userId: number) : Promise<Array<LauncherAbilityInfo>> 250 251Obtains the information about all launcher abilities. This API uses a promise to return the result. 252 253> **NOTE** 254> 255> This API is deprecated since API version 9. You are advised to use [launcherBundleManager.getAllLauncherAbilityInfo](js-apis-launcherBundleManager-sys.md#launcherbundlemanagergetalllauncherabilityinfo9) instead. 256 257**Required permissions** 258 259ohos.permission.GET_BUNDLE_INFO_PRIVILEGED 260 261**System capability** 262 263SystemCapability.BundleManager.BundleFramework 264 265**System API** 266 267This is a system API. 268 269**Parameters** 270 271| Name| Type | Mandatory| Description | 272| ------ | ------ | ---- | ----------------------------------------------------- | 273| userId | number | Yes | User ID. The value must be greater than or equal to 0.| 274 275**Return value** 276 277| Type | Description | 278| ------------------------------------------------------------ | ------------------------- | 279| Promise\<Array<[LauncherAbilityInfo](js-apis-bundle-LauncherAbilityInfo-sys.md)>> | Promise used to return an array of the launcher ability information.| 280 281## innerBundleManager.getShortcutInfos<sup>(deprecated)</sup> 282 283getShortcutInfos(bundleName :string, callback: AsyncCallback<Array<ShortcutInfo>>) : void 284 285Obtains an array of the shortcut information based on a given bundle name. This API uses an asynchronous callback to return the result. 286 287> **NOTE** 288> 289> This API is deprecated since API version 9. You are advised to use [launcherBundleManager.getShortcutInfo](js-apis-launcherBundleManager-sys.md#launcherbundlemanagergetshortcutinfo9) instead. 290 291**Required permissions** 292 293ohos.permission.GET_BUNDLE_INFO_PRIVILEGED 294 295**System capability** 296 297SystemCapability.BundleManager.BundleFramework 298 299**System API** 300 301This is a system API. 302 303**Parameters** 304 305| Name | Type | Mandatory| Description | 306| ---------- | ------------------------------------------------------------ | ---- | ---------------------------------------------- | 307| bundleName | string | Yes | Bundle name. | 308| callback | AsyncCallback\<Array<[ShortcutInfo](js-apis-bundle-ShortcutInfo-sys.md)>> | Yes | Callback used to return an array of the shortcut information.| 309 310## innerBundleManager.getShortcutInfos<sup>(deprecated)</sup> 311 312getShortcutInfos(bundleName : string) : Promise<Array<ShortcutInfo>> 313 314Obtains an array of the shortcut information based on a given bundle name. This API uses a promise to return the result. 315 316> **NOTE** 317> 318> This API is deprecated since API version 9. You are advised to use [launcherBundleManager.getShortcutInfo](js-apis-launcherBundleManager-sys.md#launcherbundlemanagergetshortcutinfo9) instead. 319 320**Required permissions** 321 322ohos.permission.GET_BUNDLE_INFO_PRIVILEGED 323 324**System capability** 325 326SystemCapability.BundleManager.BundleFramework 327 328**System API** 329 330This is a system API. 331 332**Parameters** 333 334| Name | Type | Mandatory| Description | 335| ---------- | ------ | ---- | ------------------------ | 336| bundleName | string | Yes | Bundle name.| 337 338**Return value** 339 340| Type | Description | 341| -------------------------------------------------------- | ----------------------------- | 342| Promise\<Array<[ShortcutInfo](js-apis-bundle-ShortcutInfo-sys.md)>> | Promise used to return an array of the shortcut information.| 343