diff --git a/en/application-dev/reference/apis/js-apis-enterprise-adminManager.md b/en/application-dev/reference/apis/js-apis-enterprise-adminManager.md index 0fd78714ed4bdf8a177fa46a814c16107e05b3ff..b7e0d26bfa1d9bab9cd43e03dc15b52b20090225 100644 --- a/en/application-dev/reference/apis/js-apis-enterprise-adminManager.md +++ b/en/application-dev/reference/apis/js-apis-enterprise-adminManager.md @@ -16,7 +16,7 @@ import adminManager from '@ohos.enterprise.adminManager'; enableAdmin(admin: Want, enterpriseInfo: EnterpriseInfo, type: AdminType, callback: AsyncCallback\): void -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. **Required permissions**: ohos.permission.MANAGE_ENTERPRISE_DEVICE_ADMIN @@ -29,13 +29,13 @@ Enables a device administrator application based on the specified bundle name an | Name | Type | Mandatory | Description | | -------------- | ----------------------------------- | ---- | ------------------ | | admin | [Want](js-apis-app-ability-want.md) | Yes | Device administrator application. | -| 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\ | Yes | Callback used to return the result.| +| callback | AsyncCallback\ | Yes | Callback used to return the result. If the operation is successful, **err** is **null**. Otherwise, **err** is an error object.| **Error codes** -For details about the following 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). | ID| Error Message | | ------- | --------------------------------------------------------------- | @@ -48,7 +48,7 @@ For details about the following error codes, see [Enterprise Device Management E ```js let wantTemp = { bundleName: "com.example.myapplication", - abilityName: "EntryAbility", + abilityName: "com.example.myapplication.MainAbility", }; let enterpriseInfo = { name: "enterprise name", @@ -67,7 +67,7 @@ adminManager.enableAdmin(wantTemp, enterpriseInfo, adminManager.AdminType.ADMIN_ enableAdmin(admin: Want, enterpriseInfo: EnterpriseInfo, type: AdminType, userId: number, callback: AsyncCallback\): void -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. **Required permissions**: ohos.permission.MANAGE_ENTERPRISE_DEVICE_ADMIN @@ -83,11 +83,11 @@ 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\ | Yes | Callback used to return the result. | +| callback | AsyncCallback\ | Yes | Callback used to return the result. If the operation is successful, **err** is **null**. Otherwise, **err** is an error object. | **Error codes** -For details about the following 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). | ID| Error Message | | ------- | --------------------------------------------------------------- | @@ -100,7 +100,7 @@ For details about the following error codes, see [Enterprise Device Management E ```js let wantTemp = { bundleName: "com.example.myapplication", - abilityName: "EntryAbility", + abilityName: "com.example.myapplication.MainAbility", }; let enterpriseInfo = { name: "enterprise name", @@ -119,7 +119,7 @@ adminManager.enableAdmin(wantTemp, enterpriseInfo, adminManager.AdminType.ADMIN_ enableAdmin(admin: Want, enterpriseInfo: EnterpriseInfo, type: AdminType, userId?: number): Promise\ -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. **Required permissions**: ohos.permission.MANAGE_ENTERPRISE_DEVICE_ADMIN @@ -140,11 +140,11 @@ Enables a device administrator application based on the specified bundle name an | Type | Description | | ----------------- | ----------------- | -| Promise\ | Promise used to return the result.| +| Promise\ | Promise that returns no value. If the operation fails, an error object is thrown.| **Error codes** -For details about the following 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). | ID| Error Message | | ------- | --------------------------------------------------------------- | @@ -157,7 +157,7 @@ For details about the following error codes, see [Enterprise Device Management E ```js let wantTemp = { bundleName: "com.example.myapplication", - abilityName: "EntryAbility", + abilityName: "com.example.myapplication.MainAbility", }; let enterpriseInfo = { name: "enterprise name", @@ -173,7 +173,7 @@ adminManager.enableAdmin(wantTemp, enterpriseInfo, adminManager.AdminType.ADMIN_ disableAdmin(admin: Want, callback: AsyncCallback\): void -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. **Required permissions**: ohos.permission.MANAGE_ENTERPRISE_DEVICE_ADMIN @@ -186,11 +186,11 @@ Disables a device common administrator application based on the specified bundle | Name | Type | Mandatory | Description | | -------- | ----------------------------------- | ---- | ------------------- | | admin | [Want](js-apis-app-ability-want.md) | Yes | Device common administrator application. | -| callback | AsyncCallback\ | Yes | Callback used to return the result.| +| callback | AsyncCallback\ | Yes | Callback used to return the result. If the operation is successful, **err** is **null**. Otherwise, **err** is an error object.| **Error codes** -For details about the following 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). | ID| Error Message | | ------- | ----------------------------------------------------------------- | @@ -216,7 +216,7 @@ adminManager.disableAdmin(wantTemp, error => { disableAdmin(admin: Want, userId: number, callback: AsyncCallback\): void -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. **Required permissions**: ohos.permission.MANAGE_ENTERPRISE_DEVICE_ADMIN @@ -230,11 +230,11 @@ Disables a device common administrator application for the specified user based | -------- | ----------------------------------- | ---- | ---------------------------- | | admin | [Want](js-apis-app-ability-want.md) | Yes | Device common administrator application. | | 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\ | Yes | Callback used to return the result. | +| callback | AsyncCallback\ | Yes | Callback used to return the result. If the operation is successful, **err** is **null**. Otherwise, **err** is an error object. | **Error codes** -For details about the following 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). | ID| Error Message | | ------- | ----------------------------------------------------------------- | @@ -260,7 +260,7 @@ adminManager.disableAdmin(wantTemp, 100, error => { disableAdmin(admin: Want, userId?: number): Promise\ -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. **Required permissions**: ohos.permission.MANAGE_ENTERPRISE_DEVICE_ADMIN @@ -279,11 +279,11 @@ Disables a device common administrator application based on the specified bundle | Type | Description | | ----------------- | ----------------- | -| Promise\ | Promise used to return the result.| +| Promise\ | Promise that returns no value. If the operation fails, an error object is thrown.| **Error codes** -For details about the following 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). | ID| Error Message | | ------- | ----------------------------------------------------------------- | @@ -318,11 +318,11 @@ Disables a device super administrator application based on the specified bundle | Name | Type | Mandatory | Description | | ---------- | ----------------------- | ---- | ------------------- | | bundleName | String | Yes | Bundle name of the device super administrator application. | -| callback | AsyncCallback\ | Yes | Callback used to return the result.| +| callback | AsyncCallback\ | Yes | Callback used to return the result. If the operation is successful, **err** is **null**. Otherwise, **err** is an error object.| **Error codes** -For details about the following 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). | ID| Error Message | | ------- | ----------------------------------------------------------------- | @@ -363,11 +363,11 @@ Disables a device super administrator application based on the specified bundle | Type | Description | | ----------------- | ----------------- | -| Promise\ | Promise used to return the result.| +| Promise\ | Promise that returns no value. If the operation fails, an error object is thrown.| **Error codes** -For details about the following 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). | ID| Error Message | | ------- | ----------------------------------------------------------------- | @@ -386,7 +386,7 @@ adminManager.disableSuperAdmin(bundleName).catch(error => { isAdminEnabled(admin: Want, callback: AsyncCallback\): void -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. **System capability**: SystemCapability.Customization.EnterpriseDeviceManager @@ -396,8 +396,8 @@ Checks whether a device administrator application is enabled based on the specif | Name | Type | Mandatory | Description | | -------- | ----------------------------------- | ---- | -------------------- | -| admin | [Want](js-apis-app-ability-want.md) | Yes | Device administrator application. | -| callback | AsyncCallback\ | Yes | Callback used to return the result.| +| admin | [Want](js-apis-app-ability-want.md) | Yes | Device administrator application. | +| callback | AsyncCallback\ | 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** @@ -419,7 +419,7 @@ adminManager.isAdminEnabled(wantTemp, (error, result) => { isAdminEnabled(admin: Want, userId: number, callback: AsyncCallback\): void -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. **System capability**: SystemCapability.Customization.EnterpriseDeviceManager @@ -431,7 +431,7 @@ Checks whether a device administrator application is enabled for the specified u | -------- | ----------------------------------- | ---- | ---------------------------- | | 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 value must be greater than or equal to 0.| -| callback | AsyncCallback\ | Yes | Callback used to return the result. | +| callback | AsyncCallback\ | 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** @@ -453,7 +453,7 @@ adminManager.isAdminEnabled(wantTemp, 100, (error, result) => { isAdminEnabled(admin: Want, userId?: number): Promise\ -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. **System capability**: SystemCapability.Customization.EnterpriseDeviceManager @@ -470,7 +470,7 @@ Checks whether a device administrator application is enabled based on the specif | Type | Description | | ----------------- | ------------------- | -| Promise\ | Promise used to return the result.| +| Promise\ | 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 | Name | Type | Mandatory | Description | | ---------- | ----------------------- | ---- | -------------------- | | bundleName | String | Yes | Device administrator application. | -| callback | AsyncCallback\ | Yes | Callback used to return the result.| +| callback | AsyncCallback\ | 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\ | Promise used to return the result.| +| Promise\ | 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,11 +567,11 @@ Sets the enterprise information of a device administrator application. This API | -------------- | ----------------------------------- | ---- | ---------------------- | | admin | [Want](js-apis-app-ability-want.md) | Yes | Device administrator application. | | enterpriseInfo | [EnterpriseInfo](#enterpriseinfo) | Yes | Enterprise information of the device administrator application. | -| callback | AsyncCallback\; | Yes | Callback used to return the result.| +| callback | AsyncCallback\; | Yes | Callback used to return the result. If the operation is successful, **err** is **null**. Otherwise, **err** is an error object.| **Error codes** -For details about the following 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). | ID| Error Message | | ------- | ----------------------------------------------------- | @@ -582,7 +582,7 @@ For details about the following error codes, see [Enterprise Device Management E ```js let wantTemp = { bundleName: "com.example.myapplication", - abilityName: "EntryAbility", + abilityName: "com.example.myapplication.MainAbility", }; let enterpriseInfo = { name: "enterprise name", @@ -620,11 +620,11 @@ Sets the enterprise information of a device administrator application. This API | Type | Description | | ----------------- | --------------------- | -| Promise\ | Promise used to return the result.| +| Promise\ | Promise that returns no value. If the operation fails, an error object is thrown.| **Error codes** -For details about the following 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). | ID| Error Message | | ------- | ----------------------------------------------------- | @@ -635,7 +635,7 @@ For details about the following error codes, see [Enterprise Device Management E ```js let wantTemp = { bundleName: "com.example.myapplication", - abilityName: "EntryAbility", + abilityName: "com.example.myapplication.MainAbility", }; let enterpriseInfo = { name: "enterprise name", @@ -661,11 +661,11 @@ Obtains the enterprise information of a device administrator application. This A | Name | Type | Mandatory | Description | | -------- | ---------------------------------------- | ---- | ------------------------ | | admin | [Want](js-apis-app-ability-want.md) | Yes | Device administrator application. | -| 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** -For details about the following 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). | ID| Error Message | | ------- | ----------------------------------------------------- | @@ -676,7 +676,7 @@ For details about the following error codes, see [Enterprise Device Management E ```js let wantTemp = { bundleName: "com.example.myapplication", - abilityName: "EntryAbility", + abilityName: "com.example.myapplication.MainAbility", }; adminManager.getEnterpriseInfo(wantTemp, (error, result) => { if (error != null) { @@ -708,11 +708,11 @@ Obtains the enterprise information of a device administrator application. This A | Type | Description | | ---------------------------------------- | ------------------------- | -| Promise<[EnterpriseInfo](#enterpriseinfo)> | Promise used to return the enterprise information of the device administrator application.| +| Promise<[EnterpriseInfo](#enterpriseinfo)> | Callback used to return the enterprise information of the device administrator application.| **Error codes** -For details about the following 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). | ID| Error Message | | ------- | ----------------------------------------------------- | @@ -723,7 +723,7 @@ For details about the following error codes, see [Enterprise Device Management E ```js let wantTemp = { bundleName: "com.example.myapplication", - abilityName: "EntryAbility", + abilityName: "com.example.myapplication.MainAbility", }; adminManager.getEnterpriseInfo(wantTemp).then((result) => { console.log(result.name); @@ -737,7 +737,7 @@ adminManager.getEnterpriseInfo(wantTemp).then((result) => { subscribeManagedEvent(admin: Want, managedEvents: Array\, callback: AsyncCallback\): void -Subscribes to system management events. This API uses an asynchronous callback to return the result. +Configures a device administrator application to subscribe to system management events. This API uses an asynchronous callback to return the result. **Required permissions**: ohos.permission.ENTERPRISE_SUBSCRIBE_MANAGED_EVENT @@ -751,11 +751,11 @@ Subscribes to system management events. This API uses an asynchronous callback t | ----- | ----------------------------------- | ---- | ------- | | admin | [Want](js-apis-app-ability-want.md) | Yes | Device administrator application.| | managedEvents | Array\<[ManagedEvent](#managedevent)> | Yes| Array of events to subscribe to.| -| callback | AsyncCallback\ | Yes| Callback used to return the result. If the subscription is successful, **err** is **null**. Otherwise, **err** is an error object.| +| callback | AsyncCallback\ | Yes| Callback used to return the result. If the operation is successful, **err** is **null**. Otherwise, **err** is an error object.| **Error codes** -For details about the following 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). |ID| Error Message | | ------- | ----------------------------------------------------- | @@ -781,7 +781,7 @@ adminManager.subscribeManagedEvent(wantTemp, events, (error) => { subscribeManagedEvent(admin: Want, managedEvents: Array\): Promise\ -Subscribes to system management events. This API uses a promise to return the result. +Configures a device administrator application to subscribe to system management events. This API uses a promise to return the result. **Required permissions**: ohos.permission.ENTERPRISE_SUBSCRIBE_MANAGED_EVENT @@ -800,11 +800,11 @@ Subscribes to system management events. This API uses a promise to return the re | Type | Description | | ----- | ----------------------------------- | -| Promise\ | Promise that returns no value.| +| Promise\ | Promise that returns no value. If the operation fails, an error object is thrown.| **Error codes** -For details about the following 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). | ID| Error Message | | ------- | ----------------------------------------------------- | @@ -829,7 +829,7 @@ adminManager.subscribeManagedEvent(wantTemp, events).then(() => { unsubscribeManagedEvent(admin: Want, managedEvents: Array\, callback: AsyncCallback\): void -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. **Required permissions**: ohos.permission.ENTERPRISE_SUBSCRIBE_MANAGED_EVENT @@ -843,11 +843,11 @@ Unsubscribes from system management events. This API uses an asynchronous callba | ----- | ----------------------------------- | ---- | ------- | | admin | [Want](js-apis-app-ability-want.md) | Yes | Device administrator application.| | managedEvents | Array\<[ManagedEvent](#managedevent)> | Yes| Array of events to unsubscribe from.| -| callback | AsyncCallback\ | Yes| Callback used to return the result. If the unsubscription is successful, **err** is **null**. Otherwise, **err** is an error object.| +| callback | AsyncCallback\ | Yes| Callback used to return the result. If the operation is successful, **err** is **null**. Otherwise, **err** is an error object.| **Error codes** -For details about the following 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). | ID| Error Message | | ------- | ----------------------------------------------------- | @@ -873,7 +873,7 @@ adminManager.unsubscribeManagedEvent(wantTemp, events, (error) => { unsubscribeManagedEvent(admin: Want, managedEvents: Array\): Promise\ -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 a promise to return the result. **Required permissions**: ohos.permission.ENTERPRISE_SUBSCRIBE_MANAGED_EVENT @@ -892,11 +892,11 @@ Unsubscribes from system management events. This API uses an asynchronous callba | Type | Description | | ----- | ----------------------------------- | -| Promise\ | Promise that returns no value.| +| Promise\ | Promise that returns no value. If the operation fails, an error object is thrown.| **Error codes** -For details about the following 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). | ID| Error Message | | ------- | ----------------------------------------------------- | @@ -953,5 +953,6 @@ Enumerates the system management events that can be subscribed to. | Name | Value | Description | | -------------------------- | ---- | ------------- | -| MANAGED_EVENT_BUNDLE_ADDED | 0 | Application installation event.| -| MANAGED_EVENT_BUNDLE_REMOVED | 1 | Application uninstallation event.| +| MANAGED_EVENT_BUNDLE_ADDED | 0 | Bundle added.| +| MANAGED_EVENT_BUNDLE_REMOVED | 1 | Bundle removed.| + diff --git a/en/application-dev/reference/apis/js-apis-enterprise-dateTimeManager.md b/en/application-dev/reference/apis/js-apis-enterprise-dateTimeManager.md index bc28cffaa5844cf46dbf73ffaa198e4b3e89ff7b..b032cf9d46386ca92f19d4005abb8867a6020978 100644 --- a/en/application-dev/reference/apis/js-apis-enterprise-dateTimeManager.md +++ b/en/application-dev/reference/apis/js-apis-enterprise-dateTimeManager.md @@ -1,6 +1,6 @@ -# @ohos.enterprise.dateTimeManager +# @ohos.enterprise.dateTimeManager (System Time Management) -The **dateTimeManager** module provides APIs for system time management, which can only be called by device administrator applications. +The **dateTimeManager** module provides APIs for system time management. Only the enterprise device administrator applications can call the APIs provided by this module. > **NOTE** > @@ -16,7 +16,7 @@ import dateTimeManager from '@ohos.enterprise.dateTimeManager' setDateTime(admin: Want, time: number, callback: AsyncCallback\): void -Sets the system time. This API uses an asynchronous callback to return the result. +Configures a device administrator application to set the system time. This API uses an asynchronous callback to return the result. **Required permissions**: ohos.permission.ENTERPRISE_SET_DATETIME @@ -30,11 +30,11 @@ Sets the system time. This API uses an asynchronous callback to return the resul | ----- | ----------------------------------- | ---- | ------- | | admin | [Want](js-apis-app-ability-want.md) | Yes | Device administrator application.| | time | number | Yes| Timestamp (ms).| -| callback | AsyncCallback\ | Yes| Callback used to return the result. If the setting is successful, **err** is **null**. Otherwise, **err** is an error object.| +| callback | AsyncCallback\ | Yes| Callback used to return the result. If the operation is successful, **err** is **null**. Otherwise, **err** is an error object.| **Error codes** -For details about the following 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). | ID| Error Message | | ------- | ---------------------------------------------------------------------------- | @@ -59,7 +59,7 @@ dateTimeManager.setDateTime(wantTemp, 1526003846000, (error) => { setDateTime(admin: Want, time: number): Promise\ -Sets the system time. This API uses a promise to return the result. +Configures a device administrator application to set the system time. This API uses a promise to return the result. **Required permissions**: ohos.permission.ENTERPRISE_SET_DATETIME @@ -82,7 +82,7 @@ Sets the system time. This API uses a promise to return the result. **Error codes** -For details about the following 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). | ID| Error Message | | ------- | ---------------------------------------------------------------------------- | diff --git a/en/application-dev/reference/apis/js-apis-plugincomponent.md b/en/application-dev/reference/apis/js-apis-plugincomponent.md index 740fd72e50247da5bdae3b573c1e115c8cdcd0e5..7becd3c7eed30158ec0054285e2a2903eaa5ff6b 100644 --- a/en/application-dev/reference/apis/js-apis-plugincomponent.md +++ b/en/application-dev/reference/apis/js-apis-plugincomponent.md @@ -55,8 +55,8 @@ Sets the parameters to be passed in the **PluginManager.Push** API in the FA mod | --------- | ----------------------------------- | ---- | -------------------------------------------------------------- | | want | [Want](js-apis-application-want.md) | Yes | Ability information of the component user. | | name | string | Yes | Component name. | -| data | [KVObject](#kvobject) | No | Component data value. | -| extraData | [KVObject](#kvobject) | No | Additional data value. | +| data | [KVObject](#kvobject) | Yes | Component data value. | +| extraData | [KVObject](#kvobject) | Yes | Additional data value. | | jsonPath | string | No | Path to the [external.json](#about-the-externaljson-file) file that stores the template path.| ### PushParameterForStage @@ -74,8 +74,8 @@ Sets the parameters to be passed in the **PluginManager.Push** API in the stage | owner | [Want](js-apis-application-want.md) | Yes | Ability information of the component provider. | | target | [Want](js-apis-application-want.md) | Yes | Ability information of the component user. | | name | string | Yes | Component name. | -| data | [KVObject](#kvobject) | No | Component data value. | -| extraData | [KVObject](#kvobject) | No | Additional data value. | +| data | [KVObject](#kvobject) | Yes | Component data value. | +| extraData | [KVObject](#kvobject) | Yes | Additional data value. | | jsonPath | string | No | Path to the [external.json](#about-the-externaljson-file) file that stores the template path.| ### RequestParameters @@ -117,11 +117,11 @@ Provides the result returned after the **PluginManager.Request** API is called. **System capability**: SystemCapability.ArkUI.ArkUI.Full -| Name | Type | Mandatory| Description | -| ----------------- | ---------------------------------------------------- | ---- | ---------- | -| componentTemplate | [PluginComponentTemplate](#plugincomponenttemplate)] | Yes | Component template.| -| data | [KVObject](#kvobject) | Yes | Component data.| -| extraData | [KVObject](#kvobject) | Yes | Additional data.| +| Name | Type | Mandatory| Description | +| ----------------- | --------------------------------------------------- | ---- | ---------- | +| componentTemplate | [PluginComponentTemplate](#plugincomponenttemplate) | Yes | Component template.| +| data | [KVObject](#kvobject) | Yes | Component data.| +| extraData | [KVObject](#kvobject) | Yes | Additional data.| ### RequestEventResult @@ -175,7 +175,7 @@ Registers the listener for the request event. | Name | Type | Mandatory| Description | | --------- | ----------------------------------- | ---- | --------------------------- | | source | [Want](js-apis-application-want.md) | Yes | Information about the request sender.| -| data | [KVObject](#kvobject) | Yes | Data. | +| name | string | Yes | Template name. | | extraData | [KVObject](#kvobject) | Yes | Additional data. | **Example** diff --git a/en/application-dev/reference/arkui-ts/ts-basic-components-plugincomponent.md b/en/application-dev/reference/arkui-ts/ts-basic-components-plugincomponent.md index e7f8efe820a3d3354fc014a5a9e052ab8d682bb1..9b3257ed07aa9b2ba2aa0a26c573572074587932 100644 --- a/en/application-dev/reference/arkui-ts/ts-basic-components-plugincomponent.md +++ b/en/application-dev/reference/arkui-ts/ts-basic-components-plugincomponent.md @@ -5,7 +5,7 @@ The **\** allows the UI provided by an external application to > **NOTE** > -> - This component is supported since API version 9. Updates will be marked with a superscript to indicate their earliest API version. +> This component is supported since API version 9. Updates will be marked with a superscript to indicate their earliest API version. ## Child Components @@ -30,10 +30,21 @@ Creates a **PluginComponent** to display the UI provided by an external applicat | ---------- | ------ | --------------------------- | | source | string | Component template name. | | 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. + + Example: **{source: 'ets/pages/plugin.js', bundleName: 'com.example.provider'}** + + The template is provided only when **source** can be set to an ability name in the FA model. + + Example: **{source: 'plugin', bundleName: 'com.example.provider'}** -The universal attribute [size](ts-universal-attributes-size.md) is supported and must be set. ## Events diff --git a/en/application-dev/reference/arkui-ts/ts-types.md b/en/application-dev/reference/arkui-ts/ts-types.md index be8160faf7bd851cda2b1da304bd4c80a1eca85f..4fe6dd3ceaaf9bdcdc06b5b5a1fc1b92c7f1a1fb 100644 --- a/en/application-dev/reference/arkui-ts/ts-types.md +++ b/en/application-dev/reference/arkui-ts/ts-types.md @@ -124,8 +124,8 @@ The **ResourceColor** type is used to describe the color types of resources. | Type | Description | | ---------------------------------------- | ------------------------------------------------- | | [Color](ts-appendix-enums.md#color) | Color enums. | -| number | Color in hexadecimal notation. RGB is supported. | -| string | Color in RGB or RGBA notation. | +| number | Color in hexadecimal notation. RGB is supported. Example: **0xffffff** | +| string | Color in RGB or RGBA notation. Example: **'#ffffff', '#ff000000', 'rgb(255, 100, 255)', 'rgba(255, 100, 255, 0.5)'** | | [Resource](#resource) | Color referenced from system or application resources.| ## LengthConstrain @@ -207,7 +207,7 @@ The **ColorFilter** type is used to create a color filter with a 4 x 5 matrix. | Name | Type | Mandatory | Description | | ----------- | -------- | ---- | ---------------------------------------- | -| 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.| ## CustomBuilder8+ @@ -216,5 +216,5 @@ The **CustomBuilder** type is used to define custom UI descriptions in component | Name | Type | Description | | ------------- | ---------------------- | ---------------------------------------- | -| 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).| diff --git a/en/application-dev/ui/figures/en-us_image_0000001511421264.png b/en/application-dev/ui/figures/en-us_image_0000001511421264.png new file mode 100644 index 0000000000000000000000000000000000000000..fe59d441c386189694b3185e23279f14c6dd4a97 Binary files /dev/null and b/en/application-dev/ui/figures/en-us_image_0000001511421264.png differ diff --git a/en/application-dev/ui/figures/en-us_image_0000001511421268.png b/en/application-dev/ui/figures/en-us_image_0000001511421268.png new file mode 100644 index 0000000000000000000000000000000000000000..5e549b42338ffe87b944807cec7e57144b5cbe74 Binary files /dev/null and b/en/application-dev/ui/figures/en-us_image_0000001511421268.png differ diff --git a/en/application-dev/ui/figures/en-us_image_0000001511421272.gif b/en/application-dev/ui/figures/en-us_image_0000001511421272.gif new file mode 100644 index 0000000000000000000000000000000000000000..f2e18ecafe8202705a34e6c76b4fdc59d5cca8d6 Binary files /dev/null and b/en/application-dev/ui/figures/en-us_image_0000001511421272.gif differ diff --git a/en/application-dev/ui/figures/en-us_image_0000001511580892.png b/en/application-dev/ui/figures/en-us_image_0000001511580892.png new file mode 100644 index 0000000000000000000000000000000000000000..297dea381d85074e91edfb664bac5b8e3151f7bb Binary files /dev/null and b/en/application-dev/ui/figures/en-us_image_0000001511580892.png differ diff --git a/en/application-dev/ui/figures/en-us_image_0000001511740476.png b/en/application-dev/ui/figures/en-us_image_0000001511740476.png new file mode 100644 index 0000000000000000000000000000000000000000..3b246c32f1079b06c18c1a14cbcb286c241a8623 Binary files /dev/null and b/en/application-dev/ui/figures/en-us_image_0000001511740476.png differ diff --git a/en/application-dev/ui/figures/en-us_image_0000001511740488.png b/en/application-dev/ui/figures/en-us_image_0000001511740488.png new file mode 100644 index 0000000000000000000000000000000000000000..1153aade7a6764fe871d63783abdcd09366fba13 Binary files /dev/null and b/en/application-dev/ui/figures/en-us_image_0000001511740488.png differ diff --git a/en/application-dev/ui/figures/en-us_image_0000001511740492.gif b/en/application-dev/ui/figures/en-us_image_0000001511740492.gif new file mode 100644 index 0000000000000000000000000000000000000000..eba3ab4a41c44642c47f1864858094771043dcc7 Binary files /dev/null and b/en/application-dev/ui/figures/en-us_image_0000001511740492.gif differ diff --git a/en/application-dev/ui/figures/en-us_image_0000001511900444.gif b/en/application-dev/ui/figures/en-us_image_0000001511900444.gif new file mode 100644 index 0000000000000000000000000000000000000000..315c82e417d240d0624a8206c9adf47c4c0a3ec3 Binary files /dev/null and b/en/application-dev/ui/figures/en-us_image_0000001511900444.gif differ diff --git a/en/application-dev/ui/figures/en-us_image_0000001511900456.png b/en/application-dev/ui/figures/en-us_image_0000001511900456.png new file mode 100644 index 0000000000000000000000000000000000000000..534c169420509639cf21b30b41d65ccb34758b66 Binary files /dev/null and b/en/application-dev/ui/figures/en-us_image_0000001511900456.png differ diff --git a/en/application-dev/ui/figures/en-us_image_0000001562700433.gif b/en/application-dev/ui/figures/en-us_image_0000001562700433.gif new file mode 100644 index 0000000000000000000000000000000000000000..b517e892ed6ff4ad337e57d044aa518ff78a8792 Binary files /dev/null and b/en/application-dev/ui/figures/en-us_image_0000001562700433.gif differ diff --git a/en/application-dev/ui/figures/en-us_image_0000001562940517.png b/en/application-dev/ui/figures/en-us_image_0000001562940517.png new file mode 100644 index 0000000000000000000000000000000000000000..e0a74253389934179d0cbcbaf4a43c01df18f7e5 Binary files /dev/null and b/en/application-dev/ui/figures/en-us_image_0000001562940517.png differ diff --git a/en/application-dev/ui/figures/en-us_image_0000001563060689.gif b/en/application-dev/ui/figures/en-us_image_0000001563060689.gif new file mode 100644 index 0000000000000000000000000000000000000000..e44df1b36066095ed6e8741e26d9f04a4c9a2b0b Binary files /dev/null and b/en/application-dev/ui/figures/en-us_image_0000001563060689.gif differ diff --git a/en/application-dev/ui/figures/en-us_image_0000001563060697.png b/en/application-dev/ui/figures/en-us_image_0000001563060697.png new file mode 100644 index 0000000000000000000000000000000000000000..b46c1ea016b3f018d9729499e3df2b98e10467f9 Binary files /dev/null and b/en/application-dev/ui/figures/en-us_image_0000001563060697.png differ diff --git a/en/application-dev/ui/figures/en-us_image_0000001563060705.png b/en/application-dev/ui/figures/en-us_image_0000001563060705.png new file mode 100644 index 0000000000000000000000000000000000000000..e760daef7809d60e1c7b9323bffc267f592c8fc5 Binary files /dev/null and b/en/application-dev/ui/figures/en-us_image_0000001563060705.png differ diff --git a/en/application-dev/ui/figures/en-us_image_0000001563060709.png b/en/application-dev/ui/figures/en-us_image_0000001563060709.png new file mode 100644 index 0000000000000000000000000000000000000000..f7e2c38a9b5f22ebf44eaae8eb9fea461d198018 Binary files /dev/null and b/en/application-dev/ui/figures/en-us_image_0000001563060709.png differ