提交 ea1e9b66 编写于 作者: A Annie_wang

update docs

Signed-off-by: NAnnie_wang <annie.wangli@huawei.com>
上级 13a7dc63
......@@ -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 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
......@@ -18,7 +20,7 @@ import accountManager from '@ohos.enterprise.accountManager';
disallowAddLocalAccount(admin: Want, disallow: boolean, callback: AsyncCallback&lt;void&gt;): void
Forbids a device administrator application to create local user accounts. This API uses an asynchronous callback to return the result.
Disallows a device administrator application to create local user accounts. This API uses an asynchronous callback to return the result.
**Required permissions**: ohos.permission.ENTERPRISE_SET_ACCOUNT_POLICY
......@@ -30,8 +32,8 @@ Forbids a device administrator application to create local user accounts. This A
| Name | Type | Mandatory | Description |
| -------- | ---------------------------------------- | ---- | ------------------------------- |
| admin | [Want](js-apis-app-ability-want.md) | Yes | Enterprise device administrator application. |
| 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. |
| admin | [Want](js-apis-app-ability-want.md) | Yes | Device administrator application. |
| 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&lt;void&gt; | Yes | Callback invoked to return the result. If the operation is successful, **err** is **null**. Otherwise, **err** is an error object. |
**Error codes**
......@@ -64,7 +66,7 @@ accountManager.disallowAddLocalAccount(wantTemp, true, (err) => {
disallowAddLocalAccount(admin: Want, disallow: boolean): Promise&lt;void&gt;
Forbids a device administrator application to create local user accounts. This API uses a promise to return the result.
Disallows a device administrator application to create local user accounts. This API uses a promise to return the result.
**Required permissions**: ohos.permission.ENTERPRISE_SET_ACCOUNT_POLICY
......@@ -76,14 +78,14 @@ Forbids a device administrator application to create local user accounts. This A
| Name | Type | Mandatory | Description |
| ----- | ----------------------------------- | ---- | ------- |
| admin | [Want](js-apis-app-ability-want.md) | Yes | Enterprise device administrator application.|
| 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. |
| admin | [Want](js-apis-app-ability-want.md) | Yes | Device administrator application.|
| 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. |
**Return value**
| Type | Description |
| --------------------- | ------------------------- |
| Promise&lt;void&gt; | Promise that returns no value. An error object will be thrown if the operation fails.|
| Promise&lt;void&gt; | Promise that returns no value. If the operation fails, an error object will be thrown.|
**Error codes**
......
......@@ -6,6 +6,8 @@ The **applicationManager** module provides application management capabilities,
>
> - 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).
## Modules to Import
......@@ -18,7 +20,7 @@ import applicationManager from '@ohos.enterprise.applicationManager';
addDisallowedRunningBundles(admin: Want, appIds: Array\<string>, callback: AsyncCallback&lt;void&gt;): void;
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.
**Required permissions**: ohos.permission.ENTERPRISE_MANAGE_SET_APP_RUNNING_POLICY
......@@ -66,7 +68,7 @@ applicationManager.addDisallowedRunningBundles(wantTemp, appIds, (err) => {
addDisallowedRunningBundles(admin: Want, appIds: Array\<string>, userId: number, callback: AsyncCallback&lt;void&gt;): void;
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.
**Required permissions**: ohos.permission.ENTERPRISE_MANAGE_SET_APP_RUNNING_POLICY
......@@ -80,7 +82,7 @@ Adds a list of applications that are forbidden to run by a given user through th
| ----- | ----------------------------------- | ---- | ------- |
| admin | [Want](js-apis-app-ability-want.md) | Yes | Device administrator application. |
| appIds | Array&lt;string&gt; | 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&lt;void&gt; | Yes | Callback invoked to return the result. If the operation is successful, **err** is **null**. Otherwise, **err** is an error object.|
**Error codes**
......@@ -114,7 +116,7 @@ applicationManager.addDisallowedRunningBundles(wantTemp, appIds, 100, (err) => {
addDisallowedRunningBundles(admin: Want, appIds: Array\<string>, userId?: number): Promise&lt;void&gt;;
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.
**Required permissions**: ohos.permission.ENTERPRISE_MANAGE_SET_APP_RUNNING_POLICY
......@@ -128,13 +130,13 @@ Adds a list of applications that are forbiddedn to run by the specified user (if
| ----- | ----------------------------------- | ---- | ------- |
| admin | [Want](js-apis-app-ability-want.md) | Yes | Device administrator application. |
| appIds | Array&lt;string&gt; | 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.|
**Return value**
| Type | Description |
| --------------------- | ------------------------- |
| Promise&lt;void&gt; | Promise that returns no value. An error object is thrown when the applications fail to be added. |
| Promise&lt;void&gt; | Promise that returns no value. If the operation fails, an error object will be thrown. |
**Error codes**
......@@ -165,7 +167,7 @@ applicationManager.addDisallowedRunningBundles(wantTemp, appIds, 100).then(() =>
removeDisallowedRunningBundles(admin: Want, appIds: Array\<string>, callback: AsyncCallback&lt;void&gt;): void;
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.
**Required permissions**: ohos.permission.ENTERPRISE_MANAGE_SET_APP_RUNNING_POLICY
......@@ -212,7 +214,7 @@ applicationManager.removeDisallowedRunningBundles(wantTemp, appIds, (err) => {
removeDisallowedRunningBundles(admin: Want, appIds: Array\<string>, userId: number, callback: AsyncCallback&lt;void&gt;): void;
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.
**Required permissions**: ohos.permission.ENTERPRISE_MANAGE_SET_APP_RUNNING_POLICY
......@@ -226,7 +228,7 @@ Removes a list of applications that are forbiddedn to run by the specified user
| ----- | ----------------------------------- | ---- | ------- |
| admin | [Want](js-apis-app-ability-want.md) | Yes | Device administrator application. |
| appIds | Array&lt;string&gt; | 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&lt;void&gt; | Yes | Callback invoked to return the result. If the operation is successful, **err** is **null**. Otherwise, **err** is an error object.|
**Error codes**
......@@ -260,7 +262,7 @@ applicationManager.removeDisallowedRunningBundles(wantTemp, appIds, 100, (err) =
removeDisallowedRunningBundles(admin: Want, appIds: Array\<string>, userId?: number): Promise&lt;void&gt;;
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.
**Required permissions**: ohos.permission.ENTERPRISE_MANAGE_SET_APP_RUNNING_POLICY
......@@ -274,13 +276,13 @@ Removes a list of applications that are forbiddedn to run by the specified user
| ----- | ----------------------------------- | ---- | ------- |
| admin | [Want](js-apis-app-ability-want.md) | Yes | Device administrator application. |
| appIds | Array&lt;string&gt; | 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.|
**Return value**
| Type | Description |
| --------------------- | ------------------------- |
| Promise&lt;void&gt; | Promise that returns no value. An error object is thrown when the applications fail to be removed. |
| Promise&lt;void&gt; | Promise that returns no value. If the operation fails, an error object will be thrown. |
**Error codes**
......@@ -311,7 +313,7 @@ applicationManager.removeDisallowedRunningBundles(wantTemp, appIds, 100).then(()
getDisallowedRunningBundles(admin: Want, callback: AsyncCallback&lt;Array&lt;string&gt;&gt;): void;
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.
**Required permissions**: ohos.permission.ENTERPRISE_MANAGE_SET_APP_RUNNING_POLICY
......@@ -356,7 +358,7 @@ applicationManager.getDisallowedRunningBundles(wantTemp, (err, result) => {
getDisallowedRunningBundles(admin: Want, userId: number, callback: AsyncCallback&lt;Array&lt;string&gt;&gt;): void;
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.
**Required permissions**: ohos.permission.ENTERPRISE_MANAGE_SET_APP_RUNNING_POLICY
......@@ -369,7 +371,7 @@ Obtains the list of applications that are firbidded to run by the specified user
| Name | Type | Mandatory | Description |
| -------- | ---------------------------------------- | ---- | ------------------------------- |
| admin | [Want](js-apis-app-ability-want.md) | Yes | Device administrator application. |
| 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&lt;Array&lt;string&gt;&gt; | Yes | Callback invoked to return the result. If the operation is successful, **err** is **null**. Otherwise, **err** is an error object. |
**Error codes**
......@@ -402,7 +404,7 @@ applicationManager.getDisallowedRunningBundles(wantTemp, 100, (err, result) => {
getDisallowedRunningBundles(admin: Want, userId?: number): Promise&lt;Array&lt;string&gt;&gt;;
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.
**Required permissions**: ohos.permission.ENTERPRISE_MANAGE_SET_APP_RUNNING_POLICY
......@@ -415,7 +417,7 @@ Obtains the list of applications that are firbidded to run by the specified user
| Name | Type | Mandatory | Description |
| ----- | ----------------------------------- | ---- | ------- |
| admin | [Want](js-apis-app-ability-want.md) | Yes | Device administrator application.|
| 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.|
**Return value**
......
......@@ -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 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
......@@ -113,7 +115,7 @@ dateTimeManager.setDateTime(wantTemp, 1526003846000).then(() => {
disallowModifyDateTime(admin: Want, disallow: boolean, callback: AsyncCallback\<void>): void
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.
**Required permissions**: ohos.permission.ENTERPRISE_SET_DATETIME
......@@ -126,7 +128,7 @@ Disallows modification of the system time through the specified device administr
| Name | Type | Mandatory | Description |
| ----- | ----------------------------------- | ---- | ------- |
| admin | [Want](js-apis-app-ability-want.md) | Yes | Device administrator application.|
| 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.|
**Error codes**
......@@ -159,7 +161,7 @@ dateTimeManager.disallowModifyDateTime(wantTemp, true, (err) => {
disallowModifyDateTime(admin: Want, disallow: boolean): Promise\<void>
Disallows modification of the system time through the specified device administrator application. This API uses a promise to return the result.
Forbids the specified device administrator application to modify the system time. This API uses a promise to return the result.
**Required permissions**: ohos.permission.ENTERPRISE_SET_DATETIME
......@@ -172,13 +174,13 @@ Disallows modification of the system time through the specified device administr
| Name | Type | Mandatory | Description |
| ----- | ----------------------------------- | ---- | ------- |
| admin | [Want](js-apis-app-ability-want.md) | Yes | Device administrator application.|
| 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**
| 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.|
**Error codes**
......@@ -208,7 +210,7 @@ dateTimeManager.disallowModifyDateTime(wantTemp, true).then(() => {
isModifyDateTimeDisallowed(admin: Want, callback: AsyncCallback\<boolean>): void
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.
**Required permissions**: ohos.permission.ENTERPRISE_SET_DATETIME
......@@ -221,7 +223,7 @@ Checks whether the modification of the system time is disallowed through the spe
| Name | Type | Mandatory | Description |
| ----- | ----------------------------------- | ---- | ------- |
| admin | [Want](js-apis-app-ability-want.md) | Yes | Device administrator application.|
| 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.|
**Error codes**
......@@ -253,7 +255,7 @@ dateTimeManager.isModifyDateTimeDisallowed(wantTemp, (err, result) => {
isModifyDateTimeDisallowed(admin: Want): Promise\<boolean>
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.
**Required permissions**: ohos.permission.ENTERPRISE_SET_DATETIME
......@@ -271,7 +273,7 @@ Checks whether the modification of the system time is disallowed through the spe
| 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.|
**Error codes**
......
# @ohos.enterprise.deviceControl (Device Control)
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**
>
>
> - 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).
......@@ -19,7 +20,7 @@ import deviceControl from '@ohos.enterprise.deviceControl'
resetFactory(admin: Want, callback: AsyncCallback\<void>): void
Restores factory settings through the specified device administrator application. This API uses an asynchronous callback to return the result.
Restores device factory settings through the specified device administrator application. This API uses an asynchronous callback to return the result.
**Required permissions**: ohos.permission.ENTERPRISE_RESET_DEVICE
......@@ -31,7 +32,7 @@ Restores factory settings through the specified device administrator application
| Name | Type | Mandatory | Description |
| ----- | ----------------------------------- | ---- | ------- |
| admin | [Want](js-apis-app-ability-want.md) | Yes | Device administrator application used to restore the factory settings.|
| admin | [Want](js-apis-app-ability-want.md) | Yes | Device administrator application.|
| 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**
......@@ -64,7 +65,7 @@ deviceControl.resetFactory(wantTemp, (err) => {
resetFactory(admin: Want): Promise\<void>
Restores factory settings. This API uses a promise to return the result.
Restores device factory settings through the specified device administrator application. This API uses a promise to return the result.
**Required permissions**: ohos.permission.ENTERPRISE_RESET_DEVICE
......@@ -76,7 +77,7 @@ Restores factory settings. This API uses a promise to return the result.
| Name | Type | Mandatory | Description |
| ----- | ----------------------------------- | ---- | ------- |
| admin | [Want](js-apis-app-ability-want.md) | Yes | Device administrator application used to restore the factory settings.|
| admin | [Want](js-apis-app-ability-want.md) | Yes | Device administrator application.|
**Return value**
......
......@@ -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 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
......@@ -111,7 +113,7 @@ deviceInfo.getDeviceSerial(wantTemp).then((result) => {
getDisplayVersion(admin: Want, callback: AsyncCallback&lt;string&gt;): void;
Obtains the device version number through the specified device administrator application. This API uses an asynchronous callback to return the result.
Obtains the device version through the specified device administrator application. This API uses an asynchronous callback to return the result.
**Required permissions**: ohos.permission.ENTERPRISE_GET_DEVICE_INFO
......@@ -124,7 +126,7 @@ Obtains the device version number through the specified device administrator app
| Name | Type | Mandatory | Description |
| -------- | ---------------------------------------- | ---- | ------------------------------- |
| admin | [Want](js-apis-app-ability-want.md) | Yes | Device administrator application. |
| callback | AsyncCallback&lt;string&gt; | 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&lt;string&gt; | 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. |
**Error codes**
......@@ -156,7 +158,7 @@ deviceInfo.getDisplayVersion(wantTemp, (err, result) => {
getDisplayVersion(admin: Want): Promise&lt;string&gt;
Obtains the device version number through the specified device administrator application. This API uses a promise to return the result.
Obtains the device version through the specified device administrator application. This API uses a promise to return the result.
**Required permissions**: ohos.permission.ENTERPRISE_GET_DEVICE_INFO
......@@ -174,7 +176,7 @@ Obtains the device version number through the specified device administrator app
| Type | Description |
| --------------------- | ------------------------- |
| Promise&lt;string&gt; | Promise used to return the device version number.|
| Promise&lt;string&gt; | Promise used to return the device version obtained.|
**Error codes**
......
......@@ -4,9 +4,11 @@ The **wifiManager** module provides APIs for Wi-Fi management of enterprise devi
> **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
......@@ -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).
| ID| Error Message |
| ID| Error Message |
| ------- | ---------------------------------------------------------------------------- |
| 9200001 | the application is not an administrator of the device. |
| 9200002 | the administrator application does not have permission to manage the device. |
......@@ -87,7 +89,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).
| ID| Error Message |
| ID| Error Message |
| ------- | ---------------------------------------------------------------------------- |
| 9200001 | the application is not an administrator of the device. |
| 9200002 | the administrator application does not have permission to manage the device. |
......@@ -111,7 +113,7 @@ wifiManager.isWifiActive(wantTemp).then((result) => {
setWifiProfile(admin: Want, profile: WifiProfile, callback: AsyncCallback&lt;void&gt;): void
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.
**Required permissions**: ohos.permission.ENTERPRISE_SET_WIFI
......@@ -124,14 +126,14 @@ Sets Wi-Fi to connect to the specified network. This API uses an asynchronous ca
| Name | Type | Mandatory | Description |
| -------- | ---------------------------------------- | ---- | ------------------------------- |
| admin | [Want](js-apis-app-ability-want.md) | Yes | Device administrator application. |
| profile | [WifiProfile](#wifiprofile) | Yes | WLAN configuration. |
| profile | [WifiProfile](#wifiprofile) | Yes | Wi-Fi profile information. |
| callback | AsyncCallback&lt;void&gt; | Yes | Callback invoked 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).
| ID| Error Message |
| ID| Error Message |
| ------- | ---------------------------------------------------------------------------- |
| 9200001 | the application is not an administrator of the device. |
| 9200002 | the administrator application does not have permission to manage the device. |
......@@ -162,7 +164,7 @@ wifiManager.setWifiProfile(wantTemp, profile, (err) => {
setWifiProfile(admin: Want, profile: WifiProfile): Promise&lt;void&gt;
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.
**Required permissions**: ohos.permission.ENTERPRISE_SET_WIFI
......@@ -175,7 +177,7 @@ Sets Wi-Fi to connect to the specified network. This API uses a promise to retur
| Name | Type | Mandatory | Description |
| ----- | ----------------------------------- | ---- | ------- |
| admin | [Want](js-apis-app-ability-want.md) | Yes | Device administrator application.|
| profile | [WifiProfile](#wifiprofile) | Yes | WLAN configuration. |
| profile | [WifiProfile](#wifiprofile) | Yes | Wi-Fi profile information. |
**Return value**
......@@ -187,7 +189,7 @@ Sets Wi-Fi to connect to the specified network. This API uses a promise to retur
For details about the error codes, see [Enterprise Device Management Error Codes](../errorcodes/errorcode-enterpriseDeviceManager.md).
| ID| Error Message |
| ID| Error Message |
| ------- | ---------------------------------------------------------------------------- |
| 9200001 | the application is not an administrator of the device. |
| 9200002 | the administrator application does not have permission to manage the device. |
......@@ -214,7 +216,7 @@ wifiManager.setWifiProfile(wantTemp, profile).then(() => {
## WifiProfile
Represents the WLAN configuration.
Represents the Wi-Fi profile information.
**System capability**: SystemCapability.Customization.EnterpriseDeviceManager
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册