• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Common Events of the Bundle Management Subsystem
2This document lists the common system events provided by the Bundle Management subsystem to applications.
3
4## COMMON_EVENT_PACKAGE_ADDED
5
6Indicates that a new application package has been installed on the device.
7
8- Value: "usual.event.PACKAGE_ADDED"
9- Required subscriber permissions: none
10
11When a new application is installed by a specified user on the device, the event notification service is triggered to publish this event.
12
13APIs related to this event: **install**. For details, see [API Reference](../js-apis-installer.md#bundleinstallerinstall).
14
15## COMMON_EVENT_PACKAGE_REMOVED
16
17Indicates that an application has been uninstalled from the device with the application data retained.
18
19- Value: "usual.event.PACKAGE_REMOVED"
20- Required subscriber permissions: none
21
22When a specified application package is removed by a specified user on the device, the event notification service is triggered to publish this event.
23
24APIs related to this event: **uninstall**. For details, see [API Reference](../js-apis-installer.md#bundleinstalleruninstall).
25
26## COMMON_EVENT_PACKAGE_CHANGED
27
28Indicates that an application package has been changed (for example, an ability in the package has been enabled or disabled).
29
30- Value: "usual.event.PACKAGE_CHANGED"
31- Required subscriber permissions: none
32
33When an application package installed on the device is updated or an ability in the package is enabled or disabled, the event notification service is triggered to publish this event.
34
35APIs related to this event: **setApplicationEnabled** and **setAbilityEnabled**. For details, see [API Reference](../js-apis-bundleManager.md#bundlemanagersetapplicationenabled).
36
37## COMMON_EVENT_PACKAGE_CACHE_CLEARED
38
39Indicates that the user cleared the application package cache.
40
41- Value: "usual.event.PACKAGE_CACHE_CLEARED"
42- Required subscriber permissions: none
43
44When the cache of an application package installed on the device is cleared, the event notification service is triggered to publish this event.
45
46APIs related to this event: **cleanBundleCacheFiles**. For details, see [API Reference](../js-apis-bundleManager.md#bundlemanagercleanbundlecachefiles).
47