From e0f21444e6bebae52450520be1d57447b7fe1eed Mon Sep 17 00:00:00 2001 From: "ester.zhou" Date: Tue, 23 May 2023 10:14:42 +0800 Subject: [PATCH] Update docs (17564) Signed-off-by: ester.zhou --- .../reference/apis/commonEvent-definitions.md | 2 +- .../apis/common_event/commonEvent-ans.md | 12 +++++ .../common_event/commonEvent-bundleManager.md | 46 +++++++++++++++++++ .../common_event/commonEvent-subsystem.md | 12 +++++ 4 files changed, 71 insertions(+), 1 deletion(-) create mode 100644 en/application-dev/reference/apis/common_event/commonEvent-ans.md create mode 100644 en/application-dev/reference/apis/common_event/commonEvent-bundleManager.md create mode 100644 en/application-dev/reference/apis/common_event/commonEvent-subsystem.md diff --git a/en/application-dev/reference/apis/commonEvent-definitions.md b/en/application-dev/reference/apis/commonEvent-definitions.md index 39aa5fa3df..aef4755ce7 100644 --- a/en/application-dev/reference/apis/commonEvent-definitions.md +++ b/en/application-dev/reference/apis/commonEvent-definitions.md @@ -119,7 +119,7 @@ Indicates that a new application package has been installed on the device. - Required subscriber permissions: none ## COMMON_EVENT_PACKAGE_REMOVED -Indicates that an installed application has been uninstalled from the device with the application data retained. +Indicates that an application has been uninstalled from the device with the application data retained. - Value: **usual.event.PACKAGE_REMOVED** - Required subscriber permissions: none diff --git a/en/application-dev/reference/apis/common_event/commonEvent-ans.md b/en/application-dev/reference/apis/common_event/commonEvent-ans.md new file mode 100644 index 0000000000..0dbd3c3100 --- /dev/null +++ b/en/application-dev/reference/apis/common_event/commonEvent-ans.md @@ -0,0 +1,12 @@ +# Common Events of the Notification Service +This document lists the common system events provided by the notification service to applications. Applications can use [APIs](../js-apis-commonEventManager.md) to subscribe to common system events. + +## COMMON_EVENT_SLOT_CHANGE +Indicates that the notification slot or notification switch settings have changed. + +- Value: "usual.event.SLOT_CHANGE" +- Required subscriber permissions: ohos.permission.NOTIFICATION_CONTROLLER + +When the notification slot settings (including the switch) change or the notification feature is enabled or disabled, the notification service is triggered to publish this event. + +APIs related to this event: **setSlotByBundle**, **setNotificationEnableSlot**, and **setNotificationEnable**. They are system APIs and are typically called by notification setting applications. For details, see [API Reference](../js-apis-notificationManager.md). diff --git a/en/application-dev/reference/apis/common_event/commonEvent-bundleManager.md b/en/application-dev/reference/apis/common_event/commonEvent-bundleManager.md new file mode 100644 index 0000000000..e55179bd99 --- /dev/null +++ b/en/application-dev/reference/apis/common_event/commonEvent-bundleManager.md @@ -0,0 +1,46 @@ +# Common Events of the Bundle Management Subsystem +This document lists the common system events provided by the Bundle Management subsystem to applications. + +## COMMON_EVENT_PACKAGE_ADDED + +Indicates that a new application package has been installed on the device. + +- Value: "usual.event.PACKAGE_ADDED" +- Required subscriber permissions: none + +When a new application is installed by a specified user on the device, the event notification service is triggered to publish this event. + +APIs related to this event: **install**. For details, see [API Reference](../js-apis-installer.md#bundleinstallerinstall). + +## COMMON_EVENT_PACKAGE_REMOVED + +Indicates that an application has been uninstalled from the device with the application data retained. + +- Value: "usual.event.PACKAGE_REMOVED" +- Required subscriber permissions: none + +When a specified application package is removed by a specified user on the device, the event notification service is triggered to publish this event. + +APIs related to this event: **uninstall**. For details, see [API Reference](../js-apis-installer.md#bundleinstalleruninstall). + +## COMMON_EVENT_PACKAGE_CHANGED + +Indicates that an application package has been changed (for example, an ability in the package has been enabled or disabled). + +- Value: "usual.event.PACKAGE_CHANGED" +- Required subscriber permissions: none + +When 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. + +APIs related to this event: **setApplicationEnabled** and **setAbilityEnabled**. For details, see [API Reference](../js-apis-bundleManager.md#bundlemanagersetapplicationenabled). + +## COMMON_EVENT_PACKAGE_CACHE_CLEARED + +Indicates that the user cleared the application package cache. + +- Value: "usual.event.PACKAGE_CACHE_CLEARED" +- Required subscriber permissions: none + +When the cache of an application package installed on the device is cleared, the event notification service is triggered to publish this event. + +APIs related to this event: **cleanBundleCacheFiles**. For details, see [API Reference](../js-apis-bundleManager.md#bundlemanagercleanbundlecachefiles). diff --git a/en/application-dev/reference/apis/common_event/commonEvent-subsystem.md b/en/application-dev/reference/apis/common_event/commonEvent-subsystem.md new file mode 100644 index 0000000000..ead9acfc14 --- /dev/null +++ b/en/application-dev/reference/apis/common_event/commonEvent-subsystem.md @@ -0,0 +1,12 @@ +# Common Events of the xxx Subsystem +This document lists the common system events provided by the xxx subsystem/service to applications. Applications can use [APIs](../js-apis-commonEventManager.md) to subscribe to common system events. + +## commonEvent1 (Event name) +// In the first paragraph, describe the event succinctly. + +- Value: "usual.event.xx" +- Required subscriber permissions: xxx/none + +// In the second paragraph, describe the event reporting mechanism in detail to help developers understand what action will trigger the event. + +// (Optional) In the third paragraph, describe the variables (if any) on which the triggering of the event depends. For example, if the triggering of the event depends on the return value or callback of an API in the subsystem, provide here an explanation and, if necessary, a link to the API. -- GitLab