未验证 提交 19ce60fc 编写于 作者: O openharmony_ci 提交者: Gitee

!16450 翻译完成 15386:【EDM】添加应用启停说明文档

Merge pull request !16450 from ester.zhou/TR-15386
......@@ -105,3 +105,55 @@ export default class EnterpriseAdminAbility extends EnterpriseAdminExtensionAbil
}
};
```
## EnterpriseAdminExtensionAbility.onAppStart<sup>10+</sup>
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.onAppStop<sup>10+</sup>
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);
}
};
```
......@@ -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.|
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册