Enables a device administrator application based on the specified bundle name and class name. This API uses an asynchronous callback to return the result.
Enables a device administrator application of the current user. This API uses an asynchronous callback to return the result. The super administrator application can be enabled only by the administrator.
| enterpriseInfo | [EnterpriseInfo](#enterpriseinfo) | Yes | Enterprise information of the device administrator application. |
| enterpriseInfo | [EnterpriseInfo](#enterpriseinfo) | Yes | Enterprise information of the device administrator application. |
| type | [AdminType](#admintype) | Yes | Type of the device administrator to enable. |
| callback | AsyncCallback\<void> | Yes | Callback used to return the result.|
| callback | AsyncCallback\<void> | Yes | Callback used to return the result. If the operation is successful, **err** is **null**. Otherwise, **err** is an error object.|
Enables a device administrator application for the specified user based on the specified bundle name and class name. This API uses an asynchronous callback to return the result.
Enables a device administrator application of the user specified by **userId**. This API uses an asynchronous callback to return the result. The super administrator application can be enabled only by the administrator.
@@ -83,7 +83,7 @@ Enables a device administrator application for the specified user based on the s
| enterpriseInfo | [EnterpriseInfo](#enterpriseinfo) | Yes | Enterprise information of the device administrator application. |
| type | [AdminType](#admintype) | Yes | Type of the device administrator to enable. |
| 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. |
| callback | AsyncCallback\<void> | Yes | Callback used to return the result. If the operation is successful, **err** is **null**. Otherwise, **err** is an error object. |
Enables a device administrator application based on the specified bundle name and class name. This API uses a promise to return the result.
Enables a device administrator application of the user specified by **userId** (if any) or the current user. This API uses a promise to return the result. The super administrator application can be enabled only by the administrator.
Disables a device common administrator application based on the specified bundle name and class name. This API uses an asynchronous callback to return the result.
Disables a device common administrator application of the current user. This API uses an asynchronous callback to return the result.
| callback | AsyncCallback\<void> | Yes | Callback used to return the result.|
| callback | AsyncCallback\<void> | Yes | Callback used to return the result. If the operation is successful, **err** is **null**. Otherwise, **err** is an error object.|
Disables a device common administrator application for the specified user based on the specified bundle name and class name. This API uses an asynchronous callback to return the result.
Disables a device common administrator application of the user specified by **userId**. 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\<void> | Yes | Callback used to return the result. |
| callback | AsyncCallback\<void> | Yes | Callback used to return the result. If the operation is successful, **err** is **null**. Otherwise, **err** is an error object. |
Disables a device common administrator application based on the specified bundle name and class name. This API uses a promise to return the result.
Disables a device administrator application of the user specified by **userId** (if any) or the current user. This API uses a promise to return the result.
| bundleName | String | Yes | Bundle name of the device super administrator application. |
| callback | AsyncCallback\<void> | Yes | Callback used to return the result.|
| 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**
...
...
@@ -363,7 +363,7 @@ Disables a device super administrator application based on the specified bundle
| Type | Description |
| ----------------- | ----------------- |
| Promise\<void> | Promise used to return the result.|
| Promise\<void> | Promise that returns no value. If the operation fails, an error object is thrown.|
Checks whether a device administrator application is enabled based on the specified bundle name and class name. This API uses an asynchronous callback to return the result.
Checks whether a device administrator application of the current user is enabled. This API uses an asynchronous callback to return the result.
| callback | AsyncCallback\<boolean> | Yes | Callback used to return the result. If the operation is successful, **err** is **null** and **data** is a Boolean value (**true** means that the device administrator application is enabled; and **false** means the opposite). If the operation fails, **err** is an error object.|
Checks whether a device administrator application is enabled for the specified user based on the specified bundle name and class name. This API uses an asynchronous callback to return the result.
Checks whether a device administrator application of the user specified by **userId** is enabled. 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\<boolean> | Yes | Callback used to return the result. |
| callback | AsyncCallback\<boolean> | Yes | Callback used to return the result. If the operation is successful, **err** is **null** and **data** is a Boolean value (**true** means that the device administrator application is enabled; and **false** means the opposite). If the operation fails, **err** is an error object. |
Checks whether a device administrator application is enabled based on the specified bundle name and class name. This API uses a promise to return the result.
Checks whether a device administrator application of the user specified by **userId** (if any) or the current user is enabled. This API uses a promise to return the result.
@@ -470,7 +470,7 @@ Checks whether a device administrator application is enabled based on the specif
| Type | Description |
| ----------------- | ------------------- |
| Promise\<boolean> | Promise used to return the result.|
| Promise\<boolean> | Promise used to return the result. If **true** is returned, the device administrator application is enabled. If **false** is returned, the device administrator application is not enabled.|
**Example**
...
...
@@ -501,7 +501,7 @@ Checks whether a device super administrator application is enabled based on the
| callback | AsyncCallback\<boolean> | Yes | Callback used to return the result.|
| callback | AsyncCallback\<boolean> | Yes | Callback used to return the result. If the operation is successful, **err** is **null** and **data** is a Boolean value (**true** means that the device administrator application is enabled; and **false** means the opposite). If the operation fails, **err** is an error object.|
**Example**
...
...
@@ -536,7 +536,7 @@ Checks whether a device super administrator application is enabled based on the
| ID | Error Message |
| ----------------- | ------------------- |
| Promise\<boolean> | Promise used to return the result.|
| Promise\<boolean> | Promise used to return the result. If **true** is returned, the device super administrator application is enabled. If **false** is returned, the device super administrator application is not enabled.|
**Example**
...
...
@@ -567,7 +567,7 @@ Sets the enterprise information of a device administrator application. This API
| enterpriseInfo | [EnterpriseInfo](#enterpriseinfo) | Yes | Enterprise information of the device administrator application. |
| callback | AsyncCallback\<void>; | Yes | Callback used to return the result.|
| 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**
...
...
@@ -620,7 +620,7 @@ Sets the enterprise information of a device administrator application. This API
| Type | Description |
| ----------------- | --------------------- |
| Promise\<void> | Promise used to return the result.|
| Promise\<void> | Promise that returns no value. If the operation fails, an error object is thrown.|
**Error codes**
...
...
@@ -661,7 +661,7 @@ Obtains the enterprise information of a device administrator application. This A
| callback | AsyncCallback<[EnterpriseInfo](#enterpriseinfo)> | Yes | Callback used to return the enterprise information of the device administrator application.|
| callback | AsyncCallback<[EnterpriseInfo](#enterpriseinfo)> | Yes | Callback used to return the result. If the operation is successful, **err** is **null** and **data** is the enterprise information of the device administrator application. If the operation fails, **err** is an error object.|
**Error codes**
...
...
@@ -708,7 +708,7 @@ Obtains the enterprise information of a device administrator application. This A
| managedEvents | Array\<[ManagedEvent](#managedevent)> | Yes| Array of events to subscribe to.|
| callback | AsyncCallback\<void> | Yes| Callback used to return the result. If the subscription is successful, **err** is **null**. Otherwise, **err** is an error object.|
| callback | AsyncCallback\<void> | Yes| Callback used to return the result. If the operation is successful, **err** is **null**. Otherwise, **err** is an error object.|
Unsubscribes from system management events. This API uses an asynchronous callback to return the result.
Configures a device administrator application to unsubscribe from system management events. This API uses an asynchronous callback to return the result.
| managedEvents | Array\<[ManagedEvent](#managedevent)> | Yes| Array of events to unsubscribe from.|
| callback | AsyncCallback\<void> | Yes| Callback used to return the result. If the unsubscription is successful, **err** is **null**. Otherwise, **err** is an error object.|
| callback | AsyncCallback\<void> | Yes| Callback used to return the result. If the operation is successful, **err** is **null**. Otherwise, **err** is an error object.|
Checks whether modification of the system time is disabled. This API uses an asynchronous callback to return the result.
Configures a device administrator application to check whether modification of the system time is disabled. This API uses an asynchronous callback to return the result.
Checks whether modification of the system time is disabled. This API uses a promise to return the result.
Configures a device administrator application to check whether modification of the system time is disabled. This API uses a promise to return the result.
@@ -256,7 +256,7 @@ Checks whether modification of the system time is disabled. This API uses a prom
| Type | Description |
| ----- | ----------------------------------- |
| Promise\<boolean> | Promise Promise used to return the result. The value **true** means that modification of the system time is disabled, and **false** means the opposite.|
| Promise\<boolean> | Promise used to return the result. The value **true** means that modification of the system time is disabled, and **false** means the opposite.|
| callback | AsyncCallback<string> | Yes | Callback used to return the device serial number. |
| callback | AsyncCallback<string> | Yes | Callback used to return the result.<br> If the operation is successful, **err** is **null** and **data** is the device serial number obtained. If the operation fails, **err** is an error object. |
**Error codes**
For details about the error codes, see [Enterprise Device Management Error Codes](../errorcodes/errorcode-enterpriseDeviceManager.md).
| callback | AsyncCallback<string> | Yes | Callback used to return the device version number. |
| callback | AsyncCallback<string> | Yes | Callback used to return the result.<br> 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. |
**Error codes**
For details about the error codes, see [Enterprise Device Management Error Codes](../errorcodes/errorcode-enterpriseDeviceManager.md).
| callback | AsyncCallback<string> | Yes | Callback used to return the device name. |
| callback | AsyncCallback<string> | Yes | Callback used to return the result.<br> If the operation is successful, **err** is **null** and **data** is the device name obtained. If the operation fails, **err** is an error object. |
**Error codes**
For details about the error codes, see [Enterprise Device Management Error Codes](../errorcodes/errorcode-enterpriseDeviceManager.md).
| bundleName | string | Bundle name of the provider ability.|
## Attributes
The [universal attributes](ts-universal-attributes-size.md) are supported, and **size** must be set.
**NOTE**
The template can be provided in either of the following modes:
* Use an absolute path. In this case, set **source** to the absolute path of the template and leave **bundleName** blank. This mode is not recommende as it is applicable only to standalone templates that do not need to load resources.
* Use an application package. In this case, set **bundleName** to the application bundle name and **source** to the relative path of the HAP file template. In the multi-HAP scenario, a HAP file is identified based on its relative path and name.
| constructor | number[] | Yes | Constructor for creating a color filter with a 4 x 5 matrix. The input parameter is [m*n], which is the matrix value in row m and column n. The matrix is row-first.|
| constructor | number[] | Yes | Constructor for creating a color filter with a 4 x 5 matrix. The input parameter is [m*n], which is the matrix value in row m and column n. The value range is [0, 1]. The matrix is row-first.|
## CustomBuilder<sup>8+</sup>
...
...
@@ -224,7 +224,7 @@ The **CustomBuilder** type is used to define custom UI descriptions in component
| CustomBuilder | () => any | Must be decorated by **@Builder**. For details, see [@Builder](../../quick-start/arkts-dynamic-ui-elememt-building.md#builder).|
| CustomBuilder | () => any | Must be decorated by **@Builder**. For details, see [@Builder](../../quick-start/arkts-builder.md).|