提交 ca119935 编写于 作者: L liwuli

添加应用启停接口说明文档

Signed-off-by: Nliwuli <liwuli@huawei.com>
上级 8cd35630
......@@ -105,3 +105,55 @@ export default class EnterpriseAdminAbility extends EnterpriseAdminExtensionAbil
}
};
```
## EnterpriseAdminExtensionAbility.onAppStart<sup>10+</sup>
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.onAppStop<sup>10+</sup>
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);
}
};
```
......@@ -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 | 应用停止事件。 |
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册