@@ -71,7 +71,7 @@ As shown above, the **module.json5** file contains several tags.
| Name| Description| Data Type| Initial Value Allowed|
| -------- | -------- | -------- | -------- |
| name | Name of the module. The value is a string with a maximum of 31 bytes and must be unique in the entire application. Chinese characters are not allowed.| String| No|
| name | Name of the module. The value is a string with a maximum of 31 bytes and must be unique in the entire application. | String| No|
| type | Type of the module. The options are as follows:<br>- **entry**: main module of the application.<br>- **feature**: dynamic feature module of the application.<br>- **har**: static shared module.<br>- **shared**: dynamic shared module.| String| No|
| srcEntry | Code path corresponding to the module. The value is a string with a maximum of 127 bytes.| String| Yes (initial value: left empty)|
| description | Description of the module. The value is a string with a maximum of 255 bytes or a string resource index.| String| Yes (initial value: left empty)|
...
...
@@ -221,73 +221,6 @@ The **metadata** tag represents the custom metadata of the HAP file. The tag val
UIAbility configuration of the module, which is valid only for the current UIAbility component.
**By default, application icons cannot be hidden from the home screen in OpenHarmony.**
The OpenHarmony system imposes a strict rule on the presence of application icons. If no icon is configured in the HAP file of an application, the system uses the icon specified in the **app.json** file as the application icon and displays it on the home screen.
Touching this icon will direct the user to the application details screen in **Settings**, as shown in Figure 1.
To hide an application icon from the home screen, you must configure the **AllowAppDesktopIconHide** privilege. For details, see [Application Privilege Configuration Guide](../../device-dev/subsystems/subsys-app-privilege-config-guide.md).
**Objectives**:
This requirement on application icons is intended to prevent malicious applications from deliberately configuring no icon to block uninstallation attempts.
**Setting the application icon to be displayed on the home screen**:
Set **icon**, **label**, and **skills** under **abilities** in the **module.json5** file. In addition, make sure the **skills** configuration contains **ohos.want.action.home** and **entity.system.home**.
```
{
"module":{
...
"abilities": [{
"icon": "$media:icon",
"label": "Login",
"skills": [{
"actions": ["ohos.want.action.home"],
"entities": ["entity.system.home"],
"uris": []
}]
}],
...
}
}
```
**Display rules of application icons and labels on the home screen:**
* The HAP file contains UIAbility configuration.
* The application icon on the home screen is set under **abilities** in the **module.json5** file.
* The application does not have the privilege to hide its icon from the home screen.
* The application icon displayed on the home screen is the icon configured for the UIAbility.
* The application label displayed on the home screen is the label configured for the UIAbility. If no label is configured, the bundle name is returned.
* The name of the UIAbility is displayed.
* When the user touches the home screen icon, the home screen of the UIAbility is displayed.
* The application has the privilege to hide its icon from the home screen.
* The information about the application is not returned during home screen information query, and the icon of the application is not displayed on the home screen.
* The application icon on the home screen is not set under **abilities** in the **module.json5** file.
* The application does not have the privilege to hide its icon from the home screen.
* The application icon displayed on the home screen is the icon specified under **app**. (The **icon** field in the **app.json** file is mandatory.)
* The application label displayed on the home screen is the label specified under **app**. (The **label** field in the **app.json** file is mandatory.)
* Touching the application icon on the home screen will direct the user to the application details screen shown in Figure 1.
* The application has the privilege to hide its icon from the home screen.
* The information about the application is not returned during home screen information query, and the icon of the application is not displayed on the home screen.
* The HAP file does not contain UIAbility configuration.
* The application does not have the privilege to hide its icon from the home screen.
* The application icon displayed on the home screen is the icon specified under **app**. (The **icon** field in the **app.json** file is mandatory.)
* The application label displayed on the home screen is the label specified under **app**. (The **label** field in the **app.json** file is mandatory.)
* Touching the application icon on the home screen will direct the user to the application details screen shown in Figure 1.
* The application has the privilege to hide its icon from the home screen.
* The information about the application is not returned during home screen information query, and the icon of the application is not displayed on the home screen.<br><br>
| Name| Description| Data Type| Initial Value Allowed|
...
...
@@ -438,7 +371,7 @@ The **extensionAbilities** tag represents the configuration of extensionAbilitie
| uri | Data URI provided by the ExtensionAbility component. The value is a string with a maximum of 255 bytes, in the reverse domain name notation.<br>**NOTE**<br>This attribute is mandatory when the type of the ExtensionAbility component is set to **dataShare**.| String| Yes (initial value: left empty)|
|skills | Feature set of [wants](../application-models/want-overview.md) that can be received by the ExtensionAbility component.<br>Configuration rule: In an entry package, you can configure multiple **skills** attributes with the entry capability. (A **skills** attribute with the entry capability is the one that has **ohos.want.action.home** and **entity.system.home** configured.) The **label** and **icon** in the first ExtensionAbility that has **skills** configured are used as the **label** and **icon** of the entire OpenHarmony service/application.<br>**NOTE**<br>The **skills** attribute with the entry capability can be configured for the feature package of an OpenHarmony application, but not for an OpenHarmony service.| Array| Yes (initial value: left empty)|
| [metadata](#metadata)| Metadata of the ExtensionAbility component.| Object| Yes (initial value: left empty)|
| exported | Whether the ExtensionAbility component can be called by other applications. <br>- **true**: The ExtensionAbility component can be called by other applications.<br>- **false**: The UIAbility component cannot be called by other applications.| Boolean| Yes (initial value: **false**)|
| exported | Whether the ExtensionAbility component can be called by other applications. <br>- **true**: The ExtensionAbility component can be called by other applications.<br>- **false**: The ExtensionAbility component cannot be called by other applications.| Boolean| Yes (initial value: **false**)|
Example of the **extensionAbilities** structure:
...
...
@@ -591,7 +524,7 @@ The **shortcut** information is identified in **metadata**, where:
## distributionFilter
The **distributionFilter** tag defines the rules for distributing HAP files based on different device specifications, so that precise matching can be performed when the application market distributes applications. Distribution rules cover the following factors: screen shape, screen size, screen resolution, and country/region code. During distribution, a unique HAP is determined based on the mapping between **deviceType** and these five factors. This tag must be configured in the **/resource/profile resource** directory. Its sub-tags are optional.
The **distributionFilter** tag defines the rules for distributing HAP files based on different device specifications, so that precise matching can be performed when the application market distributes applications. Distribution rules cover the following factors: API version, screen shape, screen size, screen resolution, and country/region code. During distribution, a unique HAP is determined based on the mapping between **deviceType** and these five factors. This tag must be configured in the **/resource/profile resource** directory. Its sub-tags are optional.
### 2. API Change in the **pluginComponentManager** Module
Renamed the **want** parameter **target** to more clearly indicate the intended meaning.
You need to adapt your application.
**Change Impact**
The application developed based on earlier versions must be adapted to the change. Otherwise, alarms will arise. Though the build may be successful, the API will not work as intended.
**Key API/Component Changes**
- Involved APIs:
interface PushParameterForStage {
owner: Want;
target: Want;
name: string;
data: KVObject;
extraData: KVObject;
jsonPath?: string;
}
function push(param: PushParameterForStage, callback: AsyncCallback\<void>): void;
interface RequestParameterForStage {
owner: Want;
target: Want;
name: string;
data: KVObject;
jsonPath?: string;
}
function request(param: RequestParameterForStage, callback: AsyncCallback\<RequestCallbackParameters>): void;
## @ohos.InputMethodSubtype Change of name, label, and id
Changed the **name**, **label**, and **id** attributes since API version 9.
**Change Impact**
Applications must be adapted to the following changes.
| Name| Before Change| After Change|
| -------- | -------- | -------- |
| label | (1) Value: ID of the input method subtype.| (1) Value: Label of the input method subtype.|
| name | (1) Description: Name of the input method subtype. (2) Value: Label of the input method subtype.| (1) Description: Bundle name of the input method; (2) Value: Bundle name of the input method.|
| id | (1) Value: Bundle name of the input method.| (1) Value: ID of the input method subtype.|
**Adaptation Guide**
Update the code to adapt to the preceding changes.
console.error(`failed to setImage because: ${JSON.stringify(error)}`);
});
```
## cl.wallpaper.2 Deprecation of getIdSync, getFileSync, isChangeAllowed, isUserChangeAllowed, on, off, and RgbaColor
Deprecated the **getIdSync**, **getFileSync**, **isChangeAllowed**, **isUserChangeAllowed**, **on**, **off**, and **RgbaColor** APIs since API version 9.
You need to adapt your application based on the following information.
**Change Impact**
The APIs can no longer be used after being deleted.
Compared with earlier versions, OpenHarmony 3.2.10.7 has the following API changes in its web subsystem:
## cl.web.1 HitTestTypeV9 Name Change
Renamed the enum class **HitTestTypeV9****WebHitTestType** to meet the naming conventions.
**Change Impact**
The enum class **HitTestTypeV9** and APIs that use **HitTestTypeV9** as a parameter or return value cannot be used in OpenHarmony 3.2.10.7 and later versions.
**Key API/Component Changes**
- Involved APIs:
enum HitTestTypeV9
- Before change:
```ts
enumHitTestTypeV9
```
- After change:
```ts
enumWebHitTestType
```
**Adaptation Guide**
Replace **HitTestTypeV9** with **WebHitTestType**.
## cl.web.2 HeaderV9 Name Change
Renamed the struct **HeaderV9****WebHeader** to meet the naming conventions.
**Change Impact**
The struct **HeaderV9** and APIs that use **HeaderV9** as a parameter or return value cannot be used in OpenHarmony 3.2.10.7 and later versions.
**Key API/Component Changes**
- Involved APIs:
interface HeaderV9
- Before change:
```ts
interfaceHeaderV9
```
- After change:
```ts
interfaceWebHeader
```
**Adaptation Guide**
Replace **HeaderV9** with **WebHeader**.
## cl.web.3 Member Change of HitTestValue
Rename the member variable **HitTestTypeV9** in the **HitTestValue** struct **WebHitTestType** to meet the naming conventions.
**Change Impact**
The struct **HitTestValue** and APIs that use **HitTestValue** as a parameter or return value cannot be used in OpenHarmony 3.2.10.7 and later versions.
**Key API/Component Changes**
- Involved APIs:
interface HitTestValue
- Before change:
```ts
interfaceHitTestValue{
/**
* Get the hit test type.
*
* @since 9
*/
type:HitTestTypeV9;
/**
* Get the hit test extra data.
*
* @since 9
*/
extra:string;
}
```
- After change:
```ts
interfaceHitTestValue{
/**
* Get the hit test type.
*
* @since 9
*/
type:WebHitTestType;
/**
* Get the hit test extra data.
*
* @since 9
*/
extra:string;
}
```
**Adaptation Guide**
Replace **HitTestTypeV9** with **WebHitTestType**.
## cl.web.4 Parameter Type Change of loadUrl
Changed the type of the **headers** parameter in **loadUrl** to **WebHeader** to meet the naming conventions.
**Change Impact**
The **loadUrl** API that uses the **headers** parameter cannot be used in OpenHarmony 3.2.10.7 and later versions.
Change the type of the **headers** parameter in **loadUrl** from **HeaderV9** to **WebHeader**.
## cl.web.5 Return Value Type Change of getHitTest
Changed the return value type of the **getHitTest** API to **WebHitTest** to meet the naming conventions.
**Change Impact**
The **getHitTest** API cannot be used in OpenHarmony 3.2.10.7 and later versions.
**Key API/Component Changes**
- Involved APIs:
getHitTest(): HitTestTypeV9
- Before change:
```ts
getHitTest():HitTestTypeV9
```
- After change:
```ts
getHitTest():WebHitTestType
```
**Adaptation Guide**
Change the return value type of the **getHitTest** API from **HitTestTypeV9** to **WebHitTestType**.
## cl.web.6 Moving of the WebMessagePort Class
Moved the **WebMessagePort** class to **@ohos.web.webview.d.ts** and added error throwing.
**Change Impact**
If your application is developed based on earlier versions, note that the **d.ts** file storage location and the name of the module to be imported are changed. In addition, be mindful of the error codes now that the APIs in the class support error code processing.
Instead of importing APIs from the original **WebMessagePort** class, import APIs from **@ohos.web.webview** as follows:
```ts
importweb_webviewfrom'@ohos.web.webview';
```
## cl.web.7 Moving of the HitTestValue Class
Moved the **HitTestValue** class to **@ohos.web.webview.d.ts**; changed **HitTestValue** from a class to an API; changed the **getType** and **getExtra** from APIs to attributes.
**Change Impact**
If your application is developed based on earlier versions, note that the **d.ts** file storage location and the name of the module to be imported are changed.
**Key API/Component Changes**
- Involved APIs:
getType(): HitTestType;
getExtra(): string;
- Before change:
```ts
getType():HitTestType;
getExtra():string;
```
- After change:
```ts
type:WebHitTestType;
extra:string;
```
**Adaptation Guide**
Instead of importing APIs from the original **HitTestValue** class, import APIs from **@ohos.web.webview** as follows:
```ts
importweb_webviewfrom'@ohos.web.webview';
```
## cl.web.8 Moving of API Version 9 APIs Under WebCookie
Moved APIs of API version 9 in the **WebCookie** class to **web.webview.webview.WebCookieManager**
and added error throwing.
**Change Impact**
If your application is developed based on earlier versions, note that the **d.ts** file storage location and the name of the module to be imported are changed. In addition, be mindful of the error codes now that the APIs in the class support error code processing.
Instead of importing APIs from the original **WebCookie** class, import APIs from **@ohos.web.webview** as follows:
```ts
importweb_webviewfrom'@ohos.web.webview';
```
## cl.web.9 Moving of API Version 9 APIs Under WebController
Moved APIs of API version 9 in the **WebController** class to **web.webview.webview.WebviewController** and added error throwing.
**Change Impact**
If your application is developed based on earlier versions, note that the **d.ts** file storage location and the name of the module to be imported are changed. In addition, be mindful of the error codes now that the APIs in the class support error code processing.
The **getDefaultUserAgent** API is renamed **getUserAgent**.