@@ -6,6 +6,8 @@ The **accountManager** module provides APIs for account management of enterprise
...
@@ -6,6 +6,8 @@ The **accountManager** module provides APIs for account management of enterprise
>
>
> - 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 used only in the stage model.
>
> - The APIs provided by this module can be called only by a [device administrator application](enterpriseDeviceManagement-overview.md#basic-concepts) that is [enabled](js-apis-enterprise-adminManager.md#adminmanagerenableadmin).
> - The APIs provided by this module can be called only by a [device administrator application](enterpriseDeviceManagement-overview.md#basic-concepts) that is [enabled](js-apis-enterprise-adminManager.md#adminmanagerenableadmin).
## Modules to Import
## Modules to Import
...
@@ -18,7 +20,7 @@ import accountManager from '@ohos.enterprise.accountManager';
...
@@ -18,7 +20,7 @@ import accountManager from '@ohos.enterprise.accountManager';
| disallow | boolean | Yes | Whether to forbid the creation of local user accounts. The value **true** means that local user accounts cannot be created; the value **false** means the opposite. |
| disallow | boolean | Yes | Whether to forbid the creation of local user accounts. The value **true** means to disallow the creation of local user accounts, and the value **false** means the opposite. |
| callback | AsyncCallback<void> | Yes | Callback invoked to return the result. If the operation is successful, **err** is **null**. Otherwise, **err** is an error object. |
| callback | AsyncCallback<void> | Yes | Callback invoked to return the result. If the operation is successful, **err** is **null**. Otherwise, **err** is an error object. |
| disallow | boolean | Yes | Whether to forbid the creation of local user accounts. The value **true** means that local user accounts cannot be created; the value **false** means the opposite. |
| disallow | boolean | Yes | Whether to forbid the creation of local user accounts. The value **true** means to disallow the creation of local user accounts, and the value **false** means the opposite. |
> - 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 used only in the stage model.
>
> - The APIs provided by this module can be called only by a [device administrator application](enterpriseDeviceManagement-overview.md#basic-concepts) that is [enabled](js-apis-enterprise-adminManager.md#adminmanagerenableadmin).
> - The APIs provided by this module can be called only by a [device administrator application](enterpriseDeviceManagement-overview.md#basic-concepts) that is [enabled](js-apis-enterprise-adminManager.md#adminmanagerenableadmin).
## Modules to Import
## Modules to Import
...
@@ -18,7 +20,7 @@ import applicationManager from '@ohos.enterprise.applicationManager';
...
@@ -18,7 +20,7 @@ import applicationManager from '@ohos.enterprise.applicationManager';
Adds a list of applications that are forbidden to run by the current user through the specified device administrator application. This API uses an asynchronous callback to return the result.
Adds the applications that are not allowed to run by the current user through the specified device administrator application. This API uses an asynchronous callback to return the result.
Adds a list of applications that are forbidden to run by a given user through the specified device administrator application. This API uses an asynchronous callback to return the result.
Adds the applications that are not allowed to run by the specified user through the specified device administrator application. This API uses an asynchronous callback to return the result.
| appIds | Array<string> | Yes | IDs of the applications to add. |
| appIds | Array<string> | Yes | IDs of the applications to add. |
| userId | number | Yes | User ID. The default value is the user ID of the caller. The user ID must be greater than or equal to **0**.|
| userId | number | Yes | User ID, which must be greater than or equal to 0.|
| callback | AsyncCallback<void> | Yes | Callback invoked to return the result. If the operation is successful, **err** is **null**. Otherwise, **err** is an error object.|
| callback | AsyncCallback<void> | Yes | Callback invoked to return the result. If the operation is successful, **err** is **null**. Otherwise, **err** is an error object.|
Adds a list of applications that are forbiddedn to run by the specified user (if **userId** is passed in) or current user (if **userId** is not passed in) through the specified device administrator application.
Adds the applications that are not allowed to run by the current or specified user through the specified device administrator application. This API uses a promise to return the result.
| appIds | Array<string> | Yes | IDs of the applications to add. |
| appIds | Array<string> | Yes | IDs of the applications to add. |
| userId | number | No | User ID. The default value is the user ID of the caller. The user ID must be greater than or equal to **0**.|
| userId | number | No | User ID, which must be greater than or equal to 0.<br> - If **userId** is passed in, the applications cannot be run by the specified user.<br> - If **userId** is not passed in, the applications cannot be run by the current user.|
Removes a list of applications that are forbiddedn to run by the current user through the specified device administrator application. This API uses an asynchronous callback to return the result.
Removes the applications that are not allowed to run by the current user through the specified device administrator application. This API uses an asynchronous callback to return the result.
Removes a list of applications that are forbiddedn to run by the specified user through the specified device administrator application. This API uses an asynchronous callback to return the result.
Removes the applications that are not allowed to run by the specified user through the specified device administrator application. This API uses an asynchronous callback to return the result.
| appIds | Array<string> | Yes | IDs of the applications to remove. |
| appIds | Array<string> | Yes | IDs of the applications to remove. |
| userId | number | Yes | User ID. The default value is the user ID of the caller. The user ID must be greater than or equal to **0**.|
| userId | number | Yes | User ID, which must be greater than or equal to 0.|
| callback | AsyncCallback<void> | Yes | Callback invoked to return the result. If the operation is successful, **err** is **null**. Otherwise, **err** is an error object.|
| callback | AsyncCallback<void> | Yes | Callback invoked to return the result. If the operation is successful, **err** is **null**. Otherwise, **err** is an error object.|
Removes a list of applications that are forbiddedn to run by the specified user (if **userId** is passed in) or current user (if **userId** is not passed in) through the specified device administrator application. This API uses a promise to return the result.
Removes the applications that are not allowed to run by the current or specified user through the specified device administrator application. This API uses a promise to return the result.
| appIds | Array<string> | Yes | IDs of the applications to remove. |
| appIds | Array<string> | Yes | IDs of the applications to remove. |
| userId | number | No | User ID. The default value is the user ID of the caller. The user ID must be greater than or equal to **0**.|
| userId | number | No | User ID, which must be greater than or equal to 0.<br> - If **userId** is passed in, the applications cannot be run by the specified user.<br> - If **userId** is not passed in, the applications cannot be run by the current user.|
Obtains the list of applications that are firbidded to run by the current user through the specified device administrator application. This API uses an asynchronous callback to return the result.
Obtains the applications that are not allowed to run by the current user through the specified device administrator application. This API uses an asynchronous callback to return the result.
Obtains the list of applications that are firbidded to run by the specified user through the specified device administrator application. This API uses an asynchronous callback to return the result.
Obtains the applications that are not allowed to run by the specified user through the specified 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 user ID must be greater than or equal to **0**.|
| userId | number | Yes | User ID, which must be greater than or equal to 0.|
| callback | AsyncCallback<Array<string>> | Yes | Callback invoked to return the result. If the operation is successful, **err** is **null**. Otherwise, **err** is an error object. |
| callback | AsyncCallback<Array<string>> | Yes | Callback invoked to return the result. If the operation is successful, **err** is **null**. Otherwise, **err** is an error object. |
Obtains the list of applications that are firbidded to run by the specified user (if **userId** is passed in) or current user (if **userId** is not passed in) through the specified device administrator application. This API uses a promise to return the result.
Obtains the applications that are not allowed to run by the current or specified user through the specified device administrator application. This API uses a promise to return the result.
| userId | number | No | User ID. The default value is the user ID of the caller. The user ID must be greater than or equal to **0**.|
| userId | number | No | User ID, which must be greater than or equal to 0.<br> - If **userId** is passed in, the applications cannot be run by the specified user.<br> - If **userId** is not passed in, the applications cannot be run by the current user.|
@@ -6,6 +6,7 @@ The **bundleManager** module provides APIs for bundle management, including addi
...
@@ -6,6 +6,7 @@ The **bundleManager** module provides APIs for bundle management, including addi
>
>
> - 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 used only in the stage model.
>
>
> - The APIs provided by this module can be called only by a [device administrator application](enterpriseDeviceManagement-overview.md#basic-concepts) that is [enabled](js-apis-enterprise-adminManager.md#adminmanagerenableadmin).
> - The APIs provided by this module can be called only by a [device administrator application](enterpriseDeviceManagement-overview.md#basic-concepts) that is [enabled](js-apis-enterprise-adminManager.md#adminmanagerenableadmin).
...
@@ -19,7 +20,7 @@ import bundleManager from '@ohos.enterprise.bundleManager';
...
@@ -19,7 +20,7 @@ import bundleManager from '@ohos.enterprise.bundleManager';
Adds a list of bundles that are allowed to be installed by the current user through the specified device administrator application. This API uses an asynchronous callback to return the result.
Adds the applications that can be installed by the current user through the specified device administrator application. This API uses an asynchronous callback to return the result.
| appIds | Array<string> | Yes | Bundles to be added. |
| appIds | Array<string> | Yes | IDs of the applications to add. |
| callback | AsyncCallback<void> | Yes | Callback invoked to return the result. If the operation is successful, **err** is **null**. Otherwise, **err** is an error object.|
| callback | AsyncCallback<void> | Yes | Callback invoked to return the result. If the operation is successful, **err** is **null**. Otherwise, **err** is an error object.|
Adds a list of bundles that are allowed to be installed by the given user (specified by **userId**) through the specified device administrator application. This API uses an asynchronous callback to return the result.
Adds the applications that can be installed by the specified user through the specified device administrator application. This API uses an asynchronous callback to return the result.
| appIds | Array<string> | Yes | Bundles to be added. |
| appIds | Array<string> | Yes | IDs of the applications to add. |
| userId | number | Yes | User ID. The default value is the user ID of the caller. The user ID must be greater than or equal to **0**.|
| userId | number | Yes | User ID, which must be greater than or equal to 0.|
| callback | AsyncCallback<void> | Yes | Callback invoked to return the result. If the operation is successful, **err** is **null**. Otherwise, **err** is an error object.|
| callback | AsyncCallback<void> | Yes | Callback invoked to return the result. If the operation is successful, **err** is **null**. Otherwise, **err** is an error object.|
Adds a list of bundles that are allowed to be installed by the current user (if **userId** is not passed in) or the given user (if **userId** is passed in) through the specified device administrator application. This API uses a promise to return the result.
Adds the applications that can be installed by the current or specified user through the specified device administrator application. This API uses a promise to return the result.
| appIds | Array<string> | Yes | Bundles to be added. |
| appIds | Array<string> | Yes | IDs of the applications to add. |
| userId | number | No | User ID. The default value is the user ID of the caller. The user ID must be greater than or equal to **0**.|
| userId | number | No |User ID, which must be greater than or equal to 0.<br> - If **userId** is passed in, the applications can be installed by the specified user.<br> - If **userId** is not passed in, the applications can be installed by the current user.|
Removes a list of bundles that are allowed to be installed by the current user through the specified 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 the applications that can be installed by the current user through the specified device administrator application. This API uses an asynchronous callback to return the result.
| appIds | Array<string> | Yes | Bundles to be removed. |
| appIds | Array<string> | Yes | IDs of the applications to remove. |
| callback | AsyncCallback<void> | Yes | Callback invoked to return the result. If the operation is successful, **err** is **null**. Otherwise, **err** is an error object.|
| callback | AsyncCallback<void> | Yes | Callback invoked to return the result. If the operation is successful, **err** is **null**. Otherwise, **err** is an error object.|
Removes a list of bundles that are allowed to be installed by the given user (specified by **userId**) through the specified 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 the applications that can be installed by the specified user through the specified device administrator application. This API uses an asynchronous callback to return the result.
| appIds | Array<string> | Yes | Bundles to be removed. |
| appIds | Array<string> | Yes | IDs of the applications to remove. |
| userId | number | Yes | User ID. The default value is the user ID of the caller. The user ID must be greater than or equal to **0**.|
| userId | number | Yes | User ID, which must be greater than or equal to 0.|
| callback | AsyncCallback<void> | Yes | Callback invoked to return the result. If the operation is successful, **err** is **null**. Otherwise, **err** is an error object.|
| callback | AsyncCallback<void> | Yes | Callback invoked to return the result. If the operation is successful, **err** is **null**. Otherwise, **err** is an error object.|
Removes a list of bundles that are allowed to be installed by the current user (if **userId** is not passed in) or the given user (if **userId** is passed in) through the specified device administrator application. The bundles removed from the list can no longer be installed. This API uses a promise to return the result.
Removes the applications that can be installed by the current or specified user through the specified device administrator application. This API uses a promise to return the result.
| appIds | Array\<string> | Yes | Bundles to be removed. |
| appIds | Array\<string> | Yes | IDs of the applications to remove. |
| userId | number | No | User ID. The default value is the user ID of the caller. The user ID must be greater than or equal to **0**.|
| userId | number | No | User ID, which must be greater than or equal to 0.<br> - If **userId** is passed in, the applications can be installed by the specified user.<br> - If **userId** is not passed in, the applications can be installed by the current user.|
Obtains the list of bundles that are allowed to be installed by the current user through the specified device administrator application. This API uses an asynchronous callback to return the result.
Obtains the applications that can be installed by the current user through the specified 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**) through the specified device administrator application. This API uses an asynchronous callback to return the result.
Obtains the applications that can be installed by the specified user through the specified 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 user ID must be greater than or equal to **0**.|
| userId | number | Yes | User ID, which must be greater than or equal to 0.|
| callback | AsyncCallback<Array<string>> | Yes | Callback invoked to return the result. If the operation is successful, **err** is **null**. Otherwise, **err** is an error object. |
| callback | AsyncCallback<Array<string>> | Yes | Callback invoked to return the result. If the operation is successful, **err** is **null**. Otherwise, **err** is an error object. |
Obtains the list of bundles that are allowed to be installed by the current user (if **userId** is not passed in) or the given user (if **userId** is passed in) through the specified device administrator application. This API uses a promise to return the result.
Obtains the applications that can be installed by the current or specified user through the specified device administrator application. This API uses a promise to return the result.
| userId | number | No | User ID. The default value is the user ID of the caller. The user ID must be greater than or equal to **0**.|
| userId | number | No | User ID, which must be greater than or equal to 0.<br> - If **userId** is passed in, the applications can be installed by the specified user.<br> - If **userId** is not passed in, the applications can be installed by the current user.|
Adds a list of bundles that are not allowed to be installed by the current user through the specified device administrator application. This API uses an asynchronous callback to return the result.
Adds the applications that cannot be installed by the current user through the specified device administrator application. This API uses an asynchronous callback to return the result.
| appIds | Array<string> | Yes | Bundles to be added. |
| appIds | Array<string> | Yes | IDs of the applications to add. |
| callback | AsyncCallback<void> | Yes | Callback invoked to return the result. If the operation is successful, **err** is **null**. Otherwise, **err** is an error object.|
| callback | AsyncCallback<void> | Yes | Callback invoked to return the result. If the operation is successful, **err** is **null**. Otherwise, **err** is an error object.|
Adds a list of bundles that are not allowed to be installed by the given user (specified by **userId**) through the specified device administrator application. This API uses an asynchronous callback to return the result.
Adds the applications that cannot be installed by the specified user through the specified device administrator application. This API uses an asynchronous callback to return the result.
| appIds | Array<string> | Yes | Bundles to be added. |
| appIds | Array<string> | Yes | IDs of the applications to add. |
| userId | number | Yes | User ID. The default value is the user ID of the caller. The user ID must be greater than or equal to **0**.|
| userId | number | Yes | User ID, which must be greater than or equal to 0.|
| callback | AsyncCallback<void> | Yes | Callback invoked to return the result. If the operation is successful, **err** is **null**. Otherwise, **err** is an error object.|
| callback | AsyncCallback<void> | Yes | Callback invoked to return the result. If the operation is successful, **err** is **null**. Otherwise, **err** is an error object.|
Adds a list of bundles that are not allowed to be installed by the current user (if **userId** is not passed in) or the given user (if **userId** is passed in) through the specified device administrator application. This API uses a promise to return the result.
Adds the applications that cannot be installed by the current or specified user through the specified device administrator application. This API uses a promise to return the result.
| appIds | Array<string> | Yes | Bundles to be added. |
| appIds | Array<string> | Yes | IDs of the applications to add. |
| userId | number | No | User ID. The default value is the user ID of the caller. The user ID must be greater than or equal to **0**.|
| userId | number | No | User ID, which must be greater than or equal to 0.<br> - If **userId** is passed in, the applications cannot be installed by the specified user.<br> - If **userId** is not passed in, the applications cannot be installed by the current user.|
Removes a list of bundles that are not allowed to be installed by the current user through the specified device administrator application. This API uses an asynchronous callback to return the result.
Removes the applications that cannot be installed by the current user through the specified device administrator application. This API uses an asynchronous callback to return the result.
| appIds | Array<string> | Yes | Bundles to be removed. |
| appIds | Array<string> | Yes | IDs of the applications to remove. |
| callback | AsyncCallback<void> | Yes | Callback invoked to return the result. If the operation is successful, **err** is **null**. Otherwise, **err** is an error object.|
| callback | AsyncCallback<void> | Yes | Callback invoked to return the result. If the operation is successful, **err** is **null**. Otherwise, **err** is an error object.|
Removes a list of bundles that are not allowed to be installed by the given user (specified by **userId**) through the specified device administrator application. This API uses an asynchronous callback to return the result.
Removes the applications that cannot be installed by the specified user through the specified device administrator application. This API uses an asynchronous callback to return the result.
| appIds | Array<string> | Yes | Bundles to be added. |
| appIds | Array<string> | Yes | IDs of the applications to remove. |
| userId | number | Yes | User ID. The default value is the user ID of the caller. The user ID must be greater than or equal to **0**.|
| userId | number | Yes | User ID, which must be greater than or equal to 0.|
| callback | AsyncCallback<void> | Yes | Callback invoked to return the result. If the operation is successful, **err** is **null**. Otherwise, **err** is an error object.|
| callback | AsyncCallback<void> | Yes | Callback invoked to return the result. If the operation is successful, **err** is **null**. Otherwise, **err** is an error object.|
Removes a list of bundles that are not allowed to be installed by the current user (if **userId** is not passed in) or the given user (if **userId** is passed in) through the specified device administrator application. This API uses a promise to return the result.
Removes the applications that cannot be installed by the current or specified user through the specified device administrator application. This API uses a promise to return the result.
| appIds | Array\<string> | Yes | Bundles to be removed. |
| appIds | Array\<string> | Yes | IDs of the applications to remove. |
| userId | number | No | User ID. The default value is the user ID of the caller. The user ID must be greater than or equal to **0**.|
| userId | number | No | User ID, which must be greater than or equal to 0.<br> - If **userId** is passed in, the applications cannot be installed by the specified user.<br> - If **userId** is not passed in, the applications cannot be installed by the current user.|
Obtains the list of bundles that are not allowed to be installed by the current user through the specified device administrator application. This API uses an asynchronous callback to return the result.
Obtains the applications that cannot be installed by the current user through the specified device administrator application. This API uses an asynchronous callback to return the result.
Obtains the list of bundles that are not allowed to be installed by the given user (specified by **userId**) through the specified device administrator application. This API uses an asynchronous callback to return the result.
Obtains the applications that cannot be installed by the specified user through the specified 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 user ID must be greater than or equal to **0**.|
| userId | number | Yes | User ID, which must be greater than or equal to 0.|
| callback | AsyncCallback<Array<string>> | Yes | Callback invoked to return the result. If the operation is successful, **err** is **null**. Otherwise, **err** is an error object. |
| callback | AsyncCallback<Array<string>> | Yes | Callback invoked to return the result. If the operation is successful, **err** is **null**. Otherwise, **err** is an error object. |
Obtains the list of bundles that are not allowed to be installed by the current user (if **userId** is not passed in) or the given user (if **userId** is passed in) through the specified device administrator application. This API uses a promise to return the result.
Obtains the applications that cannot be installed by the current or specified user through the specified device administrator application. This API uses a promise to return the result.
| userId | number | No | User ID. The default value is the user ID of the caller. The user ID must be greater than or equal to **0**.|
| userId | number | No | User ID, which must be greater than or equal to 0.<br> - If **userId** is passed in, the applications cannot be installed by the specified user.<br> - If **userId** is not passed in, the applications cannot be installed by the current user.|
Adds a list of bundles that are not allowed to be uninstalled by the current user through the specified device administrator application. This API uses an asynchronous callback to return the result.
Adds the applications that cannot be uninstalled by the current user through the specified device administrator application. This API uses an asynchronous callback to return the result.
| appIds | Array<string> | Yes | Bundles to be added. |
| appIds | Array<string> | Yes | IDs of the applications to add. |
| callback | AsyncCallback<void> | Yes | Callback invoked to return the result. If the operation is successful, **err** is **null**. Otherwise, **err** is an error object.|
| callback | AsyncCallback<void> | Yes | Callback invoked to return the result. If the operation is successful, **err** is **null**. Otherwise, **err** is an error object.|
Adds a list of bundles that are not allowed to be uninstalled by the given user (specified by **userId**) through the specified device administrator application. This API uses an asynchronous callback to return the result.
Adds the applications that cannot be uninstalled by the specified user through the specified device administrator application. This API uses an asynchronous callback to return the result.
| appIds | Array<string> | Yes | Bundles to be added. |
| appIds | Array<string> | Yes | IDs of the applications to add. |
| userId | number | Yes | User ID. The default value is the user ID of the caller. The user ID must be greater than or equal to **0**.|
| userId | number | Yes | User ID, which must be greater than or equal to 0.|
| callback | AsyncCallback<void> | Yes | Callback invoked to return the result. If the operation is successful, **err** is **null**. Otherwise, **err** is an error object.|
| callback | AsyncCallback<void> | Yes | Callback invoked to return the result. If the operation is successful, **err** is **null**. Otherwise, **err** is an error object.|
Adds a list of bundles that are not allowed to be uninstalled by the current user (if **userId** is not passed in) or the given user (if **userId** is passed in) through the specified device administrator application. This API uses a promise to return the result.
Adds the applications that cannot be uninstalled by the current or specified user through the specified device administrator application. This API uses a promise to return the result.
| appIds | Array<string> | Yes | Bundles to be added. |
| appIds | Array<string> | Yes | IDs of the applications to add. |
| userId | number | No | User ID. The default value is the user ID of the caller. The user ID must be greater than or equal to **0**.|
| userId | number | No | User ID, which must be greater than or equal to 0.<br> - If **userId** is passed in, the applications cannot be uninstalled by the specified user.<br> - If **userId** is not passed in, the applications cannot be uninstalled by the current user.|
Removes a list of bundles that are not allowed to be uninstalled by the current user through the specified device administrator application. This API uses an asynchronous callback to return the result.
Removes the applications that cannot be uninstalled by the current user through the specified device administrator application. This API uses an asynchronous callback to return the result.
| appIds | Array<string> | Yes | Bundles to be added. |
| appIds | Array<string> | Yes | IDs of the applications to remove. |
| callback | AsyncCallback<void> | Yes | Callback invoked to return the result. If the operation is successful, **err** is **null**. Otherwise, **err** is an error object.|
| callback | AsyncCallback<void> | Yes | Callback invoked to return the result. If the operation is successful, **err** is **null**. Otherwise, **err** is an error object.|
Removes a list of bundles that are not allowed to be uninstalled by the given user (specified by **userId**) through the specified device administrator application. This API uses an asynchronous callback to return the result.
Removes the applications that cannot be uninstalled by the specified user through the specified device administrator application. This API uses an asynchronous callback to return the result.
| appIds | Array<string> | Yes | Bundles to be removed. |
| appIds | Array<string> | Yes | IDs of the applications to remove. |
| userId | number | Yes | User ID. The default value is the user ID of the caller. The user ID must be greater than or equal to **0**.|
| userId | number | Yes | User ID, which must be greater than or equal to 0.|
| callback | AsyncCallback<void> | Yes | Callback invoked to return the result. If the operation is successful, **err** is **null**. Otherwise, **err** is an error object.|
| callback | AsyncCallback<void> | Yes | Callback invoked to return the result. If the operation is successful, **err** is **null**. Otherwise, **err** is an error object.|
Removes a list of bundles that are not allowed to be uninstalled by the current user (if **userId** is not passed in) or the given user (if **userId** is passed in) through the specified device administrator application. This API uses a promise to return the result.
Removes the applications that cannot be uninstalled by the current or specified user through the specified device administrator application. This API uses a promise to return the result.
| appIds | Array\<string> | Yes | Bundles to be removed. |
| appIds | Array\<string> | Yes | IDs of the applications to remove. |
| userId | number | No | User ID. The default value is the user ID of the caller. The user ID must be greater than or equal to **0**.|
| userId | number | No | User ID, which must be greater than or equal to 0.<br> - If **userId** is passed in, the applications cannot be uninstalled by the specified user.<br> - If **userId** is not passed in, the applications cannot be uninstalled by the current user.|
Obtains the list of bundles that are not allowed to be uninstalled by the current user through the specified device administrator application. This API uses an asynchronous callback to return the result.
Obtains the applications that cannot be uninstalled by the current user through the specified device administrator application. This API uses an asynchronous callback to return the result.
Obtains the list of bundles that are not allowed to be uninstalled by the given user (specified by **userId**) through the specified device administrator application. This API uses an asynchronous callback to return the result.
Obtains the applications that cannot be uninstalled by the specified user through the specified 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 user ID must be greater than or equal to **0**.|
| userId | number | Yes | User ID, which must be greater than or equal to 0.|
| callback | AsyncCallback<Array<string>> | Yes | Callback invoked to return the result. If the operation is successful, **err** is **null**. Otherwise, **err** is an error object. |
| callback | AsyncCallback<Array<string>> | Yes | Callback invoked to return the result. If the operation is successful, **err** is **null**. Otherwise, **err** is an error object. |
Obtains the list of bundles that are not allowed to be uninstalled by the current user (if **userId** is not passed in) or the given user (if **userId** is passed in) through the specified device administrator application. This API uses a promise to return the result.
Obtains the applications that cannot be uninstalled by the current or specified user through the specified device administrator application. This API uses a promise to return the result.
| userId | number | No | User ID. The default value is the user ID of the caller. The user ID must be greater than or equal to **0**.|
| userId | number | No | User ID, which must be greater than or equal to 0.<br> - If **userId** is passed in, the applications cannot be uninstalled by the specified user.<br> - If **userId** is not passed in, the applications cannot be uninstalled by the current user.|
Uninstalls the given bundle of the current user without retaining the bundle data through the specified device administrator application. This API uses an asynchronous callback to return the result.
Uninstalls an application of the current user without retaining the bundle data through the specified device administrator application. This API uses an asynchronous callback to return the result.
| bundleName | string | Yes | Name of the bundle to uninstall.|
| callback | AsyncCallback<void> | Yes | Callback invoked to return the result. If the operation is successful, **err** is **null**. Otherwise, **err** is an error object. |
| callback | AsyncCallback<void> | Yes | Callback invoked to return the result. If the operation is successful, **err** is **null**. Otherwise, **err** is an error object. |
Uninstalls the given bundle of the user specified by **userId** without retaining the bundle data through the specified device administrator application. This API uses an asynchronous callback to return the result.
Uninstalls an application of the specified user without retaining the bundle data through the specified device administrator application. This API uses an asynchronous callback to return the result.
| bundleName | string | Yes | Name of the bundle to uninstall.|
| userId | number | Yes | User ID. The default value is the user ID of the caller. The user ID must be greater than or equal to **0**.|
| userId | number | Yes | User ID, which must be greater than or equal to 0.|
| callback | AsyncCallback<void> | Yes | Callback invoked to return the result. If the operation is successful, **err** is **null**. Otherwise, **err** is an error object. |
| callback | AsyncCallback<void> | Yes | Callback invoked to return the result. If the operation is successful, **err** is **null**. Otherwise, **err** is an error object. |
Uninstalls the given bundle of the current user through the specified device administrator application. This API uses an asynchronous callback to return the result. If **isKeepData** is **false**, the bundle data is not retained.
Uninstalls an application of the current user through the specified device administrator application. The **isKeepData** parameter specifies whether to retain the bundle data. This API uses an asynchronous callback to return the result.
| bundleName | string | Yes | Name of the bundle to uninstall.|
| isKeepData | boolean | Yes | Whether to retain the bundle data. The value **true** means to retain the bundle data; the value **false** means the opposite.|
| isKeepData | boolean | Yes | Whether to retain the bundle data. The value **true** means to retain the bundle data; the value **false** means the opposite.|
| callback | AsyncCallback<void> | Yes | Callback invoked to return the result. If the operation is successful, **err** is **null**. Otherwise, **err** is an error object. |
| callback | AsyncCallback<void> | Yes | Callback invoked to return the result. If the operation is successful, **err** is **null**. Otherwise, **err** is an error object. |
Uninstalls the given bundle of the user specified by **userId** through the specified device administrator application. This API uses an asynchronous callback to return the result. If **isKeepData** is **false**, the bundle data is not retained.
Uninstalls an application of the specified user through the specified device administrator application. The **isKeepData** parameter specifies whether to retain the bundle data. This API uses an asynchronous callback to return the result.
| bundleName | string | Yes | Name of the bundle to uninstall.|
| userId | number | Yes | User ID. The default value is the user ID of the caller. The user ID must be greater than or equal to **0**.|
| userId | number | Yes | User ID, which must be greater than or equal to 0.|
| isKeepData | boolean | Yes | Whether to retain the bundle data. The value **true** means to retain the bundle data; the value **false** means the opposite.|
| isKeepData | boolean | Yes | Whether to retain the bundle data. The value **true** means to retain the bundle data; the value **false** means the opposite.|
| callback | AsyncCallback<void> | Yes | Callback invoked to return the result. If the operation is successful, **err** is **null**. Otherwise, **err** is an error object. |
| callback | AsyncCallback<void> | Yes | Callback invoked to return the result. If the operation is successful, **err** is **null**. Otherwise, **err** is an error object. |
Uninstalls the given bundle of the current user (if **userId** is not passed in) or the given user (if **userId** is passed in) through the specified device administrator application. This API uses a promise to return the result. If **isKeepData** is not passed in, the default value **false** is used, which means the bundle data will not be retained.
Uninstalls an application of the current or specified user through the specified device administrator application. The **isKeepData** parameter specifies whether to retain the bundle data. This API uses a promise to return the result.
| bundleName | string | Yes | Name of the bundle to uninstall.|
| userId | number | No | User ID. The default value is the user ID of the caller. The user ID must be greater than or equal to **0**.|
| userId | number | No | User ID, which must be greater than or equal to 0.<br> - If **userId** is passed in, the application of the specified user is uninstalled.<br> - If **userId** is not passed in, the application of the current user is uninstalled.|
| isKeepData | boolean | No | Whether to retain the bundle data. The value **true** means to retain the bundle data; the value **false** means the opposite.|
| isKeepData | boolean | No | Whether to retain the bundle data. The value **true** means to retain the bundle data; the value **false** means the opposite.|
@@ -6,6 +6,8 @@ The **dateTimeManager** module provides APIs for system time management.
...
@@ -6,6 +6,8 @@ The **dateTimeManager** module provides APIs for system time management.
>
>
> - The initial APIs of this module are supported since API version 9. 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 9. Newly added APIs will be marked with a superscript to indicate their earliest API version.
>
>
> - The APIs of this module can be used only in the stage model.
>
> - The APIs provided by this module can be called only by a [device administrator application](enterpriseDeviceManagement-overview.md#basic-concepts) that is [enabled](js-apis-enterprise-adminManager.md#adminmanagerenableadmin).
> - The APIs provided by this module can be called only by a [device administrator application](enterpriseDeviceManagement-overview.md#basic-concepts) that is [enabled](js-apis-enterprise-adminManager.md#adminmanagerenableadmin).
Disallows modification of the system time through the specified device administrator application. This API uses an asynchronous callback to return the result.
Forbids the specified device administrator application to modify the system time. This API uses an asynchronous callback to return the result.
| disallow | boolean | Yes| Whether to disable modification of the system time. The value **true** means to disable modification of the system time, and **false** means the opposite.|
| disallow | boolean | Yes| Whether to disallow modification of the system time. The value **true** means to disallow modification of the system time, and **false** means the opposite.|
| callback | AsyncCallback\<void> | Yes| Callback invoked to return the result. If the operation is successful, **err** is **null**. Otherwise, **err** is an error object.|
| callback | AsyncCallback\<void> | Yes| Callback invoked to return the result. If the operation is successful, **err** is **null**. Otherwise, **err** is an error object.|
| disallow | boolean | Yes| Whether to disable modification of the system time. The value **true** means to disable modification of the system time, and **false** means the opposite.|
| disallow | boolean | Yes| Whether to disallow modification of the system time. The value **true** means to disallow modification of the system time, and **false** means the opposite.|
**Return value**
**Return value**
| Type | Description |
| Type | Description |
| ----- | ----------------------------------- |
| ----- | ----------------------------------- |
| Promise\<void> | Promise that returns no value. An error object is thrown if the operation fails.|
| Promise\<void> | Promise that returns no value. If the operation fails, an error object will be thrown.|
Checks whether the modification of the system time is disallowed through the specified device administrator application. This API uses an asynchronous callback to return the result.
Checks whether the system time modification is disallowed through the specified device administrator application. This API uses an asynchronous callback to return the result.
| callback | AsyncCallback\<boolean> | Yes| Callback invoked to return the result. The value **true** means that modification of the system time is disallowed, and **false** means the opposite.|
| callback | AsyncCallback\<boolean> | Yes| Callback invoked to return the result. The value **true** means the system time modification is disallowed, and **false** means the opposite.|
Checks whether the modification of the system time is disallowed through the specified device administrator application. This API uses a promise to return the result.
Checks whether the system time modification is disallowed through the specified device administrator application. This API uses a promise to return the result.
@@ -271,7 +273,7 @@ Checks whether the modification of the system time is disallowed through the spe
...
@@ -271,7 +273,7 @@ Checks whether the modification of the system time is disallowed through the spe
| Type | Description |
| Type | Description |
| ----- | ----------------------------------- |
| ----- | ----------------------------------- |
| Promise\<boolean> | Promise used to return the result. The value **true** means that modification of the system time is disallowed, and **false** means the opposite.|
| Promise\<boolean> | Promise used to return the result. The value **true** means the system time modification is disallowed, and **false** means the opposite.|
The **deviceControl** module provides APIs for device control, which can be called only by device administrator applications.
The **deviceControl** module provides APIs for device control.
> **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 used only in the stage model.
>
>
> - The APIs provided by this module can be called only by a [device administrator application](enterpriseDeviceManagement-overview.md#basic-concepts) that is [enabled](js-apis-enterprise-adminManager.md#adminmanagerenableadmin).
> - The APIs provided by this module can be called only by a [device administrator application](enterpriseDeviceManagement-overview.md#basic-concepts) that is [enabled](js-apis-enterprise-adminManager.md#adminmanagerenableadmin).
...
@@ -19,7 +20,7 @@ import deviceControl from '@ohos.enterprise.deviceControl'
...
@@ -19,7 +20,7 @@ import deviceControl from '@ohos.enterprise.deviceControl'
| callback | AsyncCallback\<void> | Yes| Callback invoked to return the result. If the operation is successful, **err** is **null**. Otherwise, **err** is an error object.|
| callback | AsyncCallback\<void> | Yes| Callback invoked to return the result. If the operation is successful, **err** is **null**. Otherwise, **err** is an error object.|
@@ -6,6 +6,8 @@ The **deviceInfo** module provides APIs for enterprise device information manage
...
@@ -6,6 +6,8 @@ The **deviceInfo** module provides APIs for enterprise device information manage
>
>
> - 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 used only in the stage model.
>
> - The APIs provided by this module can be called only by a [device administrator application](enterpriseDeviceManagement-overview.md#basic-concepts) that is [enabled](js-apis-enterprise-adminManager.md#adminmanagerenableadmin).
> - The APIs provided by this module can be called only by a [device administrator application](enterpriseDeviceManagement-overview.md#basic-concepts) that is [enabled](js-apis-enterprise-adminManager.md#adminmanagerenableadmin).
| callback | AsyncCallback<string> | Yes | Callback invoked to return the result. If the operation is successful, **err** is **null** and **data** is the device version number obtained. If the operation fails, **err** is an error object. |
| callback | AsyncCallback<string> | Yes | Callback invoked to return the result. If the operation is successful, **err** is **null** and **data** is the device version obtained. If the operation fails, **err** is an error object. |
@@ -4,9 +4,11 @@ The **wifiManager** module provides APIs for Wi-Fi management of enterprise devi
...
@@ -4,9 +4,11 @@ The **wifiManager** module provides APIs for Wi-Fi management of enterprise devi
> **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 provided by this module can be called only by a [device administrator application](enterpriseDeviceManagement-overview.md#basic-concepts) that is [enabled](js-apis-enterprise-adminManager.md#adminmanagerenableadmin).
> - The APIs of this module can be used only in the stage model.
>
> - The APIs provided by this module can be called only by a [device administrator application](enterpriseDeviceManagement-overview.md#basic-concepts) that is [enabled](js-apis-enterprise-adminManager.md#adminmanagerenableadmin).
## Modules to Import
## Modules to Import
...
@@ -37,7 +39,7 @@ Checks whether Wi-Fi is active through the specified device administrator applic
...
@@ -37,7 +39,7 @@ Checks whether Wi-Fi is active through the specified device administrator applic
For details about the error codes, see [Enterprise Device Management Error Codes](../errorcodes/errorcode-enterpriseDeviceManager.md).
For details about the error codes, see [Enterprise Device Management Error Codes](../errorcodes/errorcode-enterpriseDeviceManager.md).
Sets Wi-Fi to connect to the specified network. This API uses an asynchronous callback to return the result.
Sets Wi-Fi profile through the specified device administrator application to enable the device to connect to the specified network. This API uses an asynchronous callback to return the result.
| callback | AsyncCallback<void> | Yes | Callback invoked to return the result. If the operation is successful, **err** is **null**. Otherwise, **err** is an error object. |
| callback | AsyncCallback<void> | Yes | Callback invoked to return the result. If the operation is successful, **err** is **null**. Otherwise, **err** is an error object. |
**Error codes**
**Error codes**
For details about the error codes, see [Enterprise Device Management Error Codes](../errorcodes/errorcode-enterpriseDeviceManager.md).
For details about the error codes, see [Enterprise Device Management Error Codes](../errorcodes/errorcode-enterpriseDeviceManager.md).
Sets Wi-Fi to connect to the specified network. This API uses a promise to return the result.
Sets Wi-Fi profile through the specified device administrator application to enable the device to connect to the specified network. This API uses a promise to return the result.