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 4b52a7987bec96def8c77a4e8c149822b02662ed..c7f5608e6f679afad5f6162c343533011d38ed6a 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 e4677cc7082e366654b91f579a518dfeee60079d..b590eaabcd37d55076372d91e1827ca98e9e79ea 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 | 应用停止事件。 |