js-apis-Bundle-BundleStatusCallback.md 1.2 KB
Newer Older
G
Gloria 已提交
1 2
# BundleStatusCallback

G
Gloria 已提交
3
The **BundleStatusCallback** module provides callbacks for bundle status changes. The changes can be obtained through [innerBundleManager.on](js-apis-Bundle-InnerBundleManager.md).
G
Gloria 已提交
4 5 6

> **NOTE**
>
G
Gloria 已提交
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.
G
Gloria 已提交
8

9 10 11

## BundleStatusCallback<sup>(deprecated)<sup>
> This API is deprecated since API version 9. You are advised to use [bundleMonitor](js-apis-bundleMonitor.md) instead.
G
Gloria 已提交
12 13 14 15 16

**System API**: This is a system API and cannot be called by third-party applications.

**System capability**: SystemCapability.BundleManager.BundleFramework

17
| Type  | Callback                                         | Description                                  |
G
Gloria 已提交
18
| ------ | --------------------------------------------- | -------------------------------------- |
19 20 21
| add    | (bundleName : string, userId: number) => void | Used to obtain information when a bundle is installed.|
| update | (bundleName : string, userId: number) => void | Used to obtain information when a bundle is updated.|
| remove | (bundleName : string, userId: number) => void | Used to obtain information when a bundle is uninstalled.|