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