@@ -5,6 +5,7 @@ The **bundleManager** module provides APIs for bundle management, including addi
...
@@ -5,6 +5,7 @@ The **bundleManager** module provides APIs for bundle management, including addi
> **NOTE**
> **NOTE**
>
>
> The initial APIs of this module are supported since API version 10. Newly added APIs will be marked with a superscript to indicate their earliest API version.
> The initial APIs of this module are supported since API version 10. Newly added APIs will be marked with a superscript to indicate their earliest API version.
> The APIs of this module can be called only after a [device administrator application](js-apis-enterprise-adminManager.md#adminmanagerenableadmin) is enabled.
## Modules to Import
## Modules to Import
...
@@ -16,7 +17,7 @@ import bundleManager from '@ohos.enterprise.bundleManager';
...
@@ -16,7 +17,7 @@ import bundleManager from '@ohos.enterprise.bundleManager';
Adds a list of bundles that are allowed to be installed by the administrator for an enterprise device administrator application. This API uses an asynchronous callback to return the result.
Adds a list of bundles that are allowed to be installed by the current administrator for an enterprise device administrator application. This API uses an asynchronous callback to return the result.
Adds a list of bundles that are allowed to be installed by the specified user for an enterprise device administrator application. This API uses an asynchronous callback to return the result.
Adds a list of bundles that are allowed to be installed by the given user (specified by **userId**) for an enterprise device administrator application. This API uses an asynchronous callback to return the result.
Adds a list of bundles that are allowed to be installed by the administrator (if **userId** is not passed in) or the specified user (if **userId** is passed in) for an enterprise device administrator application. This API uses a promise to return the result.
Adds a list of bundles that are allowed to be installed by the current administrator (if **userId** is not passed in) or the given user (if **userId** is passed in) for an enterprise device administrator application. This API uses a promise to return the result.
Removes a list of bundles that are allowed to be installed by the administrator for an enterprise device administrator application. The bundles removed from the list can no longer be installed. This API uses an asynchronous callback to return the result.
Removes a list of bundles that are allowed to be installed by the current administrator for an enterprise device administrator application. The bundles removed from the list can no longer be installed. This API uses an asynchronous callback to return the result.
Removes a list of bundles that are allowed to be installed by the specified user for an enterprise device administrator application. The bundles removed from the list can no longer be installed. This API uses an asynchronous callback to return the result.
Removes a list of bundles that are allowed to be installed by the given user (specified by **userId**) for an enterprise device administrator application. The bundles removed from the list can no longer be installed. This API uses an asynchronous callback to return the result.
Removes a list of bundles that are allowed to be installed by the administrator (if **userId** is not passed in) or the specified user (if **userId** is passed in) for an enterprise device administrator application. The bundles removed from the list can no longer be installed. This API uses a promise to return the result.
Removes a list of bundles that are allowed to be installed by the current administrator (if **userId** is not passed in) or the given user (if **userId** is passed in) for an enterprise device administrator application. The bundles removed from the list can no longer be installed. This API uses a promise to return the result.
Obtains the list of bundles that are allowed to be installed by the administrator for an enterprise device administrator application. This API uses an asynchronous callback to return the result.
Obtains the list of bundles that are allowed to be installed by the current administrator for an enterprise device administrator application. This API uses an asynchronous callback to return the result.
Obtains the list of bundles that are allowed to be installed by the specified user for an enterprise device administrator application. This API uses an asynchronous callback to return the result.
Obtains the list of bundles that are allowed to be installed by the given user (specified by **userId**) for an enterprise device administrator application. This API uses an asynchronous callback to return the result.
Obtains the list of bundles that are allowed to be installed for an enterprise device administrator application. This API uses a promise to return the result.
Obtains the list of bundles that are allowed to be installed by the current administrator (if **userId** is not passed in) or the given user (if **userId** is passed in) for an enterprise device administrator application. This API uses a promise to return the result.
Adds a list of bundles that are not allowed to be installed by the current administrator for an enterprise device administrator application. This API uses an asynchronous callback to return the result.
| appIds | Array<string> | Yes | Bundles to be added to the disallowed bundle list. |
| callback | AsyncCallback<void> | Yes | Callback used to return the result. If the operation is successful, **err** is **null**. Otherwise, **err** is an error object.|
**Error codes**
For details about the error codes, see [Enterprise Device Management Error Codes](../errorcodes/errorcode-enterpriseDeviceManager.md).
Adds a list of bundles that are not allowed to be installed by the given user (specified by **userId**) for an enterprise device administrator application. This API uses an asynchronous callback to return the result.
| appIds | Array<string> | Yes | Bundles to be added to the disallowed bundle list. |
| userId | number | Yes | User ID. The default value is the user ID of the caller. The value must be greater than or equal to 0.|
| callback | AsyncCallback<void> | Yes | Callback used to return the result. If the operation is successful, **err** is **null**. Otherwise, **err** is an error object.|
**Error codes**
For details about the error codes, see [Enterprise Device Management Error Codes](../errorcodes/errorcode-enterpriseDeviceManager.md).
Adds a list of bundles that are not allowed to be installed by the current administrator (if **userId** is not passed in) or the given user (if **userId** is passed in) for an enterprise device administrator application. This API uses a promise to return the result.
Removes a list of bundles that are not allowed to be installed by the current administrator for an enterprise device administrator application. This API uses an asynchronous callback to return the result.
| appIds | Array<string> | Yes | Bundles to be removed from the disallowed bundle list. |
| callback | AsyncCallback<void> | Yes | Callback used to return the result. If the operation is successful, **err** is **null**. Otherwise, **err** is an error object.|
**Error codes**
For details about the error codes, see [Enterprise Device Management Error Codes](../errorcodes/errorcode-enterpriseDeviceManager.md).
Removes a list of bundles that are not allowed to be installed by the given user (specified by **userId**) for an enterprise device administrator application. This API uses an asynchronous callback to return the result.
| appIds | Array<string> | Yes | Bundles to be removed from the disallowed bundle list. |
| userId | number | Yes | User ID. The default value is the user ID of the caller. The value must be greater than or equal to 0.|
| callback | AsyncCallback<void> | Yes | Callback used to return the result. If the operation is successful, **err** is **null**. Otherwise, **err** is an error object.|
**Error codes**
For details about the error codes, see [Enterprise Device Management Error Codes](../errorcodes/errorcode-enterpriseDeviceManager.md).
Removes a list of bundles that are not allowed to be installed by the current administrator (if **userId** is not passed in) or the given user (if **userId** is passed in) for an enterprise device administrator application. This API uses a promise to return the result.
Obtains the list of bundles that are not allowed to be installed by the current administrator for an enterprise device administrator application. This API uses an asynchronous callback to return the result.
| callback | AsyncCallback<Array<string>> | Yes | Callback used to return the result. If the operation is successful, **err** is **null**. Otherwise, **err** is an error object. |
**Error codes**
For details about the error codes, see [Enterprise Device Management Error Codes](../errorcodes/errorcode-enterpriseDeviceManager.md).
Obtains the list of bundles that are not allowed to be installed by the given user (specified by **userId**) for an enterprise device administrator application. This API uses an asynchronous callback to return the result.
| userId | number | Yes | User ID. The default value is the user ID of the caller. The value must be greater than or equal to 0.|
| callback | AsyncCallback<Array<string>> | Yes | Callback used to return the result. If the operation is successful, **err** is **null**. Otherwise, **err** is an error object. |
**Error codes**
For details about the error codes, see [Enterprise Device Management Error Codes](../errorcodes/errorcode-enterpriseDeviceManager.md).
Obtains the list of bundles that are not allowed to be installed by the current administrator (if **userId** is not passed in) or the given user (if **userId** is passed in) for an enterprise device administrator application. This API uses a promise to return the result.