From 55fd7db1e1e0e83b1c64d4ae2f88b64388a010f6 Mon Sep 17 00:00:00 2001 From: "ester.zhou" Date: Fri, 24 Mar 2023 09:18:35 +0800 Subject: [PATCH] Update docs (15386) Signed-off-by: ester.zhou --- ...js-apis-EnterpriseAdminExtensionAbility.md | 52 +++++++++++++++++++ .../apis/js-apis-enterprise-adminManager.md | 6 ++- 2 files changed, 56 insertions(+), 2 deletions(-) diff --git a/en/application-dev/reference/apis/js-apis-EnterpriseAdminExtensionAbility.md b/en/application-dev/reference/apis/js-apis-EnterpriseAdminExtensionAbility.md index a55ab990ef..3b42c32bc9 100644 --- a/en/application-dev/reference/apis/js-apis-EnterpriseAdminExtensionAbility.md +++ b/en/application-dev/reference/apis/js-apis-EnterpriseAdminExtensionAbility.md @@ -105,3 +105,55 @@ export default class EnterpriseAdminAbility extends EnterpriseAdminExtensionAbil } }; ``` + +## EnterpriseAdminExtensionAbility.onAppStart10+ + +onAppStart(bundleName: string): void + +Called when an application is started. + +**System capability**: SystemCapability.Customization.EnterpriseDeviceManager + +**System API**: This is a system API. + +**Parameters** + +| Parameter | Type | Mandatory | Description | +| ----- | ----------------------------------- | ---- | ------- | +| bundleName | string | Yes | Bundle name of the application started.| + +**Example** + +```ts +export default class EnterpriseAdminAbility extends EnterpriseAdminExtensionAbility { + onAppStart(bundleName: string) { + console.log("started bundle name: " + bundleName); + } +}; +``` + +## EnterpriseAdminExtensionAbility.onAppStop10+ + +onAppStop(bundleName: string): void + +Called when an application is stopped. + +**System capability**: SystemCapability.Customization.EnterpriseDeviceManager + +**System API**: This is a system API. + +**Parameters** + +| Parameter | Type | Mandatory | Description | +| ----- | ----------------------------------- | ---- | ------- | +| bundleName | string | Yes | Bundle name of the application stopped.| + +**Example** + +```ts +export default class EnterpriseAdminAbility extends EnterpriseAdminExtensionAbility { + onAppStop(bundleName: string) { + console.log("stopped bundle name: " + bundleName); + } +}; +``` diff --git a/en/application-dev/reference/apis/js-apis-enterprise-adminManager.md b/en/application-dev/reference/apis/js-apis-enterprise-adminManager.md index 05b3f1f716..a29988585e 100644 --- a/en/application-dev/reference/apis/js-apis-enterprise-adminManager.md +++ b/en/application-dev/reference/apis/js-apis-enterprise-adminManager.md @@ -953,5 +953,7 @@ Enumerates the system management events that can be subscribed to. | Name | Value | Description | | -------------------------- | ---- | ------------- | -| MANAGED_EVENT_BUNDLE_ADDED | 0 | Application installation event.| -| MANAGED_EVENT_BUNDLE_REMOVED | 1 | Application uninstallation event.| +| MANAGED_EVENT_BUNDLE_ADDED | 0 | Bundle added.| +| MANAGED_EVENT_BUNDLE_REMOVED | 1 | Bundle removed.| +| MANAGED_EVENT_APP_START | 2 | Application started.| +| MANAGED_EVENT_APP_STOP | 3 | Application stopped.| -- GitLab