提交 db6605cc 编写于 作者: F fangyun

add new extend ability doc

Signed-off-by: Nfangyun <fangyun2@huawei.com>
上级 e008618e
......@@ -49,3 +49,51 @@ export default class EnterpriseAdminAbility extends EnterpriseAdminExtensionAbil
}
};
```
## EnterpriseAdminExtensionAbility.onBundleAdded
onBundleAdded(bundleName: string): void
应用安装事件回调。
**系统能力**:SystemCapability.Customization.EnterpriseDeviceManager
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| ----- | ----------------------------------- | ---- | ------- |
| bundleName | string | 是 | 安装应用包名。 |
**示例:**
```ts
export default class EnterpriseAdminAbility extends EnterpriseAdminExtensionAbility {
onBundleAdded(bundleName: string) {
console.log("added bundle name: " + bundleName);
}
};
```
## EnterpriseAdminExtensionAbility.onBundleRemoved
onBundleRemoved(bundleName: string): void
应用卸载事件回调。
**系统能力**:SystemCapability.Customization.EnterpriseDeviceManager
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| ----- | ----------------------------------- | ---- | ------- |
| bundleName | string | 是 | 卸载应用包名。 |
**示例:**
```ts
export default class EnterpriseAdminAbility extends EnterpriseAdminExtensionAbility {
onBundleAdded(bundleName: string) {
console.log("removed bundle name: " + bundleName);
}
};
```
......@@ -667,7 +667,7 @@ enterpriseDeviceManager.getEnterpriseInfo(wantTemp).then((result) => {
## enterpriseDeviceManager.subscribeManagedEvent
subscribeManagedEvent(admin: Want, managedEvents: Array\<ManagedEvent>, callback: AsyncCallback\<void>): void;
subscribeManagedEvent(admin: Want, managedEvents: Array\<ManagedEvent>, callback: AsyncCallback\<void>): void
订阅系统事件。使用callback异步回调。
......@@ -700,7 +700,7 @@ enterpriseDeviceManager.subscribeManagedEvent(wantTemp, events, (error) => {
## enterpriseDeviceManager.subscribeManagedEvent
subscribeManagedEvent(admin: Want, managedEvents: Array\<ManagedEvent>): Promise\<void>;
subscribeManagedEvent(admin: Want, managedEvents: Array\<ManagedEvent>): Promise\<void>
订阅系统事件。使用Promise异步回调。
......@@ -737,7 +737,7 @@ enterpriseDeviceManager.subscribeManagedEvent(wantTemp, events).then(() => {
## enterpriseDeviceManager.unsubscribeManagedEvent
unsubscribeManagedEvent(admin: Want, managedEvents: Array\<ManagedEvent>, callback: AsyncCallback\<void>): void;
unsubscribeManagedEvent(admin: Want, managedEvents: Array\<ManagedEvent>, callback: AsyncCallback\<void>): void
取消订阅系统事件。使用callback异步回调。
......@@ -770,7 +770,7 @@ enterpriseDeviceManager.unsubscribeManagedEvent(wantTemp, events, (error) => {
## enterpriseDeviceManager.unsubscribeManagedEvent
unsubscribeManagedEvent(admin: Want, managedEvents: Array\<ManagedEvent>): Promise\<void>;
unsubscribeManagedEvent(admin: Want, managedEvents: Array\<ManagedEvent>): Promise\<void>
取消订阅系统事件。使用callback异步回调。
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册