提交 8e0ffb06 编写于 作者: E ester.zhou

Update docs (10485)

Signed-off-by: Nester.zhou <ester.zhou@huawei.com>
上级 eac38910
...@@ -8,14 +8,15 @@ ...@@ -8,14 +8,15 @@
- Quick Start - Quick Start
- Getting Started - Getting Started
- [Preparations](quick-start/start-overview.md) - [Preparations](quick-start/start-overview.md)
- [Getting Started with eTS in Stage Model](quick-start/start-with-ets-stage.md) - [Getting Started with ArkTS in Stage Model](quick-start/start-with-ets-stage.md)
- [Getting Started with eTS in FA Model](quick-start/start-with-ets-fa.md) - [Getting Started with ArkTS in FA Model](quick-start/start-with-ets-fa.md)
- [Getting Started with JavaScript in FA Model](quick-start/start-with-js-fa.md) - [Getting Started with JavaScript in FA Model](quick-start/start-with-js-fa.md)
- Development Fundamentals - Development Fundamentals
- [Application Package Structure Configuration File (FA Model)](quick-start/package-structure.md) - [Application Package Structure Configuration File (FA Model)](quick-start/package-structure.md)
- [Application Package Structure Configuration File (Stage Model)](quick-start/stage-structure.md) - [Application Package Structure Configuration File (Stage Model)](quick-start/stage-structure.md)
- [SysCap](quick-start/syscap.md) - [SysCap](quick-start/syscap.md)
- [HarmonyAppProvision Configuration File](quick-start/app-provision-structure.md) - [HarmonyAppProvision Configuration File](quick-start/app-provision-structure.md)
- [Resource Categories and Access](quick-start/resource-categories-and-access.md)
- Development - Development
- [Ability Development](ability/Readme-EN.md) - [Ability Development](ability/Readme-EN.md)
- [UI Development](ui/Readme-EN.md) - [UI Development](ui/Readme-EN.md)
......
...@@ -2,11 +2,13 @@ ...@@ -2,11 +2,13 @@
- Getting Started - Getting Started
- [Preparations](start-overview.md) - [Preparations](start-overview.md)
- [Getting Started with eTS in Stage Model](start-with-ets-stage.md) - [Getting Started with ArkTS in Stage Model](start-with-ets-stage.md)
- [Getting Started with eTS in FA Model](start-with-ets-fa.md) - [Getting Started with ArkTS in FA Model](start-with-ets-fa.md)
- [Getting Started with JavaScript in FA Model](start-with-js-fa.md) - [Getting Started with JavaScript in FA Model](start-with-js-fa.md)
- Development Fundamentals - Development Fundamentals
- [Application Package Structure Configuration File (FA Model)](package-structure.md) - [Application Package Structure Configuration File (FA Model)](package-structure.md)
- [Application Package Structure Configuration File (Stage Model)](stage-structure.md) - [Application Package Structure Configuration File (Stage Model)](stage-structure.md)
- [SysCap](syscap.md) - [SysCap](syscap.md)
- [HarmonyAppProvision Configuration File](app-provision-structure.md) - [HarmonyAppProvision Configuration File](app-provision-structure.md)
- [Resource Categories and Access](resource-categories-and-access.md)
# Resource Categories and Access
## Resource Categories
Resource files used during application development must be stored in specified directories for management.
### resources Directory
The **resources** directory consists of three types of sub-directories: the **base** sub-directory, qualifiers sub-directories, and the **rawfile** sub-directory. The common resource files used across projects in the stage model are stored in the **resources** directory under **AppScope**.
Example of the **resources** directory:
```
resources
|---base // Default directory
| |---element
| | |---string.json
| |---media
| | |---icon.png
|---en_GB-vertical-car-mdpi // Example of a qualifiers sub-directory, which needs to be created on your own
| |---element
| | |---string.json
| |---media
| | |---icon.png
|---rawfile
```
**Table 1** Classification of the resources directory
| Category | base Sub-directory | Qualifiers Sub-directory | rawfile Sub-directory |
| ---- | ---------------------------------------- | ---------------------------------------- | ---------------------------------------- |
| Structure| The **base** sub-directory is a default directory. If no qualifiers sub-directories in the **resources** directory of the application match the device status, the resource file in the **base** sub-directory will be automatically referenced.<br>Resource group sub-directories are located at the second level of sub-directories to store basic elements such as strings, colors, and boolean values, as well as resource files such as media, animations, and layouts. For details, see [Resource Group Sub-directories](#resource-group-sub-directories).| You need to create qualifiers sub-directories on your own. Each directory name consists of one or more qualifiers that represent the application scenarios or device characteristics. For details, see [Qualifiers Directory](#qualifiers-directory).<br>Resource group sub-directories are located at the second level of sub-directories to store basic elements such as strings, colors, and boolean values, as well as resource files such as media, animations, and layouts. For details, see [Resource Group Sub-directories](#resource-group-sub-directories).| You can create multiple levels of sub-directories with custom directory names. They can be used to store various resource files.<br>However, resource files in the **rawfile** sub-directory will not be matched based on the device status.|
| Compilation| Resource files in the sub-directory are compiled into binary files, and each resource file is assigned an ID. | Resource files in the sub-directory are compiled into binary files, and each resource file is assigned an ID. | Resource files in the sub-directory are directly packed into the application without being compiled, and no IDs will be assigned to the resource files. |
| Reference| Resource files in the sub-directory are referenced based on the resource type and resource name. | Resource files in the sub-directory are referenced based on the resource type and resource name. | Resource files in the sub-directory are referenced based on the file path and file name. |
### Qualifiers Sub-directories
The name of a qualifiers sub-directory consists of one or more qualifiers that represent the application scenarios or device characteristics, covering the mobile country code (MCC), mobile network code (MNC), language, script, country or region, screen orientation, device type, night mode, and screen density. The qualifiers are separated using underscores (\_) or hyphens (\-). Before creating a qualifiers sub-directory, familiarize yourself with the directory naming conventions and the rules for matching qualifiers sub-directories and the device status.
**Naming Conventions for Qualifiers Sub-directories**
- Qualifiers are ordered in the following sequence: **\_MCC_MNC-language_script_country/region-orientation-device-color mode-density**. You can select one or multiple qualifiers to name your sub-directory based on your application scenarios and device characteristics.
- Separation between qualifiers: The language, script, and country/region qualifiers are separated using underscores (\_); the MNC and MCC qualifiers are also separated using underscores (\_); other qualifiers are separated using hyphens (\-). For example, **zh_Hant_CN** and **zh_CN-car-ldpi**.
- Value range of qualifiers: The value of each qualifier must meet the requirements specified in the following table. Otherwise, the resource files in the resources directory cannot be matched.
**Table 2** Requirements for qualifier values
| Qualifier Type | Description and Value Range |
| ----------- | ---------------------------------------- |
| MCC&MNC| Indicates the MCC and MNC, which are obtained from the network where the device is registered. The MCC can be either followed by the MNC with an underscore (\_) in between or be used independently. For example, **mcc460** indicates China, and **mcc460\_mnc00** indicates China\_China Mobile.<br>For details about the value range, refer to **ITU-T E.212** (the international identification plan for public networks and subscriptions).|
| Language | Indicates the language used by the device. The value consists of two or three lowercase letters. For example, **zh** indicates Chinese, **en** indicates English, and **mai** indicates Maithili.<br>For details about the value range, refer to **ISO 639** (codes for the representation of names of languages).|
| Text | Indicates the script type used by the device. The value starts with one uppercase letter followed by three lowercase letters. For example, **Hans** indicates simplified Chinese, and **Hant** indicates traditional Chinese.<br>For details about the value range, refer to **ISO 15924** (codes for the representation of names of scripts).|
| Country/Region | Indicates the country or region where the user is located. The value consists of two or three uppercase letters or three digits. For example, **CN** indicates China, and **GB** indicates the United Kingdom.<br>For details about the value range, refer to **ISO 3166-1** (codes for the representation of names of countries and their subdivisions).|
| Screen orientation | Indicates the screen orientation of the device. The value can be:<br>- **vertical**: portrait orientation<br>- **horizontal**: landscape orientation|
| Device type | Indicates the device type. The value can be:<br>- **car**: head unit<br>- **tv**: smart TV<br>- **wearable**: smart wearable|
| Color mode | Indicates the color mode of the device. The value can be:<br>- **dark**: dark mode<br>- **light**: light mode|
| Screen density | Indicates the screen density of the device, in dpi. The value can be:<br>- **sdpi**: screen density with small-scale dots per inch (SDPI). This value is applicable for devices with a DPI range of (0, 120].<br>- **mdpi**: medium-scale screen density (Medium-scale Dots Per Inch), applicable to DPI whose value is (120, 160] device.<br>- **ldpi**: screen density with large-scale dots per inch (LDPI). This value is applicable for devices with a DPI range of (160, 240].<br>- **xldpi**: screen density with extra-large-scale dots per inch (XLDPI). This value is applicable for devices with a DPI range of (240, 320].<br>- **xxldpi**: screen density with extra-extra-large-scale dots per inch (XXLDPI). This value is applicable for devices with a DPI range of (320, 480].<br>- **xxxldpi**: screen density with extra-extra-extra-large-scale dots per inch (XXXLDPI). This value is applicable for devices with a DPI range of (480, 640].|
**Rules for Matching Qualifiers Sub-directories and Device Resources**
- Qualifiers are matched with the device resources in the following priorities: MCC&MNC > locale (options: language, language_script, language_country/region, and language_script_country/region) > screen orientation > device type > color mode > screen density.
- If the qualifiers sub-directories contain the **MCC, MNC, language, script, screen orientation, device type, and color mode** qualifiers, their values must be consistent with the current device status so that the sub-directories can be used for matching the device resources. For example, the qualifiers sub-directory **zh_CN-car-ldpi** cannot be used for matching the resource files labeled **en_US**.
### Resource Group Sub-directories
You can create resource group sub-directories (including element, media, and profile) in the **base** and qualifiers sub-directories to store resource files of specific types.
**Table 3** Resource group sub-directories
| Resource Group Sub-directory | Description | Resource File |
| ------- | ---------------------------------------- | ---------------------------------------- |
| element | Indicates element resources. Each type of data is represented by a JSON file. The options are as follows:<br>- **boolean**: boolean data<br>- **color**: color data<br>- **float**: floating-point data<br>- **intarray**: array of integers<br>- **integer**: integer data<br>- **pattern**: pattern data<br>- **plural**: plural form data<br>- **strarray**: array of strings<br>- **string**: string data| It is recommended that files in the **element** sub-directory be named the same as the following files, each of which can contain only data of the same type:<br>- boolean.json<br>- color.json<br>- float.json<br>- intarray.json<br>- integer.json<br>- pattern.json<br>- plural.json<br>- strarray.json<br>- string.json |
| media | Indicates media resources, including non-text files such as images, audios, and videos. | The file name can be customized, for example, **icon.png**. |
| rawfile | Indicates other types of files, which are stored in their raw formats after the application is built as an HAP file. They will not be integrated into the **resources.index** file.| The file name can be customized. |
**Media Resource Types**
**Table 4** Image resource types
| Format | File Name Extension|
| ---- | ----- |
| JPEG | .jpg |
| PNG | .png |
| GIF | .gif |
| SVG | .svg |
| WEBP | .webp |
| BMP | .bmp |
**Table 5** Audio and video resource types
| Format | File Name Extension |
| ------------------------------------ | --------------- |
| H.263 | .3gp <br>.mp4 |
| H.264 AVC <br> Baseline Profile (BP) | .3gp <br>.mp4 |
| MPEG-4 SP | .3gp |
| VP8 | .webm <br> .mkv |
**Resource File Examples**
The content of the **color.json** file is as follows:
```json
{
"color": [
{
"name": "color_hello",
"value": "#ffff0000"
},
{
"name": "color_world",
"value": "#ff0000ff"
}
]
}
```
The content of the **float.json** file is as follows:
```json
{
"float":[
{
"name":"font_hello",
"value":"28.0fp"
},
{
"name":"font_world",
"value":"20.0fp"
}
]
}
```
The content of the **string.json** file is as follows:
```json
{
"string":[
{
"name":"string_hello",
"value":"Hello"
},
{
"name":"string_world",
"value":"World"
},
{
"name":"message_arrive",
"value":"We will arrive at %s."
}
]
}
```
The content of the **plural.json** file is as follows:
```json
{
"plural":[
{
"name":"eat_apple",
"value":[
{
"quantity":"one",
"value":"%d apple"
},
{
"quantity":"other",
"value":"%d apples"
}
]
}
]
}
```
## Resource Access
### Application Resources
**Creating a Resource File**
You can create a sub-directory and its files under the **resources** directory based on the preceding descriptions of the qualifiers sub-directories and resource group sub-directories.
DevEco Studio provides a wizard for you to create resource directories and resource files.
- Creating a Resource Directory and Resource File
Right-click the **resources** directory and choose **New > Resource File**.
If no qualifier is selected, the file is created in a resource type sub-directory under **base**. If one or more qualifiers are selected, the system automatically generates a sub-directory and creates the file in this sub-directory.
The created sub-directory is automatically named in the format of **Qualifiers.Resource type**. For example, if you create a sub-directory by setting **Orientation** to **Vertical** and **Resource type** to **Graphic**, the system automatically generates a sub-directory named **vertical.graphic**.
![create-resource-file-1](figures/create-resource-file-1.png)
- Creating a Resource Directory
Right-click the **resources** directory and choose **New > Resource Directory**. This operation creates a sub-directory only.
Select a resource group type and set qualifiers. Then the system automatically generates the sub-directory name. The sub-directory is automatically named in the format of **Qualifiers.Resource group**. For example, if you create a sub-directory by setting **Orientation** to **Vertical** and **Resource type** to **Graphic**, the system automatically generates a sub-directory named **vertical.graphic**.
![create-resource-file-2](figures/create-resource-file-2.png)
- Creating a Resource File
Right-click a sub-directory under **resources** and choose **New > *XXX* Resource File**. This operation creates a resource file under this sub-directory.
For example, you can create an element resource file in the **element** sub-directory.
![create-resource-file-3](figures/create-resource-file-3.png)
**Accessing Application Resources**
To reference an application resource in a project, use the **"$r('app.type.name')"** format. **app** indicates the resource defined in the **resources** directory of the application. **type** indicates the resource type (or the location where the resource is stored). The value can be **color**, **float**, **string**, **plural**, or **media**. **name** indicates the resource name, which you set when defining the resource.
When referencing resources in the **rawfile** sub-directory, use the **"$rawfile('filename')"** format. Wherein, **filename** indicates the relative path of a file in the **rawfile** directory, which must contain the file name extension in the file name and cannot start with a slash (/).
> **NOTE**
>
> Resource descriptors accept only strings, such as **'app.type.name'**, and cannot be combined.
>
> The return value of **$r** is a **Resource** object. You can obtain the corresponding string by using the [getStringValue](../reference/apis/js-apis-resource-manager.md#getstringvalue9) API.
In the **.ets** file, you can use the resources defined in the **resources** directory.
```ts
Text($r('app.string.string_hello'))
.fontColor($r('app.color.color_hello'))
.fontSize($r('app.float.font_hello'))
}
Text($r('app.string.string_world'))
.fontColor($r('app.color.color_world'))
.fontSize($r('app.float.font_world'))
}
Text($r('app.string.message_arrive', "five of the clock")) // Reference string resources. The second parameter of $r is used to replace %s.
.fontColor($r('app.color.color_hello'))
.fontSize($r('app.float.font_hello'))
}
Text($r('app.plural.eat_apple', 5, 5)) // Reference plural resources. The first parameter indicates the plural resource, the second parameter indicates the number of plural resources, and the third parameter indicates the substitute of %d.
.fontColor($r('app.color.color_world'))
.fontSize($r('app.float.font_world'))
}
Image($r('app.media.my_background_image')) // Reference media resources.
Image($rawfile('test.png')) // Reference an image in the rawfile directory.
Image($rawfile('newDir/newTest.png')) // Reference an image in the rawfile directory.
```
### System Resources
System resources include colors, rounded corners, fonts, spacing, character strings, and images. By using system resources, you can develop different applications with the same visual style.
To reference a system resource, use the **"$r('sys.type.resource_id')"** format. Wherein: **sys** indicates a system resource; **type** indicates the resource type, which can be **color**, **float**, **string**, or **media**; **resource_id** indicates the resource ID.
```ts
Text('Hello')
.fontColor($r('sys.color.ohos_id_color_emphasize'))
.fontSize($r('sys.float.ohos_id_text_size_headline1'))
.fontFamily($r('sys.string.ohos_id_text_font_family_medium'))
.backgroundColor($r('sys.color.ohos_id_color_palette_aux1'))
Image($r('sys.media.ohos_app_icon'))
.border({color: $r('sys.color.ohos_id_color_palette_aux1'), radius: $r('sys.float.ohos_id_corner_radius_button'), width: 2})
.margin({top: $r('sys.float.ohos_id_elements_margin_horizontal_m'), bottom: $r('sys.float.ohos_id_elements_margin_horizontal_l')})
.height(200)
.width(300)
```
...@@ -16,11 +16,11 @@ Before you begin, there are two basic concepts that will help you better underst ...@@ -16,11 +16,11 @@ Before you begin, there are two basic concepts that will help you better underst
OpenHarmony provides a UI development framework, known as ArkUI. ArkUI provides a full range of capabilities you may need for application UI development, ranging from components to layout calculation, animation, UI interaction, and drawing capabilities. OpenHarmony provides a UI development framework, known as ArkUI. ArkUI provides a full range of capabilities you may need for application UI development, ranging from components to layout calculation, animation, UI interaction, and drawing capabilities.
ArkUI comes with two development paradigms: JavaScript-based web-like development paradigm (web-like development paradigm for short) and TypeScript-based declarative development paradigm (declarative development paradigm for short). You can choose whichever development paradigm that aligns with your practice. ArkUI comes with two development paradigms: ArkTS-based declarative development paradigm (declarative development paradigm for short) and JavaScript-compatible web-like development paradigm (web-like development paradigm for short). You can choose whichever development paradigm that aligns with your practice.
| **Development Paradigm**| **Programming Language**| **UI Update Mode**| **Applicable To**| **Intended Audience**| | **Development Paradigm**| **Programming Language**| **UI Update Mode**| **Applicable To**| **Intended Audience**|
| -------- | -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- | -------- |
| Declarative development paradigm| Extended TypeScript (eTS)| Data-driven| Applications involving technological sophistication and teamwork| Mobile application and system application developers| | Declarative development paradigm| ArkTS| Data-driven| Applications involving technological sophistication and teamwork| Mobile application and system application developers|
| Web-like development paradigm| JavaScript| Data-driven| Applications and service widgets with simple UIs| Frontend web developers| | Web-like development paradigm| JavaScript| Data-driven| Applications and service widgets with simple UIs| Frontend web developers|
For more details, see [UI Development](../ui/arkui-overview.md). For more details, see [UI Development](../ui/arkui-overview.md).
...@@ -36,7 +36,7 @@ The ability framework model has two forms: ...@@ -36,7 +36,7 @@ The ability framework model has two forms:
- **Stage model**: introduced since API version 9. For details, see [Stage Model Overview](../ability/stage-brief.md). - **Stage model**: introduced since API version 9. For details, see [Stage Model Overview](../ability/stage-brief.md).
The project directory structure of the FA model is different from that of the stage model. The stage model only works with the eTS programming language. The project directory structure of the FA model is different from that of the stage model. The stage model only works with the ArkTS programming language.
For details about the differences between the FA model and stage model, see [Ability Framework Overview](../ability/ability-brief.md). For details about the differences between the FA model and stage model, see [Ability Framework Overview](../ability/ability-brief.md).
...@@ -49,4 +49,4 @@ This document provides an ability with two pages. For more information about abi ...@@ -49,4 +49,4 @@ This document provides an ability with two pages. For more information about abi
2. Install DevEco Studio and configure the development environment. For details, see [Setting Up the Development Environment](https://developer.harmonyos.com/en/docs/documentation/doc-guides/ohos-setting-up-environment-0000001263160443). 2. Install DevEco Studio and configure the development environment. For details, see [Setting Up the Development Environment](https://developer.harmonyos.com/en/docs/documentation/doc-guides/ohos-setting-up-environment-0000001263160443).
When you are done, follow the instructions in [Getting Started with eTS in Stage Model](start-with-ets-stage.md), [Getting Started with eTS in FA Model](start-with-ets-fa.md), and [Getting Started with JavaScript in FA Model](start-with-js-fa.md). When you are done, follow the instructions in [Getting Started with ArkTS in Stage Model](start-with-ets-stage.md), [Getting Started with ArkTS in FA Model](start-with-ets-fa.md), and [Getting Started with JavaScript in FA Model](start-with-js-fa.md).
# Getting Started with eTS in FA Model # Getting Started with ArkTS in FA Model
> **NOTE** > **NOTE**
> >
> To use eTS, your DevEco Studio must be V3.0.0.601 Beta1 or later. > To use ArkTS, your DevEco Studio must be V3.0.0.601 Beta1 or later.
> >
> For best possible results, use [DevEco Studio V3.0.0.993](https://developer.harmonyos.com/cn/develop/deveco-studio#download) for your development. > For best possible results, use [DevEco Studio V3.0.0.993](https://developer.harmonyos.com/cn/develop/deveco-studio#download) for your development.
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
- **src > main > ets > MainAbility > pages**: pages contained in **MainAbility**. - **src > main > ets > MainAbility > pages**: pages contained in **MainAbility**.
- **src > main > ets > MainAbility > pages > index.ets**: the first page in the **pages** list, also referred to as the entry to the application. - **src > main > ets > MainAbility > pages > index.ets**: the first page in the **pages** list, also referred to as the entry to the application.
- **src > main > ets > MainAbility > app.ets**: ability lifecycle file. - **src > main > ets > MainAbility > app.ets**: ability lifecycle file.
- **src > main > resources**: a collection of resource files used by your application/service, such as graphics, multimedia, character strings, and layout files. For details about resource files, see [Resource File Categories](../ui/ui-ts-basic-resource-file-categories.md). - **src > main > resources**: a collection of resource files used by your application/service, such as graphics, multimedia, character strings, and layout files. For details about resource files, see [Resource Categories and Access](resource-categories-and-access.md#resource-categories).
- **src > main > config.json**: module configuration file. This file describes the global configuration information of the application/service, the device-specific configuration information, and the configuration information of the HAP file. For details about the configuration file, see [Application Package Structure Configuration File (FA Model)](package-structure.md). - **src > main > config.json**: module configuration file. This file describes the global configuration information of the application/service, the device-specific configuration information, and the configuration information of the HAP file. For details about the configuration file, see [Application Package Structure Configuration File (FA Model)](package-structure.md).
- **build-profile.json5**: current module information and build configuration options, including **buildOption** and **targets**. - **build-profile.json5**: current module information and build configuration options, including **buildOption** and **targets**.
- **hvigorfile.js**: module-level compilation and build task script. You can customize related tasks and code implementation. - **hvigorfile.js**: module-level compilation and build task script. You can customize related tasks and code implementation.
...@@ -53,7 +53,6 @@ ...@@ -53,7 +53,6 @@
After the project synchronization is complete, choose **entry** > **src** > **main** > **ets** > **MainAbility** > **pages** in the **Project** window and open the **index.ets** file. You can see that the file contains a **\<Text>** component. The sample code in the **index.ets** file is shown below: After the project synchronization is complete, choose **entry** > **src** > **main** > **ets** > **MainAbility** > **pages** in the **Project** window and open the **index.ets** file. You can see that the file contains a **\<Text>** component. The sample code in the **index.ets** file is shown below:
```ts ```ts
// index.ets // index.ets
@Entry @Entry
...@@ -79,7 +78,6 @@ ...@@ -79,7 +78,6 @@
On the default page, add a **\<Button>** component to respond to user clicks and implement redirection to another page. The sample code in the **index.ets** file is shown below: On the default page, add a **\<Button>** component to respond to user clicks and implement redirection to another page. The sample code in the **index.ets** file is shown below:
```ts ```ts
// index.ets // index.ets
@Entry @Entry
...@@ -150,7 +148,6 @@ ...@@ -150,7 +148,6 @@
Add **\<Text>** and **\<Button>** components and set their styles, as you do for the first page. The sample code in the **second.ets** file is shown below: Add **\<Text>** and **\<Button>** components and set their styles, as you do for the first page. The sample code in the **second.ets** file is shown below:
```ts ```ts
// second.ets // second.ets
@Entry @Entry
...@@ -193,7 +190,6 @@ You can implement page redirection through the [page router](../reference/apis/j ...@@ -193,7 +190,6 @@ You can implement page redirection through the [page router](../reference/apis/j
In the **index.ets** file of the first page, bind the **onClick** event to the **Next** button so that clicking the button redirects the user to the second page. The sample code in the **index.ets** file is shown below: In the **index.ets** file of the first page, bind the **onClick** event to the **Next** button so that clicking the button redirects the user to the second page. The sample code in the **index.ets** file is shown below:
```ts ```ts
// index.ets // index.ets
import router from '@ohos.router'; import router from '@ohos.router';
...@@ -238,7 +234,6 @@ You can implement page redirection through the [page router](../reference/apis/j ...@@ -238,7 +234,6 @@ You can implement page redirection through the [page router](../reference/apis/j
In the **second.ets** file of the second page, bind the **onClick** event to the **Back** button so that clicking the button redirects the user back to the first page. The sample code in the **second.ets** file is shown below: In the **second.ets** file of the second page, bind the **onClick** event to the **Back** button so that clicking the button redirects the user back to the first page. The sample code in the **second.ets** file is shown below:
```ts ```ts
// second.ets // second.ets
import router from '@ohos.router'; import router from '@ohos.router';
...@@ -295,4 +290,4 @@ You can implement page redirection through the [page router](../reference/apis/j ...@@ -295,4 +290,4 @@ You can implement page redirection through the [page router](../reference/apis/j
![en-us_image_0000001363934577](figures/en-us_image_0000001363934577.png) ![en-us_image_0000001363934577](figures/en-us_image_0000001363934577.png)
Congratulations! You have finished developing your OpenHarmony application in eTS in the FA model. To learn more about OpenHarmony application development, see [Application Development Overview](../application-dev-guide.md). Congratulations! You have finished developing your OpenHarmony application in ArkTS in the FA model. To learn more about OpenHarmony application development, see [Application Development Overview](../application-dev-guide.md).
# Getting Started with eTS in Stage Model # Getting Started with ArkTS in Stage Model
> **NOTE** > **NOTE**
> >
> To use eTS, your DevEco Studio must be V3.0.0.900 Beta3 or later. > To use ArkTS, your DevEco Studio must be V3.0.0.900 Beta3 or later.
> >
> For best possible results, use [DevEco Studio V3.0.0.993](https://developer.harmonyos.com/cn/develop/deveco-studio#download) for your development. > For best possible results, use [DevEco Studio V3.0.0.993](https://developer.harmonyos.com/cn/develop/deveco-studio#download) for your development.
...@@ -41,7 +41,7 @@ ...@@ -41,7 +41,7 @@
- **src > main > ets > MainAbility**: entry to your application/service. - **src > main > ets > MainAbility**: entry to your application/service.
- **src > main > ets > MainAbility > MainAbility.ets**: ability lifecycle file. - **src > main > ets > MainAbility > MainAbility.ets**: ability lifecycle file.
- **src > main > ets > pages**: pages contained in **MainAbility**. - **src > main > ets > pages**: pages contained in **MainAbility**.
- **src > main > resources**: a collection of resource files used by your application/service, such as graphics, multimedia, character strings, and layout files. For details about resource files, see [Resource File Categories](../ui/ui-ts-basic-resource-file-categories.md). - **src > main > resources**: a collection of resource files used by your application/service, such as graphics, multimedia, character strings, and layout files. For details about resource files, see [Resource Categories and Access](resource-categories-and-access.md#resource-categories).
- **src > main > module.json5**: module configuration file. This file describes the global configuration information of the application/service, the device-specific configuration information, and the configuration information of the HAP file. For details about the configuration file, see [Application Package Structure Configuration File (Stage Model)](stage-structure.md). - **src > main > module.json5**: module configuration file. This file describes the global configuration information of the application/service, the device-specific configuration information, and the configuration information of the HAP file. For details about the configuration file, see [Application Package Structure Configuration File (Stage Model)](stage-structure.md).
- **build-profile.json5**: current module information and build configuration options, including **buildOption** and **targets**. - **build-profile.json5**: current module information and build configuration options, including **buildOption** and **targets**.
- **hvigorfile.js**: module-level compilation and build task script. You can customize related tasks and code implementation. - **hvigorfile.js**: module-level compilation and build task script. You can customize related tasks and code implementation.
...@@ -55,8 +55,7 @@ ...@@ -55,8 +55,7 @@
1. Use the **\<Text>** component. 1. Use the **\<Text>** component.
After the project synchronization is complete, choose **entry** > **src** > **main** > **ets** > **MainAbility** > **pages** in the **Project** window and open the **index.ets** file. You can see that the file contains a **\<Text>** component. The sample code in the **index.ets** file is shown below: After the project synchronization is complete, choose **entry** > **src** > **main** > **ets** > **pages** in the **Project** window and open the **index.ets** file. You can see that the file contains a **\<Text>** component. The sample code in the **index.ets** file is shown below:
```ts ```ts
// index.ets // index.ets
...@@ -83,7 +82,6 @@ ...@@ -83,7 +82,6 @@
On the default page, add a **\<Button>** component to respond to user clicks and implement redirection to another page. The sample code in the **index.ets** file is shown below: On the default page, add a **\<Button>** component to respond to user clicks and implement redirection to another page. The sample code in the **index.ets** file is shown below:
```ts ```ts
// index.ets // index.ets
@Entry @Entry
...@@ -148,7 +146,6 @@ ...@@ -148,7 +146,6 @@
Add **\<Text>** and **\<Button>** components and set their styles, as you do for the first page. The sample code in the **second.ets** file is shown below: Add **\<Text>** and **\<Button>** components and set their styles, as you do for the first page. The sample code in the **second.ets** file is shown below:
```ts ```ts
// second.ets // second.ets
@Entry @Entry
...@@ -191,7 +188,6 @@ You can implement page redirection through the [page router](../reference/apis/j ...@@ -191,7 +188,6 @@ You can implement page redirection through the [page router](../reference/apis/j
In the **index.ets** file of the first page, bind the **onClick** event to the **Next** button so that clicking the button redirects the user to the second page. The sample code in the **index.ets** file is shown below: In the **index.ets** file of the first page, bind the **onClick** event to the **Next** button so that clicking the button redirects the user to the second page. The sample code in the **index.ets** file is shown below:
```ts ```ts
// index.ets // index.ets
import router from '@ohos.router'; import router from '@ohos.router';
...@@ -236,7 +232,6 @@ You can implement page redirection through the [page router](../reference/apis/j ...@@ -236,7 +232,6 @@ You can implement page redirection through the [page router](../reference/apis/j
In the **second.ets** file of the second page, bind the **onClick** event to the **Back** button so that clicking the button redirects the user back to the first page. The sample code in the **second.ets** file is shown below: In the **second.ets** file of the second page, bind the **onClick** event to the **Back** button so that clicking the button redirects the user back to the first page. The sample code in the **second.ets** file is shown below:
```ts ```ts
// second.ets // second.ets
import router from '@ohos.router'; import router from '@ohos.router';
...@@ -293,4 +288,4 @@ You can implement page redirection through the [page router](../reference/apis/j ...@@ -293,4 +288,4 @@ You can implement page redirection through the [page router](../reference/apis/j
![en-us_image_0000001311334972](figures/en-us_image_0000001311334972.png) ![en-us_image_0000001311334972](figures/en-us_image_0000001311334972.png)
Congratulations! You have finished developing your OpenHarmony application in eTS in the stage model. To learn more about OpenHarmony application development, see [Application Development Overview](../application-dev-guide.md). Congratulations! You have finished developing your OpenHarmony application in ArkTS in the stage model. To learn more about OpenHarmony application development, see [Application Development Overview](../application-dev-guide.md).
...@@ -52,7 +52,6 @@ ...@@ -52,7 +52,6 @@
After the project synchronization is complete, choose **entry** > **src** > **main** > **js** > **MainAbility** > **pages** > **index** in the **Project** window and open the **index.hml** file. You can see that the file contains a **<Text>** component. The sample code in the **index.hml** file is shown below: After the project synchronization is complete, choose **entry** > **src** > **main** > **js** > **MainAbility** > **pages** > **index** in the **Project** window and open the **index.hml** file. You can see that the file contains a **<Text>** component. The sample code in the **index.hml** file is shown below:
```html ```html
<!-- index.hml --> <!-- index.hml -->
<div class="container"> <div class="container">
...@@ -66,7 +65,6 @@ ...@@ -66,7 +65,6 @@
On the default page, add a **\<Button>** component to respond to user clicks and implement redirection to another page. The sample code in the **index.hml** file is shown below: On the default page, add a **\<Button>** component to respond to user clicks and implement redirection to another page. The sample code in the **index.hml** file is shown below:
```html ```html
<!-- index.hml --> <!-- index.hml -->
<div class="container"> <div class="container">
...@@ -83,7 +81,6 @@ ...@@ -83,7 +81,6 @@
From the **Project** window, choose **entry** > **src** > **main** > **js** > **MainAbility** > **pages** > **index**, open the **index.css** file, and set the page styles, such as the width, height, font size, and spacing. The sample code in the **index.css** file is shown below: From the **Project** window, choose **entry** > **src** > **main** > **js** > **MainAbility** > **pages** > **index**, open the **index.css** file, and set the page styles, such as the width, height, font size, and spacing. The sample code in the **index.css** file is shown below:
```css ```css
/* index.css */ /* index.css */
.container { .container {
...@@ -132,7 +129,6 @@ ...@@ -132,7 +129,6 @@
Add **\<Text>** and **\<Button>** components and set their styles, as you do for the first page. The sample code in the **second.hml** file is shown below: Add **\<Text>** and **\<Button>** components and set their styles, as you do for the first page. The sample code in the **second.hml** file is shown below:
```html ```html
<!-- second.hml --> <!-- second.hml -->
<div class="container"> <div class="container">
...@@ -187,7 +183,6 @@ You can implement page redirection through the [page router](../reference/apis/j ...@@ -187,7 +183,6 @@ You can implement page redirection through the [page router](../reference/apis/j
In the **index.js** file of the first page, bind the **onclick** method to the button so that clicking the button redirects the user to the second page. The sample code in the **index.js** file is shown below: In the **index.js** file of the first page, bind the **onclick** method to the button so that clicking the button redirects the user to the second page. The sample code in the **index.js** file is shown below:
```js ```js
// index.js // index.js
import router from '@ohos.router'; import router from '@ohos.router';
...@@ -205,7 +200,6 @@ You can implement page redirection through the [page router](../reference/apis/j ...@@ -205,7 +200,6 @@ You can implement page redirection through the [page router](../reference/apis/j
In the **second.ets** file of the second page, bind the **back** method to the **Back** button so that clicking the button redirects the user back to the first page. The sample code in the **second.js** file is shown below: In the **second.ets** file of the second page, bind the **back** method to the **Back** button so that clicking the button redirects the user back to the first page. The sample code in the **second.js** file is shown below:
```js ```js
// second.js // second.js
import router from '@ohos.router'; import router from '@ohos.router';
......
...@@ -8,6 +8,10 @@ SysCap is short for System Capability. It refers to a standalone feature in the ...@@ -8,6 +8,10 @@ SysCap is short for System Capability. It refers to a standalone feature in the
![image-20220326064841782](figures/image-20220326064841782.png) ![image-20220326064841782](figures/image-20220326064841782.png)
For details about the SysCap sets in OpenHarmony, see [SysCap List](../reference/syscap-list.md).
### Supported SysCap Set, Associated SysCap Set, and Required SysCap Set ### Supported SysCap Set, Associated SysCap Set, and Required SysCap Set
The supported SysCap set, associated SysCap set, and required SysCap set are collections of SysCaps. The supported SysCap set, associated SysCap set, and required SysCap set are collections of SysCaps.
...@@ -60,14 +64,14 @@ You can add APIs to the associated SysCap set in DevEco Studio by adding system ...@@ -60,14 +64,14 @@ You can add APIs to the associated SysCap set in DevEco Studio by adding system
Exercise caution when modifying the required SysCap set. Incorrect modifications may result in the application being unable to be distributed to the target device. Exercise caution when modifying the required SysCap set. Incorrect modifications may result in the application being unable to be distributed to the target device.
```json ```json
/* syscap.json */ // syscap.json
{ {
"devices": { "devices": {
"general": [ /* General devices. Each general device supports a SysCap set. Multiple general devices can be configured. */ "general": [ // General devices. Each general device supports a SysCap set. Multiple general devices can be configured.
"default", "default",
"car" "car"
], ],
"custom": [ /* Custom devices. */ "custom": [ // Custom devices.
{ {
"Custom device": [ "Custom device": [
"SystemCapability.Communication.SoftBus.Core" "SystemCapability.Communication.SoftBus.Core"
...@@ -75,12 +79,12 @@ Exercise caution when modifying the required SysCap set. Incorrect modifications ...@@ -75,12 +79,12 @@ Exercise caution when modifying the required SysCap set. Incorrect modifications
} }
] ]
}, },
"development": { /* The SysCap set in addedSysCaps and the SysCap set supported by each device configured in devices form the associated SysCap set. */ "development": { // The SysCap set in addedSysCaps and the SysCap set supported by each device configured in devices form the associated SysCap set.
"addedSysCaps": [ "addedSysCaps": [
"SystemCapability.Location.Location.Lite" "SystemCapability.Location.Location.Lite"
] ]
}, },
"production": { /* Used to generate the RPCID. Exercise caution when adding this parameter. Under incorrect settings, applications may fail to be distributed to target devices. */ "production": { // Used to generate the RPCID. Exercise caution when adding this parameter. Under incorrect settings, applications may fail to be distributed to target devices.
"addedSysCaps": [], // Intersection of SysCap sets supported by devices configured in devices. It is the required SysCap set with addedSysCaps set and removedSysCaps set. "addedSysCaps": [], // Intersection of SysCap sets supported by devices configured in devices. It is the required SysCap set with addedSysCaps set and removedSysCaps set.
"removedSysCaps": [] // When the required SysCap set is a capability subset of a device, the application can be distributed to the device. "removedSysCaps": [] // When the required SysCap set is a capability subset of a device, the application can be distributed to the device.
} }
......
...@@ -47,8 +47,9 @@ Starts an ability with the **want** parameter. This API uses an asynchronous cal ...@@ -47,8 +47,9 @@ Starts an ability with the **want** parameter. This API uses an asynchronous cal
```js ```js
let want = { let want = {
"bundleName": "com.example.myapp", 'bundleName': 'com.example.myapp',
"abilityName": "MyAbility"}; 'abilityName': 'MyAbility'
};
this.context.startAbility(want, (err) => { this.context.startAbility(want, (err) => {
console.log('startAbility result:' + JSON.stringify(err)); console.log('startAbility result:' + JSON.stringify(err));
}); });
...@@ -79,8 +80,8 @@ Starts an ability with the mandatory **want** and optional **options** parameter ...@@ -79,8 +80,8 @@ Starts an ability with the mandatory **want** and optional **options** parameter
```js ```js
let want = { let want = {
"bundleName": "com.example.myapp", 'bundleName': 'com.example.myapp',
"abilityName": "MyAbility" 'abilityName': 'MyAbility'
}; };
this.context.startAbility(want).then((data) => { this.context.startAbility(want).then((data) => {
console.log('success:' + JSON.stringify(data)); console.log('success:' + JSON.stringify(data));
...@@ -110,15 +111,15 @@ Starts an ability with the **want** and **options** parameters. This API uses an ...@@ -110,15 +111,15 @@ Starts an ability with the **want** and **options** parameters. This API uses an
```js ```js
var want = { var want = {
"deviceId": "", 'deviceId': '',
"bundleName": "com.extreme.test", 'bundleName': 'com.extreme.test',
"abilityName": "MainAbility" 'abilityName': 'MainAbility'
}; };
var options = { var options = {
windowMode: 0, windowMode: 0,
}; };
this.context.startAbility(want, options, (error) => { this.context.startAbility(want, options, (error) => {
console.log("error.code = " + error.code) console.log('error.code = ' + error.code)
}) })
``` ```
......
...@@ -47,7 +47,7 @@ Obtains an **[InputMethodController](#inputmethodcontroller)** instance. ...@@ -47,7 +47,7 @@ Obtains an **[InputMethodController](#inputmethodcontroller)** instance.
| Type | Description | | Type | Description |
| ----------------------------------------------- | ------------------------ | | ----------------------------------------------- | ------------------------ |
| [InputMethodController](#inputmethodcontroller) | Returns the current **InputMethodController** instance.| | [InputMethodController](#inputmethodcontroller) | Current **InputMethodController** instance.|
**Example** **Example**
...@@ -67,7 +67,7 @@ Obtains an **[InputMethodSetting](#inputmethodsetting8)** instance. ...@@ -67,7 +67,7 @@ Obtains an **[InputMethodSetting](#inputmethodsetting8)** instance.
| Type | Description | | Type | Description |
| ----------------------------------------- | ---------------------------- | | ----------------------------------------- | ---------------------------- |
| [InputMethodSetting](#inputmethodsetting8) | Returns the current **InputMethodSetting** instance.| | [InputMethodSetting](#inputmethodsetting8) | Current **InputMethodSetting** instance.|
**Example** **Example**
...@@ -94,15 +94,15 @@ Switches to another input method. This API can be used only in the stage model. ...@@ -94,15 +94,15 @@ Switches to another input method. This API can be used only in the stage model.
**Example** **Example**
```js ```js
inputMethod.switchInputMethod({packageName:"com.example.kikakeyboard", methodId:"com.example.kikakeyboard"} ,(err,result) => { inputMethod.switchInputMethod({packageName:'com.example.kikakeyboard', methodId:'com.example.kikakeyboard'} ,(err,result) => {
if (err) { if (err) {
console.error("switchInputMethod err: " + JSON.stringify(err)); console.error('switchInputMethod err: ' + JSON.stringify(err));
return; return;
} }
if (result) { if (result) {
console.info("Success to switchInputMethod.(callback)"); console.info('Success to switchInputMethod.(callback)');
} else { } else {
console.error("Failed to switchInputMethod.(callback)"); console.error('Failed to switchInputMethod.(callback)');
} }
}); });
``` ```
...@@ -129,14 +129,14 @@ Switches to another input method. This API can be used only in the stage model. ...@@ -129,14 +129,14 @@ Switches to another input method. This API can be used only in the stage model.
```js ```js
inputMethod.switchInputMethod({packageName:"com.example.kikakeyboard", methodId:"com.example.kikakeyboard"}).then((result) => { inputMethod.switchInputMethod({packageName:'com.example.kikakeyboard', methodId:'com.example.kikakeyboard'}).then((result) => {
if (result) { if (result) {
console.info("Success to switchInputMethod.(promise)"); console.info('Success to switchInputMethod.(promise)');
} else { } else {
console.error("Failed to switchInputMethod.(promise)"); console.error('Failed to switchInputMethod.(promise)');
} }
}).catch((err) => { }).catch((err) => {
console.error("switchInputMethod promise err: " + err); console.error('switchInputMethod promise err: ' + err);
}) })
``` ```
## inputMethod.getCurrentInputMethod<sup>9+</sup> ## inputMethod.getCurrentInputMethod<sup>9+</sup>
...@@ -151,7 +151,7 @@ Obtains the current input method. This API synchronously returns the **Inputmeth ...@@ -151,7 +151,7 @@ Obtains the current input method. This API synchronously returns the **Inputmeth
| Type | Description | | Type | Description |
| -------------------------------------------- | ------------------------ | | -------------------------------------------- | ------------------------ |
| [InputmethodProperty](#inputmethodproperty8) | **InputmethodProperty** instance of the current input method. | | [InputmethodProperty](#inputmethodproperty8) | **InputmethodProperty** instance of the current input method.|
**Example** **Example**
...@@ -183,13 +183,13 @@ Hides the keyboard. This API uses an asynchronous callback to return the result. ...@@ -183,13 +183,13 @@ Hides the keyboard. This API uses an asynchronous callback to return the result.
```js ```js
InputMethodController.stopInput((error, result) => { InputMethodController.stopInput((error, result) => {
if (error) { if (error) {
console.error("failed to stopInput because: " + JSON.stringify(error)); console.error('failed to stopInput because: ' + JSON.stringify(error));
return; return;
} }
if (result) { if (result) {
console.info("Success to stopInput.(callback)"); console.info('Success to stopInput.(callback)');
} else { } else {
console.error("Failed to stopInput.(callback)"); console.error('Failed to stopInput.(callback)');
} }
}); });
``` ```
...@@ -214,12 +214,12 @@ Hides the keyboard. This API uses a promise to return the result. If any paramet ...@@ -214,12 +214,12 @@ Hides the keyboard. This API uses a promise to return the result. If any paramet
```js ```js
InputMethodController.stopInput().then((result) => { InputMethodController.stopInput().then((result) => {
if (result) { if (result) {
console.info("Success to stopInput.(promise)"); console.info('Success to stopInput.(promise)');
} else { } else {
console.error("Failed to stopInput.(promise)"); console.error('Failed to stopInput.(promise)');
} }
}).catch((err) => { }).catch((err) => {
console.error("stopInput promise err: " + err); console.error('stopInput promise err: ' + err);
}) })
``` ```
...@@ -241,7 +241,7 @@ Shows this soft keyboard. This API uses an asynchronous callback to return the r ...@@ -241,7 +241,7 @@ Shows this soft keyboard. This API uses an asynchronous callback to return the r
```js ```js
InputMethodController.showSoftKeyboard((err) => { InputMethodController.showSoftKeyboard((err) => {
if (err == undefined) { if (err === undefined) {
console.info('showSoftKeyboard success'); console.info('showSoftKeyboard success');
} else { } else {
console.error('showSoftKeyboard failed because : ' + JSON.stringify(err)); console.error('showSoftKeyboard failed because : ' + JSON.stringify(err));
...@@ -292,7 +292,7 @@ Hides this soft keyboard. This API uses an asynchronous callback to return the r ...@@ -292,7 +292,7 @@ Hides this soft keyboard. This API uses an asynchronous callback to return the r
```js ```js
InputMethodController.hideSoftKeyboard((err) => { InputMethodController.hideSoftKeyboard((err) => {
if (err == undefined) { if (err === undefined) {
console.info('hideSoftKeyboard success'); console.info('hideSoftKeyboard success');
} else { } else {
console.error('hideSoftKeyboard failed because : ' + JSON.stringify(err)); console.error('hideSoftKeyboard failed because : ' + JSON.stringify(err));
...@@ -342,19 +342,17 @@ Obtains a list of activated or deactivated input methods. This API uses an async ...@@ -342,19 +342,17 @@ Obtains a list of activated or deactivated input methods. This API uses an async
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| -------- | --------------------------------------------------- | ---- | ----------------------------- | | -------- | --------------------------------------------------- | ---- | ----------------------------- |
| enable | boolean | Yes | Whether to return a list of activated input methods. The value **true** means to return a list of activated input methods, and **false** means to return a list of deactivated input methods. | | enable | boolean | Yes | Whether to return a list of activated input methods. The value **true** means to return a list of activated input methods, and **false** means to return a list of deactivated input methods. |
| callback | Array<[InputMethodProperty](#inputmethodproperty8)> | Yes | Callback used to return a list of activated or deactivated input methods. | | callback | Array<[InputMethodProperty](#inputmethodproperty8)> | Yes | Callback used to return a list of activated or deactivated input methods.|
**Example** **Example**
```js ```js
imeList: Array<inputMethod.InputMethodProperty> = null
InputMethodSetting.listInputMethod(true, (err,data) => { InputMethodSetting.listInputMethod(true, (err,data) => {
if (err) { if (err) {
console.error("listInputMethod failed because: " + JSON.stringify(err)); console.error('listInputMethod failed because: ' + JSON.stringify(err));
return; return;
} }
console.log("listInputMethod success"); console.log('listInputMethod success');
this.imeList = data;
}); });
``` ```
...@@ -376,17 +374,15 @@ Obtains a list of activated or deactivated input methods. This API uses a promis ...@@ -376,17 +374,15 @@ Obtains a list of activated or deactivated input methods. This API uses a promis
| Type | Description | | Type | Description |
| ------------------------------------------------------------ | ----------------------------- | | ------------------------------------------------------------ | ----------------------------- |
| Promise<Array<[InputMethodProperty](#inputmethodproperty8)>> | Promise used to return a list of activated or deactivated input methods. | | Promise<Array<[InputMethodProperty](#inputmethodproperty8)>> | Promise used to return a list of activated or deactivated input methods.|
**Example** **Example**
```js ```js
imeList: Array<inputMethod.InputMethodProperty> = null
InputMethodSetting.listInputMethod(true).then((data) => { InputMethodSetting.listInputMethod(true).then((data) => {
console.info("listInputMethod success"); console.info('listInputMethod success');
this.imeList = data;
}).catch((err) => { }).catch((err) => {
console.error("listInputMethod promise err: " + err); console.error('listInputMethod promise err: ' + err);
}) })
``` ```
...@@ -407,14 +403,12 @@ Obtains a list of installed input methods. This API uses an asynchronous callbac ...@@ -407,14 +403,12 @@ Obtains a list of installed input methods. This API uses an asynchronous callbac
**Example** **Example**
```js ```js
imeList: Array<inputMethod.InputMethodProperty> = null
InputMethodSetting.listInputMethod((err,data) => { InputMethodSetting.listInputMethod((err,data) => {
if (err) { if (err) {
console.error("listInputMethod failed because: " + JSON.stringify(err)); console.error('listInputMethod failed because: ' + JSON.stringify(err));
return; return;
} }
console.log("listInputMethod success"); console.log('listInputMethod success');
this.imeList = data;
}); });
``` ```
...@@ -435,12 +429,10 @@ Obtains a list of installed input methods. This API uses a promise to return the ...@@ -435,12 +429,10 @@ Obtains a list of installed input methods. This API uses a promise to return the
**Example** **Example**
```js ```js
imeList: Array<inputMethod.InputMethodProperty> = null
InputMethodSetting.listInputMethod().then((data) => { InputMethodSetting.listInputMethod().then((data) => {
console.info("listInputMethod success"); console.info('listInputMethod success');
this.imeList = data;
}).catch((err) => { }).catch((err) => {
console.error("listInputMethod promise err: " + err); console.error('listInputMethod promise err: ' + err);
}) })
``` ```
...@@ -463,20 +455,20 @@ Displays a dialog box for selecting an input method. This API uses an asynchrono ...@@ -463,20 +455,20 @@ Displays a dialog box for selecting an input method. This API uses an asynchrono
```js ```js
InputMethodSetting.displayOptionalInputMethod((err) => { InputMethodSetting.displayOptionalInputMethod((err) => {
if (err) { if (err) {
console.error("displayOptionalInputMethod failed because: " + JSON.stringify(err)); console.error('displayOptionalInputMethod failed because: ' + JSON.stringify(err));
return; return;
} }
console.info("displayOptionalInputMethod success"); console.info('displayOptionalInputMethod success');
}); });
``` ```
### displayOptionalInputMethod ### displayOptionalInputMethod
displayOptionalInputMethod(): Promise&lt;void&gt; displayOptionalInputMethod(): Promise&lt;void&gt;
Displays a dialog box for selecting an input method. This API uses a promise to return the result. If any parameter is passed in, an exception is thrown. Displays a dialog box for selecting an input method. This API uses a promise to return the result. If any parameter is passed in, an exception is thrown.
**System capability**: SystemCapability.MiscServices.InputMethodFramework **System capability**: SystemCapability.MiscServices.InputMethodFramework
**Return value** **Return value**
...@@ -488,8 +480,8 @@ Displays a dialog box for selecting an input method. This API uses a promise to ...@@ -488,8 +480,8 @@ Displays a dialog box for selecting an input method. This API uses a promise to
```js ```js
InputMethodSetting.displayOptionalInputMethod().then(() => { InputMethodSetting.displayOptionalInputMethod().then(() => {
console.info("displayOptionalInputMethod success.(promise)"); console.info('displayOptionalInputMethod success.(promise)');
}).catch((err) => { }).catch((err) => {
console.error("displayOptionalInputMethod promise err: " + err); console.error('displayOptionalInputMethod promise err: ' + err);
}) })
``` ```
...@@ -46,6 +46,11 @@ Provides the constants. ...@@ -46,6 +46,11 @@ Provides the constants.
| FLAG_SINGLE_LINE | number | Yes| No| The edit box allows only single-line input.| | FLAG_SINGLE_LINE | number | Yes| No| The edit box allows only single-line input.|
| DISPLAY_MODE_PART | number | Yes| No| The edit box is displayed in half-screen mode.| | DISPLAY_MODE_PART | number | Yes| No| The edit box is displayed in half-screen mode.|
| DISPLAY_MODE_FULL | number | Yes| No| The edit box is displayed in full screen.| | DISPLAY_MODE_FULL | number | Yes| No| The edit box is displayed in full screen.|
| CURSOR_UP<sup>9+</sup> | number | Yes| No| The caret moves upward.|
| CURSOR_DOWN<sup>9+</sup> | number | Yes| No| The caret moves downward.|
| CURSOR_LEFT<sup>9+</sup> | number | Yes| No| The caret moves leftward.|
| CURSOR_RIGHT<sup>9+</sup> | number | Yes| No| The caret moves rightward.|
| WINDOW_TYPE_INPUT_METHOD_FLOAT<sup>9+</sup> | number | Yes| No| The input method is displayed in a floating window.|
## inputMethodEngine.getInputMethodEngine<a name="getInputMethodEngine"></a> ## inputMethodEngine.getInputMethodEngine<a name="getInputMethodEngine"></a>
...@@ -95,7 +100,7 @@ In the following API examples, you must first use [getInputMethodEngine](#getInp ...@@ -95,7 +100,7 @@ In the following API examples, you must first use [getInputMethodEngine](#getInp
on(type: 'inputStart', callback: (kbController: KeyboardController, textInputClient: TextInputClient) => void): void on(type: 'inputStart', callback: (kbController: KeyboardController, textInputClient: TextInputClient) => void): void
Listens for the input method binding event. This API uses a callback to return the result. Listens for the input method binding event. This API uses a callback to return the result. This API requires two parameters, the first one being napi_string and the second one being napi_function. If either of these parameters is not passed in, an exception is thrown.
**System capability**: SystemCapability.MiscServices.InputMethodFramework **System capability**: SystemCapability.MiscServices.InputMethodFramework
...@@ -119,7 +124,7 @@ Listens for the input method binding event. This API uses a callback to return t ...@@ -119,7 +124,7 @@ Listens for the input method binding event. This API uses a callback to return t
off(type: 'inputStart', callback?: (kbController: KeyboardController, textInputClient: TextInputClient) => void): void off(type: 'inputStart', callback?: (kbController: KeyboardController, textInputClient: TextInputClient) => void): void
Cancels listening for the input method binding event. Cancels listening for the input method binding event. An exception is thrown in the following cases: (1) No parameter is passed; (2) Only one parameter is passed in, and it is not napi_string; (2) Two parameters are passed in, and the first parameter is not napi_string or the second parameter is not napi_function. If only one parameter is passed in, all listeners of the specified type will be canceled. If two parameters are passed in, the current listener of the specified type will be canceled.
**System capability**: SystemCapability.MiscServices.InputMethodFramework **System capability**: SystemCapability.MiscServices.InputMethodFramework
...@@ -135,14 +140,108 @@ Cancels listening for the input method binding event. ...@@ -135,14 +140,108 @@ Cancels listening for the input method binding event.
**Example** **Example**
```js ```js
InputMethodEngine.off('inputStart'); InputMethodEngine.off('inputStart', (kbController, textInputClient) => {
console.log('delete inputStart notification.');
});
```
### on('inputStop')<sup>9+</sup>
on(type: 'inputStop', callback: () => void): void
Listens for the input method stop event. This API uses a callback to return the result.
**System capability**: SystemCapability.MiscServices.InputMethodFramework
**Parameters**
| Name | Type | Mandatory| Description |
| -------- | ------ | ---- | ------------------------------------------------------------ |
| type | string | Yes | Listening type.<br>Set it to **'inputStop'**, which indicates listening for the input method stop event.|
| callback | void | Yes | Callback used to return the result. |
**Example**
```js
InputMethodEngine.getInputMethodEngine().on('inputStop', () => {
console.log('inputMethodEngine inputStop');
});
```
### off('inputStop')<sup>9+</sup>
off(type: 'inputStop', callback: () => void): void
Cancels listening for the input method stop event. This API uses a callback to return the result.
**System capability**: SystemCapability.MiscServices.InputMethodFramework
**Parameters**
| Name | Type | Mandatory| Description |
| -------- | ------ | ---- | ------------------------------------------------------------ |
| type | string | Yes | Listening type.<br>Set it to **'inputStop'**, which indicates listening for the input method stop event.|
| callback | void | Yes | Callback used to return the result. |
**Example**
```js
InputMethodEngine.getInputMethodEngine().off('inputStop', () => {
console.log('inputMethodEngine delete inputStop notification.');
});
```
### on('setCallingWindow')<sup>9+</sup>
on(type: 'setCallingWindow', callback: (wid:number) => void): void
Listens for the window invocation setting event. This API uses a callback to return the result.
**System capability**: SystemCapability.MiscServices.InputMethodFramework
**Parameters**
| Name | Type | Mandatory| Description |
| -------- | ------ | ---- | ------------------------------------------------------------ |
| type | string | Yes | Listening type.<br>Set it to **'setCallingWindow'**, which indicates listening for the window invocation setting event.|
| callback | number | Yes | Window ID of the caller. |
**Example**
```js
InputMethodEngine.getInputMethodEngine().on('setCallingWindow', (wid) => {
console.log('inputMethodEngine setCallingWindow');
});
```
### off('setCallingWindow')<sup>9+</sup>
off(type: 'setCallingWindow', callback: (wid:number) => void): void
Cancels listening for the window invocation setting event. This API uses a callback to return the result.
**System capability**: SystemCapability.MiscServices.InputMethodFramework
**Parameters**
| Name | Type | Mandatory| Description |
| -------- | ------ | ---- | ------------------------------------------------------------ |
| type | string | Yes | Listening type.<br>Set it to **'setCallingWindow'**, which indicates listening for the window invocation setting event.|
| callback | number | Yes | Window ID of the caller. |
**Example**
```js
InputMethodEngine.getInputMethodEngine().off('setCallingWindow', () => {
console.log('inputMethodEngine delete setCallingWindow notification.');
});
``` ```
### on('keyboardShow'|'keyboardHide') ### on('keyboardShow'|'keyboardHide')
on(type: 'keyboardShow'|'keyboardHide', callback: () => void): void on(type: 'keyboardShow'|'keyboardHide', callback: () => void): void
Listens for an input method event. Listens for an input method event. This API requires two parameters, the first one being napi_string and the second one being napi_function. If either of these parameters is not passed in, an exception is thrown.
**System capability**: SystemCapability.MiscServices.InputMethodFramework **System capability**: SystemCapability.MiscServices.InputMethodFramework
...@@ -150,14 +249,17 @@ Listens for an input method event. ...@@ -150,14 +249,17 @@ Listens for an input method event.
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| -------- | ------ | ---- | ------------------------------------------------------------ | | -------- | ------ | ---- | ------------------------------------------------------------ |
| type | string | Yes | Listening type.<br>-&nbsp;The value **'keyboardShow'** means to listen for displaying of the input method.<br>-&nbsp;The value **'keyboardHide'** means to listen for hiding of the input method.| | type | string | Yes | Listening type.<br>- The value **'keyboardShow'** means to listen for displaying of the keyboard.<br>- The value **'keyboardHide'** means to listen for hiding of the keyboard. |
| callback | void | No | Callback used to return the result. | | callback | void | No | Callback used to return the result. |
**Example** **Example**
```js ```js
InputMethodEngine.on('keyboardShow', (err) => { InputMethodEngine.on('keyboardShow', () => {
console.info('keyboardShow'); console.log('inputMethodEngine keyboardShow.');
});
InputMethodEngine.on('keyboardHide', () => {
console.log('inputMethodEngine keyboardHide.');
}); });
``` ```
...@@ -165,7 +267,7 @@ Listens for an input method event. ...@@ -165,7 +267,7 @@ Listens for an input method event.
off(type: 'keyboardShow'|'keyboardHide', callback?: () => void): void off(type: 'keyboardShow'|'keyboardHide', callback?: () => void): void
Cancels listening for an input method event. Cancels listening for an input method event. An exception is thrown in the following cases: (1) No parameter is passed; (2) Only one parameter is passed in, and it is not napi_string; (2) Two parameters are passed in, and the first parameter is not napi_string or the second parameter is not napi_function. If only one parameter is passed in, all listeners of the specified type will be canceled. If two parameters are passed in, the current listener of the specified type will be canceled.
**System capability**: SystemCapability.MiscServices.InputMethodFramework **System capability**: SystemCapability.MiscServices.InputMethodFramework
...@@ -173,13 +275,18 @@ Cancels listening for an input method event. ...@@ -173,13 +275,18 @@ Cancels listening for an input method event.
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| -------- | ------ | ---- | ------------------------------------------------------------ | | -------- | ------ | ---- | ------------------------------------------------------------ |
| type | string | Yes | Listening type.<br>-&nbsp;The value **'keyboardShow'** means to listen for displaying of the input method.<br>-&nbsp;The value **'keyboardHide'** means to listen for hiding of the input method.| | type | string | Yes | Listening type.<br>- The value **'keyboardShow'** means to listen for displaying of the keyboard.<br>- The value **'keyboardHide'** means to listen for hiding of the keyboard.|
| callback | void | No | Callback used to return the result. | | callback | void | No | Callback used to return the result. |
**Example** **Example**
```js ```js
InputMethodEngine.off('keyboardShow'); InputMethodEngine.off('keyboardShow', () => {
console.log('inputMethodEngine delete keyboardShow notification.');
});
InputMethodEngine.off('keyboardHide', () => {
console.log('inputMethodEngine delete keyboardHide notification.');
});
``` ```
...@@ -191,7 +298,7 @@ In the following API examples, you must first use [createKeyboardDelegate](#crea ...@@ -191,7 +298,7 @@ In the following API examples, you must first use [createKeyboardDelegate](#crea
on(type: 'keyDown'|'keyUp', callback: (event: KeyEvent) => boolean): void on(type: 'keyDown'|'keyUp', callback: (event: KeyEvent) => boolean): void
Listens for a hard keyboard even. This API uses a callback to return the key information. Listens for a hard keyboard even. This API uses a callback to return the key information. This API requires two parameters, the first one being napi_string and the second one being napi_function. If either of these parameters is not passed in, an exception is thrown.
**System capability**: SystemCapability.MiscServices.InputMethodFramework **System capability**: SystemCapability.MiscServices.InputMethodFramework
...@@ -199,7 +306,7 @@ Listens for a hard keyboard even. This API uses a callback to return the key inf ...@@ -199,7 +306,7 @@ Listens for a hard keyboard even. This API uses a callback to return the key inf
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| -------- | ------------------------------- | ---- | ------------------------------------------------------------ | | -------- | ------------------------------- | ---- | ------------------------------------------------------------ |
| type | string | Yes | Listening type.<br>-&nbsp;The value **'keyDown'** means to listen for pressing of a key.<br>-&nbsp;The value **'keyUp'** means to listen for releasing of a key.| | type | string | Yes | Listening type.<br>- The value **'keyDown'** means to listen for pressing of a key.<br>- The value **'keyUp'** means to listen for releasing of a key.|
| callback | [KeyEvent](#KeyEvent) | Yes| Callback used to return the key information.| | callback | [KeyEvent](#KeyEvent) | Yes| Callback used to return the key information.|
...@@ -207,8 +314,15 @@ Listens for a hard keyboard even. This API uses a callback to return the key inf ...@@ -207,8 +314,15 @@ Listens for a hard keyboard even. This API uses a callback to return the key inf
**Example** **Example**
```js ```js
KeyboardDelegate.on('keyDown', (event) => { KeyboardDelegate.on('keyUp', (keyEvent) => {
console.info('keyDown'); console.info('inputMethodEngine keyCode.(keyUp):' + JSON.stringify(keyEvent.keyCode));
console.info('inputMethodEngine keyAction.(keyUp):' + JSON.stringify(keyEvent.keyAction));
return true;
});
KeyboardDelegate.on('keyDown', (keyEvent) => {
console.info('inputMethodEngine keyCode.(keyDown):' + JSON.stringify(keyEvent.keyCode));
console.info('inputMethodEngine keyAction.(keyDown):' + JSON.stringify(keyEvent.keyAction));
return true;
}); });
``` ```
...@@ -216,7 +330,7 @@ Listens for a hard keyboard even. This API uses a callback to return the key inf ...@@ -216,7 +330,7 @@ Listens for a hard keyboard even. This API uses a callback to return the key inf
off(type: 'keyDown'|'keyUp', callback?: (event: KeyEvent) => boolean): void off(type: 'keyDown'|'keyUp', callback?: (event: KeyEvent) => boolean): void
Cancels listening for a hard keyboard even. Cancels listening for a hard keyboard even. An exception is thrown in the following cases: (1) No parameter is passed; (2) Only one parameter is passed in, and it is not napi_string; (2) Two parameters are passed in, and the first parameter is not napi_string or the second parameter is not napi_function. If only one parameter is passed in, all listeners of the specified type will be canceled. If two parameters are passed in, the current listener of the specified type will be canceled.
**System capability**: SystemCapability.MiscServices.InputMethodFramework **System capability**: SystemCapability.MiscServices.InputMethodFramework
...@@ -224,20 +338,27 @@ Cancels listening for a hard keyboard even. ...@@ -224,20 +338,27 @@ Cancels listening for a hard keyboard even.
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| -------- | --------------------- | ---- | ------------------------------------------------------------ | | -------- | --------------------- | ---- | ------------------------------------------------------------ |
| type | string | Yes | Listening type.<br>-&nbsp;The value **'keyDown'** means to listen for pressing of a key.<br>-&nbsp;The value **'keyUp'** means to listen for releasing of a key.| | type | string | Yes | Listening type.<br>- The value **'keyDown'** means to listen for pressing of a key.<br>- The value **'keyUp'** means to listen for releasing of a key.|
| callback | [KeyEvent](#KeyEvent) | No | Callback used to return the key information. | | callback | [KeyEvent](#KeyEvent) | No | Callback used to return the key information. |
**Example** **Example**
```js ```js
KeyboardDelegate.off('keyDown'); KeyboardDelegate.off('keyUp', (keyEvent) => {
console.log('delete keyUp notification.');
return true;
});
KeyboardDelegate.off('keyDown', (keyEvent) => {
console.log('delete keyDown notification.');
return true;
});
``` ```
### on('cursorContextChange') ### on('cursorContextChange')
on(type: 'cursorContextChange', callback: (x: number, y:number, height:number) => void): void on(type: 'cursorContextChange', callback: (x: number, y:number, height:number) => void): void
Listens for cursor context changes. This API uses a callback to return the cursor information. Listens for cursor context changes. This API uses a callback to return the cursor information. This API requires two parameters, the first one being napi_string and the second one being napi_function. If either of these parameters is not passed in, an exception is thrown.
**System capability**: SystemCapability.MiscServices.InputMethodFramework **System capability**: SystemCapability.MiscServices.InputMethodFramework
...@@ -253,18 +374,18 @@ Listens for cursor context changes. This API uses a callback to return the curso ...@@ -253,18 +374,18 @@ Listens for cursor context changes. This API uses a callback to return the curso
**Example** **Example**
```js ```js
KeyboardDelegate.on('cursorContextChange', (x, y, height) => { KeyboardDelegate.on('cursorContextChange', (x, y, height) => {
console.info('cursorContextChange'); console.log('inputMethodEngine cursorContextChange x:' + x);
console.log('inputMethodEngine cursorContextChange y:' + y);
console.log('inputMethodEngine cursorContextChange height:' + height);
}); });
``` ```
### off('cursorContextChange') ### off('cursorContextChange')
off(type: 'cursorContextChange', callback?: (x: number, y:number, height:number) => void): void off(type: 'cursorContextChange', callback?: (x: number, y:number, height:number) => void): void
Cancels listening for cursor context changes. Cancels listening for cursor context changes. An exception is thrown in the following cases: (1) No parameter is passed; (2) Only one parameter is passed in, and it is not napi_string; (2) Two parameters are passed in, and the first parameter is not napi_string or the second parameter is not napi_function. If only one parameter is passed in, all listeners of the specified type will be canceled. If two parameters are passed in, the current listener of the specified type will be canceled.
**System capability**: SystemCapability.MiscServices.InputMethodFramework **System capability**: SystemCapability.MiscServices.InputMethodFramework
...@@ -279,15 +400,15 @@ Cancels listening for cursor context changes. ...@@ -279,15 +400,15 @@ Cancels listening for cursor context changes.
**Example** **Example**
```js ```js
KeyboardDelegate.off('cursorContextChange', (x, y, height) => {
KeyboardDelegate.off('cursorContextChange'); console.log('delete cursorContextChange notification.');
});
``` ```
### on('selectionChange') ### on('selectionChange')
on(type: 'selectionChange', callback: (oldBegin: number, oldEnd: number, newBegin: number, newEnd: number) => void): void on(type: 'selectionChange', callback: (oldBegin: number, oldEnd: number, newBegin: number, newEnd: number) => void): void
Listens for text selection changes. This API uses a callback to return the text selection information. Listens for text selection changes. This API uses a callback to return the text selection information. This API requires two parameters, the first one being napi_string and the second one being napi_function. If either of these parameters is not passed in, an exception is thrown.
**System capability**: SystemCapability.MiscServices.InputMethodFramework **System capability**: SystemCapability.MiscServices.InputMethodFramework
...@@ -301,18 +422,19 @@ Listens for text selection changes. This API uses a callback to return the text ...@@ -301,18 +422,19 @@ Listens for text selection changes. This API uses a callback to return the text
**Example** **Example**
```js ```js
KeyboardDelegate.on('selectionChange', (oldBegin, oldEnd, newBegin, newEnd) => { KeyboardDelegate.on('selectionChange', (oldBegin, oldEnd, newBegin, newEnd) => {
console.info('selectionChange'); console.log('inputMethodEngine beforeEach selectionChange oldBegin:' + oldBegin);
console.log('inputMethodEngine beforeEach selectionChange oldEnd:' + oldEnd);
console.log('inputMethodEngine beforeEach selectionChange newBegin:' + newBegin);
console.log('inputMethodEngine beforeEach selectionChange newEnd:' + newEnd);
}); });
``` ```
### off('selectionChange') ### off('selectionChange')
off(type: 'selectionChange', callback?: (oldBegin: number, oldEnd: number, newBegin: number, newEnd: number) => void): void off(type: 'selectionChange', callback?: (oldBegin: number, oldEnd: number, newBegin: number, newEnd: number) => void): void
Cancels listening for text selection changes. Cancels listening for text selection changes. An exception is thrown in the following cases: (1) No parameter is passed; (2) Only one parameter is passed in, and it is not napi_string; (2) Two parameters are passed in, and the first parameter is not napi_string or the second parameter is not napi_function. If only one parameter is passed in, all listeners of the specified type will be canceled. If two parameters are passed in, the current listener of the specified type will be canceled.
**System capability**: SystemCapability.MiscServices.InputMethodFramework **System capability**: SystemCapability.MiscServices.InputMethodFramework
...@@ -326,9 +448,9 @@ Cancels listening for text selection changes. ...@@ -326,9 +448,9 @@ Cancels listening for text selection changes.
**Example** **Example**
```js ```js
KeyboardDelegate.off('selectionChange', (oldBegin, oldEnd, newBegin, newEnd) => {
KeyboardDelegate.off('selectionChange'); console.log('delete selectionChange notification.');
});
``` ```
...@@ -336,7 +458,7 @@ KeyboardDelegate.off('selectionChange'); ...@@ -336,7 +458,7 @@ KeyboardDelegate.off('selectionChange');
on(type: 'textChange', callback: (text: string) => void): void on(type: 'textChange', callback: (text: string) => void): void
Listens for text changes. This API uses a callback to return the current text content. Listens for text changes. This API uses a callback to return the current text content. This API requires two parameters, the first one being napi_string and the second one being napi_function. If either of these parameters is not passed in, an exception is thrown.
**System capability**: SystemCapability.MiscServices.InputMethodFramework **System capability**: SystemCapability.MiscServices.InputMethodFramework
...@@ -350,18 +472,16 @@ Listens for text changes. This API uses a callback to return the current text co ...@@ -350,18 +472,16 @@ Listens for text changes. This API uses a callback to return the current text co
**Example** **Example**
```js ```js
KeyboardDelegate.on('textChange', (text) => { KeyboardDelegate.on('textChange', (text) => {
console.info('textChange'); console.log('inputMethodEngine textChange. text:' + text);
}); });
``` ```
### off('textChange') ### off('textChange')
off(type: 'textChange', callback?: (text: string) => void): void off(type: 'textChange', callback?: (text: string) => void): void
Cancels listening for text changes. Cancels listening for text changes. An exception is thrown in the following cases: (1) No parameter is passed; (2) Only one parameter is passed in, and it is not napi_string; (2) Two parameters are passed in, and the first parameter is not napi_string or the second parameter is not napi_function. If only one parameter is passed in, all listeners of the specified type will be canceled. If two parameters are passed in, the current listener of the specified type will be canceled.
**System capability**: SystemCapability.MiscServices.InputMethodFramework **System capability**: SystemCapability.MiscServices.InputMethodFramework
...@@ -375,7 +495,9 @@ Cancels listening for text changes. ...@@ -375,7 +495,9 @@ Cancels listening for text changes.
**Example** **Example**
```js ```js
KeyboardDelegate.off('textChange'); keyboardDelegate.off('textChange', (text) => {
console.log('delete textChange notification. text:' + text);
});
``` ```
## KeyboardController<a name="KeyboardController"></a> ## KeyboardController<a name="KeyboardController"></a>
...@@ -386,7 +508,7 @@ In the following API examples, you must first use [inputStart](#inputStart) to o ...@@ -386,7 +508,7 @@ In the following API examples, you must first use [inputStart](#inputStart) to o
hideKeyboard(callback: AsyncCallback&lt;void&gt;): void hideKeyboard(callback: AsyncCallback&lt;void&gt;): void
Hides the keyboard. This API uses an asynchronous callback to return the result. Hides the keyboard. This API uses an asynchronous callback to return the result. If the required parameter is not passed in, an exception is thrown.
**System capability**: SystemCapability.MiscServices.InputMethodFramework **System capability**: SystemCapability.MiscServices.InputMethodFramework
...@@ -400,28 +522,39 @@ Hides the keyboard. This API uses an asynchronous callback to return the result. ...@@ -400,28 +522,39 @@ Hides the keyboard. This API uses an asynchronous callback to return the result.
```js ```js
KeyboardController.hideKeyboard(()=>{ KeyboardController.hideKeyboard((err) => {
}); if (err === undefined) {
console.error('hideKeyboard callback result---err: ' + err.msg);
return;
}
console.log('hideKeyboard callback.');
});
``` ```
### hideKeyboard ### hideKeyboard
hideKeyboard(): Promise&lt;void&gt; hideKeyboard(): Promise&lt;void&gt;
Hides the keyboard. This API uses an asynchronous callback to return the result. Hides the keyboard. This API uses a promise to return the result. If any parameter is passed in, an exception is thrown.
**System capability**: SystemCapability.MiscServices.InputMethodFramework **System capability**: SystemCapability.MiscServices.InputMethodFramework
**Return value** **Return value**
| Type | Description | | Type | Description |
| ---------------- | -------- | | ---------------- | ------------------------- |
| Promise&lt;void> | Promise used to return the result.| | Promise&lt;void> | Promise that returns no value.|
**Example** **Example**
```js ```js
KeyboardController.hideKeyboard(); async function InputMethodEngine() {
await KeyboardController.hideKeyboard().then(() => {
console.info('hideKeyboard promise.');
}).catch((err) => {
console.info('hideKeyboard promise err: ' + err.msg);
});
}
``` ```
## TextInputClient<a name="TextInputClient"></a> ## TextInputClient<a name="TextInputClient"></a>
...@@ -432,7 +565,7 @@ In the following API examples, you must first use [inputStart](#inputStart) to o ...@@ -432,7 +565,7 @@ In the following API examples, you must first use [inputStart](#inputStart) to o
getForward(length:number, callback: AsyncCallback&lt;string&gt;): void getForward(length:number, callback: AsyncCallback&lt;string&gt;): void
Obtains the specific-length text before the cursor. This API uses an asynchronous callback to return the result. Obtains the specific-length text before the cursor. This API uses an asynchronous callback to return the result. If the required two parameters are not passed in, an exception is thrown.
**System capability**: SystemCapability.MiscServices.InputMethodFramework **System capability**: SystemCapability.MiscServices.InputMethodFramework
...@@ -446,8 +579,13 @@ Obtains the specific-length text before the cursor. This API uses an asynchronou ...@@ -446,8 +579,13 @@ Obtains the specific-length text before the cursor. This API uses an asynchronou
**Example** **Example**
```js ```js
TextInputClient.getForward(5,(text) =>{ var length = 1;
console.info("text = " + text); TextInputClient.getForward(length, (err, text) => {
if (err === undefined) {
console.error('getForward callback result---err: ' + err.msg);
return;
}
console.log('getForward callback result---text: ' + text);
}); });
``` ```
...@@ -455,7 +593,7 @@ Obtains the specific-length text before the cursor. This API uses an asynchronou ...@@ -455,7 +593,7 @@ Obtains the specific-length text before the cursor. This API uses an asynchronou
getForward(length:number): Promise&lt;string&gt; getForward(length:number): Promise&lt;string&gt;
Obtains the specific-length text before the cursor. This API uses an asynchronous callback to return the result. Obtains the specific-length text before the cursor. This API uses a promise to return the result. If the required parameter is not passed in, an exception is thrown.
**System capability**: SystemCapability.MiscServices.InputMethodFramework **System capability**: SystemCapability.MiscServices.InputMethodFramework
...@@ -474,15 +612,21 @@ Obtains the specific-length text before the cursor. This API uses an asynchronou ...@@ -474,15 +612,21 @@ Obtains the specific-length text before the cursor. This API uses an asynchronou
**Example** **Example**
```js ```js
var text = TextInputClient.getForward(5); async function InputMethodEngine() {
console.info("text = " + text); var length = 1;
await TextInputClient.getForward(length).then((text) => {
console.info('getForward promise result---res: ' + text);
}).catch((err) => {
console.error('getForward promise err: ' + err.msg);
});
}
``` ```
### getBackward ### getBackward
getBackward(length:number, callback: AsyncCallback&lt;string&gt;): void getBackward(length:number, callback: AsyncCallback&lt;string&gt;): void
Obtains the specific-length text after the cursor. This API uses an asynchronous callback to return the result. Obtains the specific-length text after the cursor. This API uses an asynchronous callback to return the result. If the required two parameters are not passed in, an exception is thrown.
**System capability**: SystemCapability.MiscServices.InputMethodFramework **System capability**: SystemCapability.MiscServices.InputMethodFramework
...@@ -496,8 +640,13 @@ Obtains the specific-length text after the cursor. This API uses an asynchronous ...@@ -496,8 +640,13 @@ Obtains the specific-length text after the cursor. This API uses an asynchronous
**Example** **Example**
```js ```js
TextInputClient.getBackward(5,(text)=>{ var length = 1;
console.info("text = " + text); TextInputClient.getBackward(length, (err, text) => {
if (err === undefined) {
console.error('getBackward callback result---err: ' + err.msg);
return;
}
console.log('getBackward callback result---text: ' + text);
}); });
``` ```
...@@ -505,7 +654,7 @@ Obtains the specific-length text after the cursor. This API uses an asynchronous ...@@ -505,7 +654,7 @@ Obtains the specific-length text after the cursor. This API uses an asynchronous
getBackward(length:number): Promise&lt;string&gt; getBackward(length:number): Promise&lt;string&gt;
Obtains the specific-length text after the cursor. This API uses an asynchronous callback to return the result. Obtains the specific-length text after the cursor. This API uses a promise to return the result. If the required parameter is not passed in, an exception is thrown.
**System capability**: SystemCapability.MiscServices.InputMethodFramework **System capability**: SystemCapability.MiscServices.InputMethodFramework
...@@ -524,15 +673,21 @@ Obtains the specific-length text after the cursor. This API uses an asynchronous ...@@ -524,15 +673,21 @@ Obtains the specific-length text after the cursor. This API uses an asynchronous
**Example** **Example**
```js ```js
var text = TextInputClient.getBackward(5); async function InputMethodEngine() {
console.info("text = " + text); var length = 1;
await TextInputClient.getBackward(length).then((text) => {
console.info('getBackward promise result---res: ' + text);
}).catch((err) => {
console.error('getBackward promise err: ' + err.msg);
});
}
``` ```
### deleteForward ### deleteForward
deleteForward(length:number, callback: AsyncCallback&lt;boolean&gt;): void deleteForward(length:number, callback: AsyncCallback&lt;boolean&gt;): void
Deletes the fixed-length text before the cursor. This API uses an asynchronous callback to return the result. Deletes the fixed-length text before the cursor. This API uses an asynchronous callback to return the result. If the required two parameters are not passed in, an exception is thrown.
**System capability**: SystemCapability.MiscServices.InputMethodFramework **System capability**: SystemCapability.MiscServices.InputMethodFramework
...@@ -546,15 +701,24 @@ Deletes the fixed-length text before the cursor. This API uses an asynchronous c ...@@ -546,15 +701,24 @@ Deletes the fixed-length text before the cursor. This API uses an asynchronous c
**Example** **Example**
```js ```js
TextInputClient.deleteForward(5,(isSuccess)=>{ var length = 1;
console.info("isSuccess = " + isSuccess); TextInputClient.deleteForward(length, (err, result) => {
if (err === undefined) {
console.error('deleteForward callback result---err: ' + err.msg);
return;
}
if (result) {
console.info('Success to deleteForward.(callback) ');
} else {
console.error('Failed to deleteForward.(callback) ');
}
}); });
``` ```
### deleteForward ### deleteForward
deleteForward(length:number): Promise&lt;boolean&gt; deleteForward(length:number): Promise&lt;boolean&gt;
Deletes the fixed-length text before the cursor. This API uses an asynchronous callback to return the result. Deletes the fixed-length text before the cursor. This API uses a promise to return the result. If the required parameter is not passed in, an exception is thrown.
**System capability**: SystemCapability.MiscServices.InputMethodFramework **System capability**: SystemCapability.MiscServices.InputMethodFramework
...@@ -573,15 +737,25 @@ Deletes the fixed-length text before the cursor. This API uses an asynchronous c ...@@ -573,15 +737,25 @@ Deletes the fixed-length text before the cursor. This API uses an asynchronous c
**Example** **Example**
```js ```js
var isSuccess = TextInputClient.deleteForward(5); async function InputMethodEngine() {
console.info("isSuccess = " + isSuccess); var length = 1;
await TextInputClient.deleteForward(length).then((result) => {
if (result) {
console.info('Success to deleteForward.(promise) ');
} else {
console.error('Failed to deleteForward.(promise) ');
}
}).catch((err) => {
console.error('deleteForward promise err: ' + err.msg);
});
}
``` ```
### deleteBackward ### deleteBackward
deleteBackward(length:number, callback: AsyncCallback&lt;boolean&gt;): void deleteBackward(length:number, callback: AsyncCallback&lt;boolean&gt;): void
Deletes the fixed-length text after the cursor. This API uses an asynchronous callback to return the result. Deletes the fixed-length text after the cursor. This API uses an asynchronous callback to return the result. If the required two parameters are not passed in, an exception is thrown.
**System capability**: SystemCapability.MiscServices.InputMethodFramework **System capability**: SystemCapability.MiscServices.InputMethodFramework
...@@ -595,22 +769,30 @@ Deletes the fixed-length text after the cursor. This API uses an asynchronous ca ...@@ -595,22 +769,30 @@ Deletes the fixed-length text after the cursor. This API uses an asynchronous ca
**Example** **Example**
```js ```js
var length = 1;
TextInputClient.deleteBackward(5, (isSuccess)=>{ TextInputClient.deleteBackward(length, (err, result) => {
console.info("isSuccess = " + isSuccess); if (err === undefined) {
console.error('deleteBackward callback result---err: ' + err.msg);
return;
}
if (result) {
console.info('Success to deleteBackward.(callback) ');
} else {
console.error('Failed to deleteBackward.(callback) ');
}
}); });
``` ```
### deleteBackward ### deleteBackward
deleteBackward(length:number): Promise&lt;boolean&gt; deleteBackward(length:number): Promise&lt;boolean&gt;
Deletes the fixed-length text after the cursor. This API uses an asynchronous callback to return the result. Deletes the fixed-length text after the cursor. This API uses an asynchronous callback to return the result. If the required two parameters are not passed in, an exception is thrown.
**System capability**: SystemCapability.MiscServices.InputMethodFramework **System capability**: SystemCapability.MiscServices.InputMethodFramework
**Parameters** **Parameters**
| Name| Type| Mandatory| Description| | Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
| length | number | Yes| Text length.| | length | number | Yes| Text length.|
...@@ -624,16 +806,24 @@ Deletes the fixed-length text after the cursor. This API uses an asynchronous ca ...@@ -624,16 +806,24 @@ Deletes the fixed-length text after the cursor. This API uses an asynchronous ca
**Example** **Example**
```js ```js
async function InputMethodEngine() {
var isSuccess = TextInputClient.deleteBackward(5); var length = 1;
console.info("isSuccess = " + isSuccess); await TextInputClient.deleteBackward(length).then((result) => {
if (result) {
console.info('Success to deleteBackward.(promise) ');
} else {
console.error('Failed to deleteBackward.(promise) ');
}
}).catch((err) => {
console.error('deleteBackward promise err: ' + err.msg);
});
}
``` ```
### sendKeyFunction ### sendKeyFunction
sendKeyFunction(action:number, callback: AsyncCallback&lt;boolean&gt;): void sendKeyFunction(action:number, callback: AsyncCallback&lt;boolean&gt;): void
Sets the Enter key to send the text to its target. This API uses an asynchronous callback to return the result. Sets the Enter key to send the text to its target. This API uses an asynchronous callback to return the result. If the required two parameters are not passed in, an exception is thrown.
**System capability**: SystemCapability.MiscServices.InputMethodFramework **System capability**: SystemCapability.MiscServices.InputMethodFramework
...@@ -647,18 +837,24 @@ Sets the Enter key to send the text to its target. This API uses an asynchronous ...@@ -647,18 +837,24 @@ Sets the Enter key to send the text to its target. This API uses an asynchronous
**Example** **Example**
```js ```js
TextInputClient.sendKeyFunction(keyFunction, (err, result) => {
TextInputClient.sendKeyFunction(inputMethod.ENTER_KEY_TYPE_NEXT,(isSuccess)=>{ if (err === undefined) {
console.info("isSuccess = " + isSuccess); console.error('sendKeyFunction callback result---err: ' + err.msg);
return;
}
if (result) {
console.info('Success to sendKeyFunction.(callback) ');
} else {
console.error('Failed to sendKeyFunction.(callback) ');
}
}); });
``` ```
### sendKeyFunction ### sendKeyFunction
sendKeyFunction(action:number): Promise&lt;boolean&gt; sendKeyFunction(action:number): Promise&lt;boolean&gt;
Sets the Enter key to send the text to its target. This API uses an asynchronous callback to return the result. Sets the Enter key to send the text to its target. This API uses a promise to return the result. If the required parameter is not passed in, an exception is thrown.
**System capability**: SystemCapability.MiscServices.InputMethodFramework **System capability**: SystemCapability.MiscServices.InputMethodFramework
...@@ -677,15 +873,24 @@ Sets the Enter key to send the text to its target. This API uses an asynchronous ...@@ -677,15 +873,24 @@ Sets the Enter key to send the text to its target. This API uses an asynchronous
**Example** **Example**
```js ```js
var isSuccess = TextInputClient.sendKeyFunction(inputMethod.ENTER_KEY_TYPE_NEXT); async function InputMethodEngine() {
console.info("isSuccess = " + isSuccess); await client.sendKeyFunction(keyFunction).then((result) => {
if (result) {
console.info('Success to sendKeyFunction.(promise) ');
} else {
console.error('Failed to sendKeyFunction.(promise) ');
}
}).catch((err) => {
console.error('sendKeyFunction promise err:' + err.msg);
});
}
``` ```
### insertText ### insertText
insertText(text:string, callback: AsyncCallback&lt;boolean&gt;): void insertText(text:string, callback: AsyncCallback&lt;boolean&gt;): void
Inserts text. This API uses an asynchronous callback to return the result. Inserts text. This API uses an asynchronous callback to return the result. If the required two parameters are not passed in, an exception is thrown.
**System capability**: SystemCapability.MiscServices.InputMethodFramework **System capability**: SystemCapability.MiscServices.InputMethodFramework
...@@ -699,18 +904,24 @@ Inserts text. This API uses an asynchronous callback to return the result. ...@@ -699,18 +904,24 @@ Inserts text. This API uses an asynchronous callback to return the result.
**Example** **Example**
```js ```js
TextInputClient.insertText('test', (err, result) => {
TextInputClient.insertText("test", (isSuccess)=>{ if (err === undefined) {
console.info("isSuccess = " + isSuccess); console.error('insertText callback result---err: ' + err.msg);
return;
}
if (result) {
console.info('Success to insertText.(callback) ');
} else {
console.error('Failed to insertText.(callback) ');
}
}); });
``` ```
### insertText ### insertText
insertText(text:string): Promise&lt;boolean&gt; insertText(text:string): Promise&lt;boolean&gt;
Inserts text. This API uses an asynchronous callback to return the result. Inserts text. This API uses a promise to return the result. If the required parameter is not passed in, an exception is thrown.
**System capability**: SystemCapability.MiscServices.InputMethodFramework **System capability**: SystemCapability.MiscServices.InputMethodFramework
...@@ -729,15 +940,24 @@ Inserts text. This API uses an asynchronous callback to return the result. ...@@ -729,15 +940,24 @@ Inserts text. This API uses an asynchronous callback to return the result.
**Example** **Example**
```js ```js
var isSuccess = TextInputClient.insertText("test"); async function InputMethodEngine() {
console.info("isSuccess = " + isSuccess); await TextInputClient.insertText('test').then((result) => {
if (result) {
console.info('Success to insertText.(promise) ');
} else {
console.error('Failed to insertText.(promise) ');
}
}).catch((err) => {
console.error('insertText promise err: ' + err.msg);
});
}
``` ```
### getEditorAttribute ### getEditorAttribute
getEditorAttribute(callback: AsyncCallback&lt;EditorAttribute&gt;): void getEditorAttribute(callback: AsyncCallback&lt;EditorAttribute&gt;): void
Obtains the attribute of the edit box. This API uses an asynchronous callback to return the result. Obtains the attribute of the edit box. This API uses an asynchronous callback to return the result. If the required parameter is not passed in, an exception is thrown.
**System capability**: SystemCapability.MiscServices.InputMethodFramework **System capability**: SystemCapability.MiscServices.InputMethodFramework
...@@ -750,15 +970,21 @@ Obtains the attribute of the edit box. This API uses an asynchronous callback to ...@@ -750,15 +970,21 @@ Obtains the attribute of the edit box. This API uses an asynchronous callback to
**Example** **Example**
```js ```js
TextInputClient.getEditorAttribute((EditorAttribute)=>{ TextInputClient.getEditorAttribute((err, editorAttribute) => {
if (err === undefined) {
console.error('getEditorAttribute callback result---err: ' + err.msg);
return;
}
console.log('editorAttribute.inputPattern(callback): ' + JSON.stringify(editorAttribute.inputPattern));
console.log('editorAttribute.enterKeyType(callback): ' + JSON.stringify(editorAttribute.enterKeyType));
}); });
``` ```
### getEditorAttribute ### getEditorAttribute
getEditorAttribute(): EditorAttribute getEditorAttribute(): Promise&lt;EditorAttribute&gt;
Obtains the attribute of the edit box. This API uses an asynchronous callback to return the result. Obtains the attribute of the edit box. This API uses a promise to return the result. If any parameter is passed in, an exception is thrown.
**System capability**: SystemCapability.MiscServices.InputMethodFramework **System capability**: SystemCapability.MiscServices.InputMethodFramework
...@@ -771,7 +997,72 @@ Obtains the attribute of the edit box. This API uses an asynchronous callback to ...@@ -771,7 +997,72 @@ Obtains the attribute of the edit box. This API uses an asynchronous callback to
**Example** **Example**
```js ```js
var EditorAttribute = TextInputClient.getEditorAttribute(); async function InputMethodEngine() {
await TextInputClient.getEditorAttribute().then((editorAttribute) => {
console.info('editorAttribute.inputPattern(promise): ' + JSON.stringify(editorAttribute.inputPattern));
console.info('editorAttribute.enterKeyType(promise): ' + JSON.stringify(editorAttribute.enterKeyType));
}).catch((err) => {
console.error('getEditorAttribute promise err: ' + err.msg);
});
}
```
### moveCursor<sup>9+</sup>
moveCursor(direction: number, callback: AsyncCallback&lt;void&gt;): void
Moves the cursor. This API uses an asynchronous callback to return the result. If the required parameter is not passed in, an exception is thrown.
**System capability**: SystemCapability.MiscServices.InputMethodFramework
**Parameters**
| Name | Type | Mandatory| Description |
| --------- | ------------------------- | ---- | -------------- |
| direction | number | Yes | Direction in which the cursor moves.|
| callback | AsyncCallback&lt;void&gt; | Yes | Callback used to return the result. |
**Example**
```js
TextInputClient.moveCursor(inputMethodEngine.CURSOR_xxx, (err) => {
if (err === undefined) {
console.error('moveCursor callback result---err: ' + err.msg);
return;
}
});
```
### moveCursor<sup>9+</sup>
moveCursor(direction: number): Promise&lt;void&gt;
Moves the cursor. This API uses a promise to return the result. If the required parameter is not passed in, an exception is thrown.
**System capability**: SystemCapability.MiscServices.InputMethodFramework
**Parameters**
| Name | Type | Mandatory| Description |
| --------- | ------ | ---- | -------------- |
| direction | number | Yes | Direction in which the cursor moves.|
**Return value**
| Type | Description |
| ------------------- | ------------------------- |
| Promise&lt;void&gt; | Promise that returns no value.|
**Example**
```js
async function InputMethodEngine() {
await TextInputClient.moveCursor(inputMethodEngine.CURSOR_xxx).then(async (err) => {
console.log('moveCursor success');
}).catch((err) => {
console.error('moveCursor success err: ' + err.msg);
});
}
``` ```
## EditorAttribute<a name="EditorAttribute"></a> ## EditorAttribute<a name="EditorAttribute"></a>
......
# SysCap List
SysCap, short for System Capability, refers to a standalone feature in the operating system.
Before using an API for development, you are advised to familiarize yourself with [SysCap](../quick-start/syscap.md), and then consult the following tables to see whether the SysCap set required for the API is supported by the target device type.
## SystemCapability.ArkUI.ArkUI.Full
ArKUI standard system
| Default | Sports Watch| Smart Watch| Tablet| Head Unit| Smart TV| Smart Vision | Router |
| ------- | ------ | ------ | ---- | ---- | ------ | ------------ | ------ |
| Yes | No | Yes | Yes | Yes | Yes | No | No |
## SystemCapability.ArkUI.ArkUI.Lite
ArkUI small system
| Default | Sports Watch| Smart Watch| Tablet| Head Unit| Smart TV| Smart Vision | Router |
| ------- | ------ | ------ | ---- | ---- | ------ | ------------ | ------ |
| Yes | Yes | Yes | Yes | Yes | Yes | Yes | No |
## SystemCapability.ArkUI.ArkUI.Napi
NAPI functionality
| Default | Sports Watch| Smart Watch| Tablet| Head Unit| Smart TV| Smart Vision | Router |
| ------- | ------ | ------ | ---- | ---- | ------ | ------------ | ------ |
| Yes | No | Yes | Yes | Yes | Yes | No | No |
## SystemCapability.ArkUI.ArkUI.Libuv
libuv functionality
| Default | Sports Watch| Smart Watch| Tablet| Head Unit| Smart TV| Smart Vision | Router |
| ------- | ------ | ------ | ---- | ---- | ------ | ------------ | ------ |
| Yes | No | Yes | Yes | Yes | Yes | No | No |
## SystemCapability.ArkUI.UiAppearance
Appearance configuration
| Default | Sports Watch| Smart Watch| Tablet| Head Unit| Smart TV| Smart Vision | Router |
| ------- | ------ | ------ | ---- | ---- | ------ | ------------ | ------ |
| Yes | No | Yes | Yes | Yes | Yes | No | No |
## SystemCapability.BundleManager.BundleFramework
Bundle manager service
| Default | Sports Watch| Smart Watch| Tablet| Head Unit| Smart TV| Smart Vision | Router |
| ------- | ------ | ------ | ---- | ---- | ------ | ------------ | ------ |
| Yes | No | Yes | Yes | Yes | Yes | No | No |
## SystemCapability.BundleManager.DistributedBundleFramework
Distributed scheduler
| Default | Sports Watch| Smart Watch| Tablet| Head Unit| Smart TV| Smart Vision | Router |
| ------- | ------ | ------ | ---- | ---- | ------ | ------------ | ------ |
| Yes | No | Yes | Yes | Yes | Yes | No | No |
## SystemCapability.BundleManager.BundleTool
Bundle manager CLI tool
| Default | Sports Watch| Smart Watch| Tablet| Head Unit| Smart TV| Smart Vision | Router |
| ------- | ------ | ------ | ---- | ---- | ------ | ------------ | ------ |
| Yes | No | Yes | Yes | Yes | Yes | No | No |
## SystemCapability.BundleManager.Zlib
zlib compression and decompression tool
| Default | Sports Watch| Smart Watch| Tablet| Head Unit| Smart TV| Smart Vision | Router |
| ------- | ------ | ------ | ---- | ---- | ------ | ------------ | ------ |
| Yes | No | Yes | Yes | Yes | Yes | No | No |
## SystemCapability.BundleManager.PackingTool
Packing and unpacking tools for bundle management
| Default | Sports Watch| Smart Watch| Tablet| Head Unit| Smart TV| Smart Vision | Router |
| ------- | ------ | ------ | ---- | ---- | ------ | ------------ | ------ |
| Yes | Yes | Yes | Yes | Yes | Yes | Yes | No |
## SystemCapability.Graphic.Graphic2D.WebGL
WebGL 1.0 API
| Default | Sports Watch| Smart Watch| Tablet| Head Unit| Smart TV| Smart Vision | Router |
| ------- | ------ | ------ | ---- | ---- | ------ | ------------ | ------ |
| Yes | No | Yes | Yes | Yes | Yes | No | No |
## SystemCapability.Graphic.Graphic2D.WebGL2
WebGL 2.0 API
| Default | Sports Watch| Smart Watch| Tablet| Head Unit| Smart TV| Smart Vision | Router |
| ------- | ------ | ------ | ---- | ---- | ------ | ------------ | ------ |
| Yes | No | No | No | No | No | No | No |
## SystemCapability.WindowManager.WindowManager.Core
Window manager
| Default | Sports Watch| Smart Watch| Tablet| Head Unit| Smart TV| Smart Vision | Router |
| ------- | ------ | ------ | ---- | ---- | ------ | ------------ | ------ |
| Yes | No | Yes | Yes | Yes | Yes | No | No |
## SystemCapability.WindowManager.WindowManager.MutiScreen
Multi-screen capability
| Default | Sports Watch| Smart Watch| Tablet| Head Unit| Smart TV| Smart Vision | Router |
| ------- | ------ | ------ | ---- | ---- | ------ | ------------ | ------ |
| Yes | No | No | Yes | Yes | Yes | No | No |
## SystemCapability.Notification.CommonEvent
Common event
| Default | Sports Watch| Smart Watch| Tablet| Head Unit| Smart TV| Smart Vision | Router |
| ------- | ------ | ------ | ---- | ---- | ------ | ------------ | ------ |
| Yes | No | Yes | Yes | Yes | Yes | No | No |
## SystemCapability.Notification.Notification
Notification
| Default | Sports Watch| Smart Watch| Tablet| Head Unit| Smart TV| Smart Vision | Router |
| ------- | ------ | ------ | ---- | ---- | ------ | ------------ | ------ |
| Yes | No | Yes | Yes | Yes | Yes | No | No |
## SystemCapability.Notification.ReminderAgent
reminderAgent
| Default | Sports Watch| Smart Watch| Tablet| Head Unit| Smart TV| Smart Vision | Router |
| ------- | ------ | ------ | ---- | ---- | ------ | ------------ | ------ |
| Yes | No | Yes | Yes | Yes | Yes | No | No |
## SystemCapability.Notification.Emitter
Event emitter service
| Default | Sports Watch| Smart Watch| Tablet| Head Unit| Smart TV| Smart Vision | Router |
| ------- | ------ | ------ | ---- | ---- | ------ | ------------ | ------ |
| Yes | No | Yes | Yes | Yes | Yes | No | No |
## SystemCapability.Communication.IPC.Core
Inter-process communication (IPC)
| Default | Sports Watch| Smart Watch| Tablet| Head Unit| Smart TV| Smart Vision | Router |
| ------- | ------ | ------ | ---- | ---- | ------ | ------------ | ------ |
| Yes | No | Yes | Yes | Yes | Yes | Yes | No |
## SystemCapability.Communication.SoftBus.Core
DSoftBus
| Default | Sports Watch| Smart Watch| Tablet| Head Unit| Smart TV| Smart Vision | Router |
| ------- | ------ | ------ | ---- | ---- | ------ | ------------ | ------ |
| Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes |
## SystemCapability.Communication.NetManager.Core
Basic network management services
| Default | Sports Watch| Smart Watch| Tablet| Head Unit| Smart TV| Smart Vision | Router |
| ------- | ------ | ------ | ---- | ---- | ------ | ------------ | ------ |
| Yes | No | Yes | Yes | Yes | Yes | No | No |
## SystemCapability.Communication.NetManager.Extension
Extended network management services
| Default | Sports Watch| Smart Watch| Tablet| Head Unit| Smart TV| Smart Vision | Router |
| ------- | ------ | ------ | ---- | ---- | ------ | ------------ | ------ |
| Yes | No | No | Yes | Yes | Yes | No | No |
## SystemCapability.Communication.NetStack
Basic network stack capability
| Default | Sports Watch| Smart Watch| Tablet| Head Unit| Smart TV| Smart Vision | Router |
| ------- | ------ | ------ | ---- | ---- | ------ | ------------ | ------ |
| Yes | No | Yes | Yes | Yes | Yes | No | No |
## SystemCapability.Communication.WiFi.Core
Basic Wi-Fi capability
| Default | Sports Watch| Smart Watch| Tablet| Head Unit| Smart TV| Smart Vision | Router |
| ------- | ------ | ------ | ---- | ---- | ------ | ------------ | ------ |
| Yes | No | Yes | Yes | Yes | Yes | No | No |
## SystemCapability.Communication.WiFi.STA
Wi-Fi STA capability
| Default | Sports Watch| Smart Watch| Tablet| Head Unit| Smart TV| Smart Vision | Router |
| ------- | ------ | ------ | ---- | ---- | ------ | ------------ | ------ |
| Yes | No | Yes | Yes | Yes | Yes | No | No |
## SystemCapability.Communication.WiFi.AP.Core
Wi-Fi AP capability
| Default | Sports Watch| Smart Watch| Tablet| Head Unit| Smart TV| Smart Vision | Router |
| ------- | ------ | ------ | ---- | ---- | ------ | ------------ | ------ |
| Yes | No | Yes | Yes | Yes | Yes | No | No |
## SystemCapability.Communication.WiFi.AP.Extension
Wi-Fi AP extension capability
| Default | Sports Watch| Smart Watch| Tablet| Head Unit| Smart TV| Smart Vision | Router |
| ------- | ------ | ------ | ---- | ---- | ------ | ------------ | ------ |
| No | No | No | No | No | No | No | Yes |
## SystemCapability.Communication.WiFi.P2P
Wi-Fi P2P capability
| Default | Sports Watch| Smart Watch| Tablet| Head Unit| Smart TV| Smart Vision | Router |
| ------- | ------ | ------ | ---- | ---- | ------ | ------------ | ------ |
| Yes | No | Yes | Yes | Yes | Yes | No | No |
## SystemCapability.Communication.Bluetooth.Core
Bluetooth service and protocol stack
| Default | Sports Watch| Smart Watch| Tablet| Head Unit| Smart TV| Smart Vision | Router |
| ------- | ------ | ------ | ---- | ---- | ------ | ------------ | ------ |
| Yes | No | Yes | Yes | Yes | Yes | No | No |
## SystemCapability.Communication.Bluetooth.Lite
Bluetooth lightweight service
| Default | Sports Watch| Smart Watch| Tablet| Head Unit| Smart TV| Smart Vision | Router |
| ------- | ------ | ------ | ---- | ---- | ------ | ------------ | ------ |
| Yes | Yes | Yes | Yes | Yes | Yes | No | No |
## SystemCapability.Communication.NFC.Core
NFC
| Default | Sports Watch| Smart Watch| Tablet| Head Unit| Smart TV| Smart Vision | Router |
| ------- | ------ | ------ | ---- | ---- | ------ | ------------ | ------ |
| No | No | No | No | No | No | No | No |
## SystemCapability.Communication.ConnectedTag
Active NFC tag service
| Default | Sports Watch| Smart Watch| Tablet| Head Unit| Smart TV| Smart Vision | Router |
| ------- | ------ | ------ | ---- | ---- | ------ | ------------ | ------ |
| No | No | No | No | No | No | No | No |
## SystemCapability.Location.Location.Core
Basic capabilities of the location service
| Default | Sports Watch| Smart Watch| Tablet| Head Unit| Smart TV| Smart Vision | Router |
| ------- | ------ | ------ | ---- | ---- | ------ | ------------ | ------ |
| Yes | No | Yes | Yes | Yes | No | No | No |
## SystemCapability.Location.Location.Geocoder
Geocoding capability
| Default | Sports Watch| Smart Watch| Tablet| Head Unit| Smart TV| Smart Vision | Router |
| ------- | ------ | ------ | ---- | ---- | ------ | ------------ | ------ |
| Yes | No | Yes | Yes | Yes | No | No | No |
## SystemCapability.Location.Location.Geofence
Geofencing capability
| Default | Sports Watch| Smart Watch| Tablet| Head Unit| Smart TV| Smart Vision | Router |
| ------- | ------ | ------ | ---- | ---- | ------ | ------------ | ------ |
| Yes | No | Yes | Yes | Yes | No | No | No |
## SystemCapability.Location.Location.Gnss
GNSS hardware capabilities
| Default | Sports Watch| Smart Watch| Tablet| Head Unit| Smart TV| Smart Vision | Router |
| ------- | ------ | ------ | ---- | ---- | ------ | ------------ | ------ |
| Yes | No | Yes | Yes | Yes | No | No | No |
## SystemCapability.Location.Location.Lite
Lite device capabilities of the location service
| Default | Sports Watch| Smart Watch| Tablet| Head Unit| Smart TV| Smart Vision | Router |
| ------- | ------ | ------ | ---- | ---- | ------ | ------------ | ------ |
| Yes | Yes | Yes | Yes | Yes | No | No | No |
## SystemCapability.MultimodalInput.Input.Core
Basic input capability
| Default | Sports Watch| Smart Watch| Tablet| Head Unit| Smart TV| Smart Vision | Router |
| ------- | ------ | ------ | ---- | ---- | ------ | ------------ | ------ |
| Yes | No | Yes | Yes | Yes | Yes | No | No |
## SystemCapability.MultimodalInput.Input.InputDevice
Input device management
| Default | Sports Watch| Smart Watch| Tablet| Head Unit| Smart TV| Smart Vision | Router |
| ------- | ------ | ------ | ---- | ---- | ------ | ------------ | ------ |
| Yes | No | No | Yes | Yes | Yes | No | No |
## SystemCapability.MultimodalInput.Input.RemoteInputDevice
Distributed input device management
| Default | Sports Watch| Smart Watch| Tablet| Head Unit| Smart TV| Smart Vision | Router |
| ------- | ------ | ------ | ---- | ---- | ------ | ------------ | ------ |
| Yes | No | No | Yes | Yes | Yes | No | No |
## SystemCapability.MultimodalInput.Input.InputMonitor
Input event listener
| Default | Sports Watch| Smart Watch| Tablet| Head Unit| Smart TV| Smart Vision | Router |
| ------- | ------ | ------ | ---- | ---- | ------ | ------------ | ------ |
| Yes | No | No | Yes | Yes | Yes | No | No |
## SystemCapability.MultimodalInput.Input.InputConsumer
Input event consumer
| Default | Sports Watch| Smart Watch| Tablet| Head Unit| Smart TV| Smart Vision | Router |
| ------- | ------ | ------ | ---- | ---- | ------ | ------------ | ------ |
| Yes | No | Yes | Yes | Yes | Yes | No | No |
## SystemCapability.MultimodalInput.Input.InputSimulator
Input event simulator
| Default | Sports Watch| Smart Watch| Tablet| Head Unit| Smart TV| Smart Vision | Router |
| ------- | ------ | ------ | ---- | ---- | ------ | ------------ | ------ |
| Yes | No | No | Yes | Yes | Yes | No | No |
## SystemCapability.MultimodalInput.Input.InputFilter
Input event filter
| Default | Sports Watch| Smart Watch| Tablet| Head Unit| Smart TV| Smart Vision | Router |
| ------- | ------ | ------ | ---- | ---- | ------ | ------------ | ------ |
| Yes | No | No | Yes | Yes | Yes | No | No |
## SystemCapability.PowerManager.BatteryManager.Extension
Battery manager extension capability
| Default | Sports Watch| Smart Watch| Tablet| Head Unit| Smart TV| Smart Vision | Router |
| ------- | ------ | ------ | ---- | ---- | ------ | ------------ | ------ |
| Yes | No | Yes | Yes | No | No | No | No |
## SystemCapability.PowerManager.BatteryStatistics
Power consumption statistics
| Default | Sports Watch| Smart Watch| Tablet| Head Unit| Smart TV| Smart Vision | Router |
| ------- | ------ | ------ | ---- | ---- | ------ | ------------ | ------ |
| Yes | No | Yes | Yes | No | No | No | No |
## SystemCapability.PowerManager.DisplayPowerManager
Power management display
| Default | Sports Watch| Smart Watch| Tablet| Head Unit| Smart TV| Smart Vision | Router |
| ------- | ------ | ------ | ---- | ---- | ------ | ------------ | ------ |
| Yes | No | Yes | Yes | No | Yes | No | No |
## SystemCapability.PowerManager.ThermalManager
Temperature control
| Default | Sports Watch| Smart Watch| Tablet| Head Unit| Smart TV| Smart Vision | Router |
| ------- | ------ | ------ | ---- | ---- | ------ | ------------ | ------ |
| Yes | No | Yes | Yes | Yes | Yes | No | No |
## SystemCapability.PowerManager.PowerManager.Core
Core capabilities of the system power management service
| Default | Sports Watch| Smart Watch| Tablet| Head Unit| Smart TV| Smart Vision | Router |
| ------- | ------ | ------ | ---- | ---- | ------ | ------------ | ------ |
| Yes | No | Yes | Yes | Yes | Yes | No | No |
## SystemCapability.PowerManager.PowerManager.Lite
Lite device capabilities of the system power management service
| Default | Sports Watch| Smart Watch| Tablet| Head Unit| Smart TV| Smart Vision | Router |
| ------- | ------ | ------ | ---- | ---- | ------ | ------------ | ------ |
| No | Yes | No | No | No | No | Yes | Yes |
## SystemCapability.PowerManager.BatteryManager.Core
Core capabilities of the battery service
| Default | Sports Watch| Smart Watch| Tablet| Head Unit| Smart TV| Smart Vision | Router |
| ------- | ------ | ------ | ---- | ---- | ------ | ------------ | ------ |
| Yes | No | Yes | Yes | No | No | No | No |
## SystemCapability.PowerManager.BatteryManager.Lite
Lite device capabilities of the battery service
| Default | Sports Watch| Smart Watch| Tablet| Head Unit| Smart TV| Smart Vision | Router |
| ------- | ------ | ------ | ---- | ---- | ------ | ------------ | ------ |
| No | Yes | No | No | No | No | Yes | Yes |
## SystemCapability.PowerManager.PowerManager.Extension
Extension capabilities of the system power management service
| Default | Sports Watch| Smart Watch| Tablet| Head Unit| Smart TV| Smart Vision | Router |
| ------- | ------ | ------ | ---- | ---- | ------ | ------------ | ------ |
| Yes | No | Yes | Yes | No | Yes | No | No |
## SystemCapability.Multimedia.Media.Core
Basic media capabilities
| Default | Sports Watch| Smart Watch| Tablet| Head Unit| Smart TV| Smart Vision | Router |
| ------- | ------ | ------ | ---- | ---- | ------ | ------------ | ------ |
| Yes | No | Yes | Yes | Yes | Yes | No | No |
## SystemCapability.Multimedia.Media.AudioPlayer
Media audio player capability
| Default | Sports Watch| Smart Watch| Tablet| Head Unit| Smart TV| Smart Vision | Router |
| ------- | ------ | ------ | ---- | ---- | ------ | ------------ | ------ |
| Yes | No | Yes | Yes | Yes | Yes | No | No |
## SystemCapability.Multimedia.Media.AudioRecorder
Media audio recorder capability
| Default | Sports Watch| Smart Watch| Tablet| Head Unit| Smart TV| Smart Vision | Router |
| ------- | ------ | ------ | ---- | ---- | ------ | ------------ | ------ |
| Yes | No | Yes | Yes | Yes | Yes | No | No |
## SystemCapability.Multimedia.Media.VideoPlayer
Media video player capability
| Default | Sports Watch| Smart Watch| Tablet| Head Unit| Smart TV| Smart Vision | Router |
| ------- | ------ | ------ | ---- | ---- | ------ | ------------ | ------ |
| Yes | No | Yes | Yes | Yes | Yes | No | No |
## SystemCapability.Multimedia.Media.VideoRecorder
Media video recorder capability
| Default | Sports Watch| Smart Watch| Tablet| Head Unit| Smart TV| Smart Vision | Router |
| ------- | ------ | ------ | ---- | ---- | ------ | ------------ | ------ |
| Yes | No | Yes | Yes | Yes | Yes | No | No |
## SystemCapability.Multimedia.Media.CodecBase
Basic media codec capability
| Default | Sports Watch| Smart Watch| Tablet| Head Unit| Smart TV| Smart Vision | Router |
| ------- | ------ | ------ | ---- | ---- | ------ | ------------ | ------ |
| Yes | No | Yes | Yes | Yes | Yes | No | No |
## SystemCapability.Multimedia.Media.AudioDecoder
Media audio decoding capability
| Default | Sports Watch| Smart Watch| Tablet| Head Unit| Smart TV| Smart Vision | Router |
| ------- | ------ | ------ | ---- | ---- | ------ | ------------ | ------ |
| Yes | No | Yes | Yes | Yes | Yes | No | No |
## SystemCapability.Multimedia.Media.AudioEncoder
Media audio encoding capability
| Default | Sports Watch| Smart Watch| Tablet| Head Unit| Smart TV| Smart Vision | Router |
| ------- | ------ | ------ | ---- | ---- | ------ | ------------ | ------ |
| Yes | No | Yes | Yes | Yes | Yes | No | No |
## SystemCapability.Multimedia.Media.VideoDecoder
Media video decoding capability
| Default | Sports Watch| Smart Watch| Tablet| Head Unit| Smart TV| Smart Vision | Router |
| ------- | ------ | ------ | ---- | ---- | ------ | ------------ | ------ |
| Yes | No | Yes | Yes | Yes | Yes | No | No |
## SystemCapability.Multimedia.Media.VideoEncoder
Media video encoding capability
| Default | Sports Watch| Smart Watch| Tablet| Head Unit| Smart TV| Smart Vision | Router |
| ------- | ------ | ------ | ---- | ---- | ------ | ------------ | ------ |
| Yes | No | Yes | Yes | Yes | Yes | No | No |
## SystemCapability.Multimedia.Media.Spliter
Media splitter capability
| Default | Sports Watch| Smart Watch| Tablet| Head Unit| Smart TV| Smart Vision | Router |
| ------- | ------ | ------ | ---- | ---- | ------ | ------------ | ------ |
| Yes | No | Yes | Yes | Yes | Yes | No | No |
## SystemCapability.Multimedia.Media.Muxer
Media muxer capability
| Default | Sports Watch| Smart Watch| Tablet| Head Unit| Smart TV| Smart Vision | Router |
| ------- | ------ | ------ | ---- | ---- | ------ | ------------ | ------ |
| Yes | No | Yes | Yes | Yes | Yes | No | No |
## SystemCapability.Multimedia.AVSession.Core
Basic media session capability
| Default | Sports Watch| Smart Watch| Tablet| Head Unit| Smart TV| Smart Vision | Router |
| ------- | ------ | ------ | ---- | ---- | ------ | ------------ | ------ |
| Yes | No | Yes | Yes | Yes | Yes | No | No |
## SystemCapability.Multimedia.AVSession.Manager
Media session management capability
| Default | Sports Watch| Smart Watch| Tablet| Head Unit| Smart TV| Smart Vision | Router |
| ------- | ------ | ------ | ---- | ---- | ------ | ------------ | ------ |
| Yes | No | Yes | Yes | Yes | Yes | No | No |
## SystemCapability.Multimedia.Audio.Core
Basic audio capability
| Default | Sports Watch| Smart Watch| Tablet| Head Unit| Smart TV| Smart Vision | Router |
| ------- | ------ | ------ | ---- | ---- | ------ | ------------ | ------ |
| Yes | No | Yes | Yes | Yes | Yes | No | No |
## SystemCapability.Multimedia.Audio.Renderer
Audio output capability
| Default | Sports Watch| Smart Watch| Tablet| Head Unit| Smart TV| Smart Vision | Router |
| ------- | ------ | ------ | ---- | ---- | ------ | ------------ | ------ |
| Yes | No | Yes | Yes | Yes | Yes | No | No |
## SystemCapability.Multimedia.Audio.Capturer
Audio input capability
| Default | Sports Watch| Smart Watch| Tablet| Head Unit| Smart TV| Smart Vision | Router |
| ------- | ------ | ------ | ---- | ---- | ------ | ------------ | ------ |
| Yes | No | Yes | Yes | Yes | Yes | No | No |
## SystemCapability.Multimedia.Audio.Device
Audio device management capability
| Default | Sports Watch| Smart Watch| Tablet| Head Unit| Smart TV| Smart Vision | Router |
| ------- | ------ | ------ | ---- | ---- | ------ | ------------ | ------ |
| Yes | No | Yes | Yes | Yes | Yes | No | No |
## SystemCapability.Multimedia.Audio.Volume
Audio volume management capability
| Default | Sports Watch| Smart Watch| Tablet| Head Unit| Smart TV| Smart Vision | Router |
| ------- | ------ | ------ | ---- | ---- | ------ | ------------ | ------ |
| Yes | No | Yes | Yes | Yes | Yes | No | No |
## SystemCapability.Multimedia.Audio.Communication
Audio communication capability
| Default | Sports Watch| Smart Watch| Tablet| Head Unit| Smart TV| Smart Vision | Router |
| ------- | ------ | ------ | ---- | ---- | ------ | ------------ | ------ |
| Yes | No | Yes | Yes | Yes | Yes | No | No |
## SystemCapability.Multimedia.Camera.Core
Basic camera capability
| Default | Sports Watch| Smart Watch| Tablet| Head Unit| Smart TV| Smart Vision | Router |
| ------- | ------ | ------ | ---- | ---- | ------ | ------------ | ------ |
| Yes | No | Yes | Yes | Yes | Yes | No | No |
## SystemCapability.Multimedia.Camera.DistributedCore
Distributed camera capability
| Default | Sports Watch| Smart Watch| Tablet| Head Unit| Smart TV| Smart Vision | Router |
| ------- | ------ | ------ | ---- | ---- | ------ | ------------ | ------ |
| Yes | No | Yes | Yes | Yes | Yes | No | No |
## SystemCapability.Multimedia.Image.Core
Basic image capability
| Default | Sports Watch| Smart Watch| Tablet| Head Unit| Smart TV| Smart Vision | Router |
| ------- | ------ | ------ | ---- | ---- | ------ | ------------ | ------ |
| Yes | No | Yes | Yes | Yes | Yes | No | No |
## SystemCapability.Multimedia.Image.ImageSource
Image source decoding and parsing capability
| Default | Sports Watch| Smart Watch| Tablet| Head Unit| Smart TV| Smart Vision | Router |
| ------- | ------ | ------ | ---- | ---- | ------ | ------------ | ------ |
| Yes | No | Yes | Yes | Yes | Yes | No | No |
## SystemCapability.Multimedia.Image.ImagePacker
Image packaging capability
| Default | Sports Watch| Smart Watch| Tablet| Head Unit| Smart TV| Smart Vision | Router |
| ------- | ------ | ------ | ---- | ---- | ------ | ------------ | ------ |
| Yes | No | Yes | Yes | Yes | Yes | No | No |
## SystemCapability.Multimedia.Image.ImageReceiver
Image receiving capability
| Default | Sports Watch| Smart Watch| Tablet| Head Unit| Smart TV| Smart Vision | Router |
| ------- | ------ | ------ | ---- | ---- | ------ | ------------ | ------ |
| Yes | No | Yes | Yes | Yes | Yes | No | No |
## SystemCapability.Multimedia.MediaLibrary.Core
Basic capabilities of the media library
| Default | Sports Watch| Smart Watch| Tablet| Head Unit| Smart TV| Smart Vision | Router |
| ------- | ------ | ------ | ---- | ---- | ------ | ------------ | ------ |
| Yes | No | Yes | Yes | Yes | Yes | No | No |
## SystemCapability.Multimedia.MediaLibrary.SmartAlbum
Smart album capability of the media library
| Default | Sports Watch| Smart Watch| Tablet| Head Unit| Smart TV| Smart Vision | Router |
| ------- | ------ | ------ | ---- | ---- | ------ | ------------ | ------ |
| Yes | No | Yes | Yes | Yes | Yes | No | No |
## SystemCapability.Multimedia.MediaLibrary.DistributedCore
Distributed capability of the media library
| Default | Sports Watch| Smart Watch| Tablet| Head Unit| Smart TV| Smart Vision | Router |
| ------- | ------ | ------ | ---- | ---- | ------ | ------------ | ------ |
| Yes | No | Yes | Yes | Yes | Yes | No | No |
## SystemCapability.Telephony.CoreService
Basic cellular service
| Default | Sports Watch| Smart Watch| Tablet| Head Unit| Smart TV| Smart Vision | Router |
| ------- | ------ | ------ | ---- | ---- | ------ | ------------ | ------ |
| Yes | No | Yes | Yes | No | No | No | No |
## SystemCapability.Telephony.CallManager
Call management service
| Default | Sports Watch| Smart Watch| Tablet| Head Unit| Smart TV| Smart Vision | Router |
| ------- | ------ | ------ | ---- | ---- | ------ | ------------ | ------ |
| Yes | No | Yes | Yes | Yes | No | No | No |
## SystemCapability.Telephony.CellularCall
Cellular call service
| Default | Sports Watch| Smart Watch| Tablet| Head Unit| Smart TV| Smart Vision | Router |
| ------- | ------ | ------ | ---- | ---- | ------ | ------------ | ------ |
| Yes | No | Yes | Yes | No | No | No | No |
## SystemCapability.Telephony.CellularData
Cellular data service
| Default | Sports Watch| Smart Watch| Tablet| Head Unit| Smart TV| Smart Vision | Router |
| ------- | ------ | ------ | ---- | ---- | ------ | ------------ | ------ |
| Yes | No | Yes | Yes | No | No | No | No |
## SystemCapability.Telephony.SmsMms
SMS and MMS services
| Default | Sports Watch| Smart Watch| Tablet| Head Unit| Smart TV| Smart Vision | Router |
| ------- | ------ | ------ | ---- | ---- | ------ | ------------ | ------ |
| Yes | No | Yes | Yes | No | No | No | No |
## SystemCapability.Telephony.StateRegistry
Cellular network status registration service
| Default | Sports Watch| Smart Watch| Tablet| Head Unit| Smart TV| Smart Vision | Router |
| ------- | ------ | ------ | ---- | ---- | ------ | ------------ | ------ |
| Yes | No | Yes | Yes | No | No | No | No |
## SystemCapability.Global.I18n
Internationalization
| Default | Sports Watch| Smart Watch| Tablet| Head Unit| Smart TV| Smart Vision | Router |
| ------- | ------ | ------ | ---- | ---- | ------ | ------------ | ------ |
| Yes | No | Yes | Yes | Yes | Yes | No | No |
## SystemCapability.Global.ResourceManager
Resource management
| Default | Sports Watch| Smart Watch| Tablet| Head Unit| Smart TV| Smart Vision | Router |
| ------- | ------ | ------ | ---- | ---- | ------ | ------------ | ------ |
| Yes | No | Yes | Yes | Yes | Yes | No | No |
## SystemCapability.Customization.ConfigPolicy
Customization framework
| Default | Sports Watch| Smart Watch| Tablet| Head Unit| Smart TV| Smart Vision | Router |
| ------- | ------ | ------ | ---- | ---- | ------ | ------------ | ------ |
| Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes |
## SystemCapability.Customization.EnterpriseDeviceManager
Enterprise device management
| Default | Sports Watch| Smart Watch| Tablet| Head Unit| Smart TV| Smart Vision | Router |
| ------- | ------ | ------ | ---- | ---- | ------ | ------------ | ------ |
| Yes | No | Yes | Yes | Yes | Yes | No | No |
## SystemCapability.BarrierFree.Accessibility.Core
Accessibility capability
| Default | Sports Watch| Smart Watch| Tablet| Head Unit| Smart TV| Smart Vision | Router |
| ------- | ------ | ------ | ---- | ---- | ------ | ------------ | ------ |
| Yes | No | Yes | Yes | Yes | Yes | No | No |
## SystemCapability.BarrierFree.Accessibility.Vision
Visual accessibility capability
| Default | Sports Watch| Smart Watch| Tablet| Head Unit| Smart TV| Smart Vision | Router |
| ------- | ------ | ------ | ---- | ---- | ------ | ------------ | ------ |
| Yes | No | Yes | Yes | Yes | Yes | No | No |
## SystemCapability.BarrierFree.Accessibility.Hearing
Audio accessibility capability
| Default | Sports Watch| Smart Watch| Tablet| Head Unit| Smart TV| Smart Vision | Router |
| ------- | ------ | ------ | ---- | ---- | ------ | ------------ | ------ |
| Yes | No | No | Yes | Yes | Yes | No | No |
## SystemCapability.BarrierFree.Accessibility.Interaction
Interaction assistance capability in accessibility
| Default | Sports Watch| Smart Watch| Tablet| Head Unit| Smart TV| Smart Vision | Router |
| ------- | ------ | ------ | ---- | ---- | ------ | ------------ | ------ |
| Yes | No | No | Yes | No | Yes | No | No |
## SystemCapability.ResourceSchedule.WorkScheduler
Work Scheduler
| Default | Sports Watch| Smart Watch| Tablet| Head Unit| Smart TV| Smart Vision | Router |
| ------- | ------ | ------ | ---- | ---- | ------ | ------------ | ------ |
| Yes | No | Yes | Yes | Yes | Yes | No | No |
## SystemCapability.ResourceSchedule.BackgroundTaskManager.ContinuousTask
Continuous task management
| Default | Sports Watch| Smart Watch| Tablet| Head Unit| Smart TV| Smart Vision | Router |
| ------- | ------ | ------ | ---- | ---- | ------ | ------------ | ------ |
| Yes | No | Yes | Yes | Yes | Yes | No | No |
## SystemCapability.ResourceSchedule.BackgroundTaskManager.TransientTask
Transient task management
| Default | Sports Watch| Smart Watch| Tablet| Head Unit| Smart TV| Smart Vision | Router |
| ------- | ------ | ------ | ---- | ---- | ------ | ------------ | ------ |
| Yes | No | Yes | Yes | Yes | Yes | No | No |
## SystemCapability.ResourceSchedule.UsageStatistics.App
Application usage statistics
| Default | Sports Watch| Smart Watch| Tablet| Head Unit| Smart TV| Smart Vision | Router |
| ------- | ------ | ------ | ---- | ---- | ------ | ------------ | ------ |
| Yes | No | Yes | Yes | Yes | Yes | No | No |
## SystemCapability.ResourceSchedule.UsageStatistics.AppGroup
Application activity group
| Default | Sports Watch| Smart Watch| Tablet| Head Unit| Smart TV| Smart Vision | Router |
| ------- | ------ | ------ | ---- | ---- | ------ | ------------ | ------ |
| Yes | No | Yes | Yes | Yes | Yes | No | No |
## SystemCapability.Utils.Lang
TS/JS language base library
| Default | Sports Watch| Smart Watch| Tablet| Head Unit| Smart TV| Smart Vision | Router |
| ------- | ------ | ------ | ---- | ---- | ------ | ------------ | ------ |
| Yes | No | Yes | Yes | Yes | Yes | No | No |
## SystemCapability.HiviewDFX.HiLog
HiLog functionality
| Default | Sports Watch| Smart Watch| Tablet| Head Unit| Smart TV| Smart Vision | Router |
| ------- | ------ | ------ | ---- | ---- | ------ | ------------ | ------ |
| Yes | No | Yes | Yes | Yes | Yes | No | No |
## SystemCapability.HiviewDFX.HiLogLite
Lite HiLog functionality
| Default | Sports Watch| Smart Watch| Tablet| Head Unit| Smart TV| Smart Vision | Router |
| ------- | ------ | ------ | ---- | ---- | ------ | ------------ | ------ |
| No | Yes | No | No | No | No | Yes | Yes |
## SystemCapability.HiviewDFX.HiTrace
HiTrace for distributed tracing
| Default | Sports Watch| Smart Watch| Tablet| Head Unit| Smart TV| Smart Vision | Router |
| ------- | ------ | ------ | ---- | ---- | ------ | ------------ | ------ |
| Yes | No | Yes | Yes | Yes | Yes | No | No |
## SystemCapability.HiviewDFX.Hiview.FaultLogger
FaultLogger for event recording
| Default | Sports Watch| Smart Watch| Tablet| Head Unit| Smart TV| Smart Vision | Router |
| ------- | ------ | ------ | ---- | ---- | ------ | ------------ | ------ |
| Yes | No | Yes | Yes | Yes | Yes | No | No |
## SystemCapability.HiviewDFX.HiviewLite
Lightweight Hiview service
| Default | Sports Watch| Smart Watch| Tablet| Head Unit| Smart TV| Smart Vision | Router |
| ------- | ------ | ------ | ---- | ---- | ------ | ------------ | ------ |
| No | Yes | No | No | No | No | Yes | Yes |
## SystemCapability.HiviewDFX.HiChecker
HiChecker mode
| Default | Sports Watch| Smart Watch| Tablet| Head Unit| Smart TV| Smart Vision | Router |
| ------- | ------ | ------ | ---- | ---- | ------ | ------------ | ------ |
| Yes | No | Yes | Yes | Yes | Yes | No | No |
## SystemCapability.HiviewDFX.HiCollie
HiCollie for suspension fault detection
| Default | Sports Watch| Smart Watch| Tablet| Head Unit| Smart TV| Smart Vision | Router |
| ------- | ------ | ------ | ---- | ---- | ------ | ------------ | ------ |
| Yes | No | Yes | Yes | Yes | Yes | No | No |
## SystemCapability.HiviewDFX.HiDumper
HiDumper for system information exporting
| Default | Sports Watch| Smart Watch| Tablet| Head Unit| Smart TV| Smart Vision | Router |
| ------- | ------ | ------ | ---- | ---- | ------ | ------------ | ------ |
| Yes | No | Yes | Yes | Yes | Yes | No | No |
## SystemCapability.HiviewDFX.HiAppEvent
HiAppEvent for application event logging
| Default | Sports Watch| Smart Watch| Tablet| Head Unit| Smart TV| Smart Vision | Router |
| ------- | ------ | ------ | ---- | ---- | ------ | ------------ | ------ |
| Yes | No | Yes | Yes | Yes | Yes | No | No |
## SystemCapability.HiviewDFX.HiSysEvent
HiAppEvent for system event logging
| Default | Sports Watch| Smart Watch| Tablet| Head Unit| Smart TV| Smart Vision | Router |
| ------- | ------ | ------ | ---- | ---- | ------ | ------------ | ------ |
| Yes | No | Yes | Yes | Yes | Yes | No | No |
## SystemCapability.HiviewDFX.HiEventLite
HiEventLite for lightweight event logging
| Default | Sports Watch| Smart Watch| Tablet| Head Unit| Smart TV| Smart Vision | Router |
| ------- | ------ | ------ | ---- | ---- | ------ | ------------ | ------ |
| No | Yes | No | No | No | No | No | Yes |
## SystemCapability.HiviewDFX.HiProfiler.HiDebug
Debugging and tuning
| Default | Sports Watch| Smart Watch| Tablet| Head Unit| Smart TV| Smart Vision | Router |
| ------- | ------ | ------ | ---- | ---- | ------ | ------------ | ------ |
| Yes | No | Yes | Yes | Yes | Yes | No | No |
## SystemCapability.Update.UpdateService
Update
| Default | Sports Watch| Smart Watch| Tablet| Head Unit| Smart TV| Smart Vision | Router |
| ------- | ------ | ------ | ---- | ---- | ------ | ------------ | ------ |
| Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes |
## SystemCapability.DistributedHardware.DeviceManager
Distributed Device Management
| Default | Sports Watch| Smart Watch| Tablet| Head Unit| Smart TV| Smart Vision | Router |
| ------- | ------ | ------ | ---- | ---- | ------ | ------------ | ------ |
| Yes | No | Yes | Yes | No | Yes | No | No |
## SystemCapability.Security.DeviceAuth
Mutual authentication between devices
| Default | Sports Watch| Smart Watch| Tablet| Head Unit| Smart TV| Smart Vision | Router |
| ------- | ------ | ------ | ---- | ---- | ------ | ------------ | ------ |
| Yes | No | Yes | Yes | No | Yes | No | No |
## SystemCapability.Security.DataTransitManager
Library of data transmission management and control policies
| Default | Sports Watch| Smart Watch| Tablet| Head Unit| Smart TV| Smart Vision | Router |
| ------- | ------ | ------ | ---- | ---- | ------ | ------------ | ------ |
| Yes | No | Yes | Yes | No | Yes | No | No |
## SystemCapability.Security.DeviceSecurityLevel
Device security level management
| Default | Sports Watch| Smart Watch| Tablet| Head Unit| Smart TV| Smart Vision | Router |
| ------- | ------ | ------ | ---- | ---- | ------ | ------------ | ------ |
| Yes | No | Yes | Yes | No | Yes | No | No |
## SystemCapability.Security.Huks
Hardware Unique Key (HUK) management
| Default | Sports Watch| Smart Watch| Tablet| Head Unit| Smart TV| Smart Vision | Router |
| ------- | ------ | ------ | ---- | ---- | ------ | ------------ | ------ |
| Yes | No | Yes | Yes | No | Yes | No | No |
## SystemCapability.Security.AccessToken
Access control
| Default | Sports Watch| Smart Watch| Tablet| Head Unit| Smart TV| Smart Vision | Router |
| ------- | ------ | ------ | ---- | ---- | ------ | ------------ | ------ |
| Yes | No | Yes | Yes | Yes | Yes | No | No |
## SystemCapability.Security.Cipher
Encryption and decryption
| Default | Sports Watch| Smart Watch| Tablet| Head Unit| Smart TV| Smart Vision | Router |
| ------- | ------ | ------ | ---- | ---- | ------ | ------------ | ------ |
| No | No | No | No | No | No | Yes | No |
## SystemCapability.Account.OsAccount
Account
| Default | Sports Watch| Smart Watch| Tablet| Head Unit| Smart TV| Smart Vision | Router |
| ------- | ------ | ------ | ---- | ---- | ------ | ------------ | ------ |
| Yes | No | Yes | Yes | Yes | Yes | No | No |
## SystemCapability.Account.AppAccount
Application account
| Default | Sports Watch| Smart Watch| Tablet| Head Unit| Smart TV| Smart Vision | Router |
| ------- | ------ | ------ | ---- | ---- | ------ | ------------ | ------ |
| Yes | No | Yes | Yes | Yes | Yes | No | No |
## SystemCapability.UserIAM.UserAuth.Core
Unified user authentication
| Default | Sports Watch| Smart Watch| Tablet| Head Unit| Smart TV| Smart Vision | Router |
| ------- | ------ | ------ | ---- | ---- | ------ | ------------ | ------ |
| Yes | No | Yes | Yes | No | Yes | No | No |
## SystemCapability.UserIAM.UserAuth.PinAuth
PIN authentication
| Default | Sports Watch| Smart Watch| Tablet| Head Unit| Smart TV| Smart Vision | Router |
| ------- | ------ | ------ | ---- | ---- | ------ | ------------ | ------ |
| Yes | No | Yes | Yes | No | Yes | No | No |
## SystemCapability.UserIAM.UserAuth.FaceAuth
Facial authentication
| Default | Sports Watch| Smart Watch| Tablet| Head Unit| Smart TV| Smart Vision | Router |
| ------- | ------ | ------ | ---- | ---- | ------ | ------------ | ------ |
| Yes | No | Yes | Yes | No | Yes | No | No |
## SystemCapability.MiscServices.InputMethodFramework
Input method framework
| Default | Sports Watch| Smart Watch| Tablet| Head Unit| Smart TV| Smart Vision | Router |
| ------- | ------ | ------ | ---- | ---- | ------ | ------------ | ------ |
| Yes | No | No | Yes | No | No | No | No |
## SystemCapability.MiscServices.Pasteboard
Pasteboard service
| Default | Sports Watch| Smart Watch| Tablet| Head Unit| Smart TV| Smart Vision | Router |
| ------- | ------ | ------ | ---- | ---- | ------ | ------------ | ------ |
| Yes | No | No | Yes | No | No | No | No |
## SystemCapability.MiscServices.Time
Time, time zone, and timing service
| Default | Sports Watch| Smart Watch| Tablet| Head Unit| Smart TV| Smart Vision | Router |
| ------- | ------ | ------ | ---- | ---- | ------ | ------------ | ------ |
| Yes | No | Yes | Yes | No | Yes | No | No |
## SystemCapability.MiscServices.Wallpaper
Wallpaper framework
| Default | Sports Watch| Smart Watch| Tablet| Head Unit| Smart TV| Smart Vision | Router |
| ------- | ------ | ------ | ---- | ---- | ------ | ------------ | ------ |
| Yes | No | No | Yes | No | No | No | No |
## SystemCapability.MiscServices.ScreenLock
Screen lock service
| Default | Sports Watch| Smart Watch| Tablet| Head Unit| Smart TV| Smart Vision | Router |
| ------- | ------ | ------ | ---- | ---- | ------ | ------------ | ------ |
| Yes | No | No | Yes | No | No | No | No |
## SystemCapability.MiscServices.Upload
Upload service
| Default | Sports Watch| Smart Watch| Tablet| Head Unit| Smart TV| Smart Vision | Router |
| ------- | ------ | ------ | ---- | ---- | ------ | ------------ | ------ |
| Yes | No | No | Yes | No | No | No | No |
## SystemCapability.MiscServices.Download
Download service
| Default | Sports Watch| Smart Watch| Tablet| Head Unit| Smart TV| Smart Vision | Router |
| ------- | ------ | ------ | ---- | ---- | ------ | ------------ | ------ |
| Yes | No | No | Yes | No | No | No | No |
## SystemCapability.FileManagement.StorageService.Backup
Backup and restoration
| Default | Sports Watch| Smart Watch| Tablet| Head Unit| Smart TV| Smart Vision | Router |
| ------- | ------ | ------ | ---- | ---- | ------ | ------------ | ------ |
| Yes | No | No | Yes | Yes | Yes | No | No |
## SystemCapability.FileManagement.StorageService.SpatialStatistics
Spatial statistics
| Default | Sports Watch| Smart Watch| Tablet| Head Unit| Smart TV| Smart Vision | Router |
| ------- | ------ | ------ | ---- | ---- | ------ | ------------ | ------ |
| Yes | No | Yes | Yes | Yes | Yes | No | No |
## SystemCapability.FileManagement.StorageService.Volume
Volume management
| Default | Sports Watch| Smart Watch| Tablet| Head Unit| Smart TV| Smart Vision | Router |
| ------- | ------ | ------ | ---- | ---- | ------ | ------------ | ------ |
| Yes | No | No | Yes | Yes | Yes | No | No |
## SystemCapability.FileManagement.StorageService.Encryption
File encryption capability
| Default | Sports Watch| Smart Watch| Tablet| Head Unit| Smart TV| Smart Vision | Router |
| ------- | ------ | ------ | ---- | ---- | ------ | ------------ | ------ |
| Yes | No | No | Yes | Yes | Yes | No | No |
## SystemCapability.FileManagement.File.FileIO
Basic file I/O interfaces
| Default | Sports Watch| Smart Watch| Tablet| Head Unit| Smart TV| Smart Vision | Router |
| ------- | ------ | ------ | ---- | ---- | ------ | ------------ | ------ |
| Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes |
## SystemCapability.FileManagement.File.Environment
Environment-related interfaces
| Default | Sports Watch| Smart Watch| Tablet| Head Unit| Smart TV| Smart Vision | Router |
| ------- | ------ | ------ | ---- | ---- | ------ | ------------ | ------ |
| Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes |
## SystemCapability.FileManagement.File.DistributedFile
Distributed file extension interfaces
| Default | Sports Watch| Smart Watch| Tablet| Head Unit| Smart TV| Smart Vision | Router |
| ------- | ------ | ------ | ---- | ---- | ------ | ------------ | ------ |
| Yes | No | No | Yes | Yes | Yes | No | No |
## SystemCapability.FileManagement.AppFileService
Application file sharing
| Default | Sports Watch| Smart Watch| Tablet| Head Unit| Smart TV| Smart Vision | Router |
| ------- | ------ | ------ | ---- | ---- | ------ | ------------ | ------ |
| Yes | No | No | Yes | Yes | Yes | No | No |
## SystemCapability.FileManagement.UserFileService
User file access service
| Default | Sports Watch| Smart Watch| Tablet| Head Unit| Smart TV| Smart Vision | Router |
| ------- | ------ | ------ | ---- | ---- | ------ | ------------ | ------ |
| Yes | No | Yes | Yes | Yes | Yes | No | No |
## SystemCapability.USB.USBManager
USB service
| Default | Sports Watch| Smart Watch| Tablet| Head Unit| Smart TV| Smart Vision | Router |
| ------- | ------ | ------ | ---- | ---- | ------ | ------------ | ------ |
| Yes | No | No | Yes | Yes | Yes | No | No |
## SystemCapability.Sensors.Sensor
Sensor service subscription
| Default | Sports Watch| Smart Watch| Tablet| Head Unit| Smart TV| Smart Vision | Router |
| ------- | ------ | ------ | ---- | ---- | ------ | ------------ | ------ |
| Yes | No | Yes | Yes | No | No | No | No |
## SystemCapability.Sensors.MiscDevice
Miscellaneous devices- sensors
| Default | Sports Watch| Smart Watch| Tablet| Head Unit| Smart TV| Smart Vision | Router |
| ------- | ------ | ------ | ---- | ---- | ------ | ------------ | ------ |
| Yes | No | Yes | Yes | No | No | No | No |
## SystemCapability.Startup.SystemInfo
Basic system information
| Default | Sports Watch| Smart Watch| Tablet| Head Unit| Smart TV| Smart Vision | Router |
| ------- | ------ | ------ | ---- | ---- | ------ | ------------ | ------ |
| Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes |
## SystemCapability.DistributedDataManager.RelationalStore.Core
Basic relational database capabilities
| Default | Sports Watch| Smart Watch| Tablet| Head Unit| Smart TV| Smart Vision | Router |
| ------- | ------ | ------ | ---- | ---- | ------ | ------------ | ------ |
| Yes | No | Yes | Yes | Yes | Yes | No | No |
## SystemCapability.DistributedDataManager.RelationalStore.Synchronize
Distributed capability of relational databases
| Default | Sports Watch| Smart Watch| Tablet| Head Unit| Smart TV| Smart Vision | Router |
| ------- | ------ | ------ | ---- | ---- | ------ | ------------ | ------ |
| Yes | No | No | Yes | Yes | Yes | No | No |
## SystemCapability.DistributedDataManager.RelationalStore.Lite
Lightweight relational database
| Default | Sports Watch| Smart Watch| Tablet| Head Unit| Smart TV| Smart Vision | Router |
| ------- | ------ | ------ | ---- | ---- | ------ | ------------ | ------ |
| No | No | No | No | No | No | No | No |
## SystemCapability.DistributedDataManager.KVStore.Core
Core capabilities of key-value databases
| Default | Sports Watch| Smart Watch| Tablet| Head Unit| Smart TV| Smart Vision | Router |
| ------- | ------ | ------ | ---- | ---- | ------ | ------------ | ------ |
| Yes | No | Yes | Yes | Yes | Yes | No | No |
## SystemCapability.DistributedDataManager.KVStore.Lite
Core capabilities of lightweight key-value databases
| Default | Sports Watch| Smart Watch| Tablet| Head Unit| Smart TV| Smart Vision | Router |
| ------- | ------ | ------ | ---- | ---- | ------ | ------------ | ------ |
| No | No | No | No | No | No | No | No |
## SystemCapability.DistributedDataManager.KVStore.DistributedKVStore
Distributed key-value database
| Default | Sports Watch| Smart Watch| Tablet| Head Unit| Smart TV| Smart Vision | Router |
| ------- | ------ | ------ | ---- | ---- | ------ | ------------ | ------ |
| Yes | No | Yes | Yes | Yes | Yes | No | No |
## SystemCapability.DistributedDataManager.DataObject.DistributedObject
Distributed data object
| Default | Sports Watch| Smart Watch| Tablet| Head Unit| Smart TV| Smart Vision | Router |
| ------- | ------ | ------ | ---- | ---- | ------ | ------------ | ------ |
| Yes | No | Yes | Yes | Yes | Yes | No | No |
## SystemCapability.DistributedDataManager.Preferences.Core
Core capabilities of preferences data storage
| Default | Sports Watch| Smart Watch| Tablet| Head Unit| Smart TV| Smart Vision | Router |
| ------- | ------ | ------ | ---- | ---- | ------ | ------------ | ------ |
| Yes | No | Yes | Yes | Yes | Yes | No | No |
## SystemCapability.DistributedDataManager.DataShare.Core
Basic capabilities of cross-process data sharing
| Default | Sports Watch| Smart Watch| Tablet| Head Unit| Smart TV| Smart Vision | Router |
| ------- | ------ | ------ | ---- | ---- | ------ | ------------ | ------ |
| Yes | No | Yes | Yes | Yes | Yes | No | No |
## SystemCapability.DistributedDataManager.DataShare.Consumer
Data conumser of cross-process data sharing
| Default | Sports Watch| Smart Watch| Tablet| Head Unit| Smart TV| Smart Vision | Router |
| ------- | ------ | ------ | ---- | ---- | ------ | ------------ | ------ |
| Yes | No | Yes | Yes | Yes | Yes | No | No |
## SystemCapability.DistributedDataManager.DataShare.Provider
Data provider of cross-process data sharing
| Default | Sports Watch| Smart Watch| Tablet| Head Unit| Smart TV| Smart Vision | Router |
| ------- | ------ | ------ | ---- | ---- | ------ | ------------ | ------ |
| Yes | No | Yes | Yes | Yes | Yes | No | No |
## SystemCapability.Ability.AbilityBase
Definition of basic component running data, including wants and system configuration
| Default | Sports Watch| Smart Watch| Tablet| Head Unit| Smart TV| Smart Vision | Router |
| ------- | ------ | ------ | ---- | ---- | ------ | ------------ | ------ |
| Yes | No | Yes | Yes | Yes | Yes | No | No |
## SystemCapability.Ability.AbilityRuntime.Core
Core basic functional modules for component runtime, including application initialization and GUI-less component running
| Default | Sports Watch| Smart Watch| Tablet| Head Unit| Smart TV| Smart Vision | Router |
| ------- | ------ | ------ | ---- | ---- | ------ | ------------ | ------ |
| Yes | No | Yes | Yes | Yes | Yes | No | No |
## SystemCapability.Ability.AbilityRuntime.FAModel
Feature ability (FA) model
| Default | Sports Watch| Smart Watch| Tablet| Head Unit| Smart TV| Smart Vision | Router |
| ------- | ------ | ------ | ---- | ---- | ------ | ------------ | ------ |
| Yes | No | Yes | Yes | Yes | Yes | No | No |
## SystemCapability.Ability.AbilityRuntime.AbilityCore
Universal components (with GUIs)
| Default | Sports Watch| Smart Watch| Tablet| Head Unit| Smart TV| Smart Vision | Router |
| ------- | ------ | ------ | ---- | ---- | ------ | ------------ | ------ |
| Yes | No | Yes | Yes | Yes | Yes | No | No |
## SystemCapability.Ability.AbilityRuntime.Mission
Task management
| Default | Sports Watch| Smart Watch| Tablet| Head Unit| Smart TV| Smart Vision | Router |
| ------- | ------ | ------ | ---- | ---- | ------ | ------------ | ------ |
| Yes | No | Yes | Yes | Yes | Yes | No | No |
## SystemCapability.Ability.AbilityTools.AbilityAssistant
CLI tool
| Default | Sports Watch| Smart Watch| Tablet| Head Unit| Smart TV| Smart Vision | Router |
| ------- | ------ | ------ | ---- | ---- | ------ | ------------ | ------ |
| Yes | No | Yes | Yes | Yes | Yes | No | No |
## SystemCapability.Ability.Form
Widget management
| Default | Sports Watch| Smart Watch| Tablet| Head Unit| Smart TV| Smart Vision | Router |
| ------- | ------ | ------ | ---- | ---- | ------ | ------------ | ------ |
| Yes | No | Yes | Yes | Yes | Yes | No | No |
## SystemCapability.Ability.DistributedAbilityManager
continuationManager for starting the device selection module and updating the continuation status.
| Default | Sports Watch| Smart Watch| Tablet| Head Unit| Smart TV| Smart Vision | Router |
| ------- | ------ | ------ | ---- | ---- | ------ | ------------ | ------ |
| Yes | No | Yes | Yes | Yes | Yes | No | No |
## SystemCapability.Applications.ContactsData
Contacts database
| Default | Sports Watch| Smart Watch| Tablet| Head Unit| Smart TV| Smart Vision | Router |
| ------- | ------ | ------ | ---- | ---- | ------ | ------------ | ------ |
| Yes | No | Yes | Yes | Yes | No | No | No |
## SystemCapability.Applications.Contacts
Contacts
| Default | Sports Watch| Smart Watch| Tablet| Head Unit| Smart TV| Smart Vision | Router |
| ------- | ------ | ------ | ---- | ---- | ------ | ------------ | ------ |
| Yes | No | Yes | Yes | Yes | No | No | No |
## SystemCapability.Applictaions.settings.Core
API setting
| Default | Sports Watch| Smart Watch| Tablet| Head Unit| Smart TV| Smart Vision | Router |
| ------- | ------ | ------ | ---- | ---- | ------ | ------------ | ------ |
| Yes | No | Yes | Yes | Yes | Yes | No | No |
## SystemCapability.Test.UiTest
UiTest capability
| Default | Sports Watch| Smart Watch| Tablet| Head Unit| Smart TV| Smart Vision | Router |
| ------- | ------ | ------ | ---- | ---- | ------ | ------------ | ------ |
| Yes | No | No | Yes | Yes | No | No | No |
## SystemCapability.Web.Webview.Core
Webview component
| Default | Sports Watch| Smart Watch| Tablet| Head Unit| Smart TV| Smart Vision | Router |
| ------- | ------ | ------ | ---- | ---- | ------ | ------------ | ------ |
| Yes | No | Yes | Yes | Yes | Yes | No | No |
## SystemCapability.Cloud.AAID
AAID management service
| Default | Sports Watch| Smart Watch| Tablet| Head Unit| Smart TV| Smart Vision | Router |
| ------- | ------ | ------ | ---- | ---- | ------ | ------------ | ------ |
| Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes |
## SystemCapability.Cloud.OAID
OAID management service
| Default | Sports Watch| Smart Watch| Tablet| Head Unit| Smart TV| Smart Vision | Router |
| ------- | ------ | ------ | ---- | ---- | ------ | ------------ | ------ |
| Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes |
## SystemCapability.Cloud.VAID
VAID management service
| Default | Sports Watch| Smart Watch| Tablet| Head Unit| Smart TV| Smart Vision | Router |
| ------- | ------ | ------ | ---- | ---- | ------ | ------------ | ------ |
| Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes |
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册