From ca1199356e04be8344560590391709a64ab46d3f Mon Sep 17 00:00:00 2001 From: liwuli Date: Wed, 1 Mar 2023 15:43:01 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=BA=94=E7=94=A8=E5=90=AF?= =?UTF-8?q?=E5=81=9C=E6=8E=A5=E5=8F=A3=E8=AF=B4=E6=98=8E=E6=96=87=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: liwuli --- ...js-apis-EnterpriseAdminExtensionAbility.md | 52 +++++++++++++++++++ .../apis/js-apis-enterprise-adminManager.md | 2 + 2 files changed, 54 insertions(+) diff --git a/zh-cn/application-dev/reference/apis/js-apis-EnterpriseAdminExtensionAbility.md b/zh-cn/application-dev/reference/apis/js-apis-EnterpriseAdminExtensionAbility.md index 4b52a7987b..c7f5608e6f 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-EnterpriseAdminExtensionAbility.md +++ b/zh-cn/application-dev/reference/apis/js-apis-EnterpriseAdminExtensionAbility.md @@ -105,3 +105,55 @@ export default class EnterpriseAdminAbility extends EnterpriseAdminExtensionAbil } }; ``` + +## EnterpriseAdminExtensionAbility.onAppStart10+ + +onAppStart(bundleName: string): void + +应用卸载事件回调。 + +**系统能力**:SystemCapability.Customization.EnterpriseDeviceManager + +**系统API**: 此接口为系统接口。 + +**参数:** + +| 参数名 | 类型 | 必填 | 说明 | +| ----- | ----------------------------------- | ---- | ------- | +| bundleName | string | 是 | 启动应用Bundle名称。 | + +**示例:** + +```ts +export default class EnterpriseAdminAbility extends EnterpriseAdminExtensionAbility { + onAppStart(bundleName: string) { + console.log("started bundle name: " + bundleName); + } +}; +``` + +## EnterpriseAdminExtensionAbility.onAppStop10+ + +onAppStop(bundleName: string): void + +应用卸载事件回调。 + +**系统能力**:SystemCapability.Customization.EnterpriseDeviceManager + +**系统API**: 此接口为系统接口。 + +**参数:** + +| 参数名 | 类型 | 必填 | 说明 | +| ----- | ----------------------------------- | ---- | ------- | +| bundleName | string | 是 | 停止应用Bundle名称。 | + +**示例:** + +```ts +export default class EnterpriseAdminAbility extends EnterpriseAdminExtensionAbility { + onAppStop(bundleName: string) { + console.log("stopped bundle name: " + bundleName); + } +}; +``` diff --git a/zh-cn/application-dev/reference/apis/js-apis-enterprise-adminManager.md b/zh-cn/application-dev/reference/apis/js-apis-enterprise-adminManager.md index e4677cc708..b590eaabcd 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-enterprise-adminManager.md +++ b/zh-cn/application-dev/reference/apis/js-apis-enterprise-adminManager.md @@ -955,4 +955,6 @@ adminManager.unsubscribeManagedEvent(wantTemp, events).then(() => { | -------------------------- | ---- | ------------- | | MANAGED_EVENT_BUNDLE_ADDED | 0 | 应用安装事件。 | | MANAGED_EVENT_BUNDLE_REMOVED | 1 | 应用卸载事件。 | +| MANAGED_EVENT_APP_START | 2 | 应用启动事件。 | +| MANAGED_EVENT_APP_STOP | 3 | 应用停止事件。 | -- GitLab