提交 55fd7db1 编写于 作者: E ester.zhou

Update docs (15386)

Signed-off-by: Nester.zhou <ester.zhou@huawei.com>
上级 ba6827c6
......@@ -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.
先完成此消息的编辑!
想要评论请 注册