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