提交 77d1a239 编写于 作者: 葛亚芳 提交者: Gitee

Merge branch 'OpenHarmony-4.0-Beta2' of gitee.com:openharmony/docs into OpenHarmony-4.0-Beta2

Signed-off-by: N葛亚芳 <geyafang@huawei.com>
......@@ -86,13 +86,13 @@ The application file paths obtained by the preceding contexts are different.
| Name| Path|
| -------- | -------- |
| bundleCodeDir | \<Path prefix>/el1/bundle/|
| cacheDir | \<Path prefix>/\<Encryption level>/base/cache/|
| filesDir | \<Path prefix>/\<Encryption level>/base/files/|
| preferencesDir | \<Path prefix>/\<Encryption level>/base/preferences/|
| tempDir | \<Path prefix>/\<Encryption level>/base/temp/|
| databaseDir | \<Path prefix>/\<Encryption level>/database/|
| distributedFilesDir | \<Path prefix>/el2/distributedFiles/|
| bundleCodeDir | \<Path prefix>/el1/bundle|
| cacheDir | \<Path prefix>/\<Encryption level>/base/cache|
| filesDir | \<Path prefix>/\<Encryption level>/base/files|
| preferencesDir | \<Path prefix>/\<Encryption level>/base/preferences|
| tempDir | \<Path prefix>/\<Encryption level>/base/temp|
| databaseDir | \<Path prefix>/\<Encryption level>/database|
| distributedFilesDir | \<Path prefix>/el2/distributedFiles|
The sample code is as follows:
......@@ -110,6 +110,9 @@ The application file paths obtained by the preceding contexts are different.
let distributedFilesDir = applicationContext.distributedFilesDir;
let preferencesDir = applicationContext.preferencesDir;
...
// Obtain the application file path.
let filePath = tempDir + 'test.txt';
console.info(`filePath: ${filePath}`);
}
}
```
......@@ -118,13 +121,13 @@ The application file paths obtained by the preceding contexts are different.
| Name| Path|
| -------- | -------- |
| bundleCodeDir | \<Path prefix>/el1/bundle/|
| cacheDir | \<Path prefix>/\<Encryption level>/base/**haps/\<module-name>**/cache/|
| filesDir | \<Path prefix>/\<Encryption level>/base/**haps/\<module-name>**/files/|
| preferencesDir | \<Path prefix>/\<Encryption level>/base/**haps/\<module-name>**/preferences/|
| tempDir | \<Path prefix>/\<Encryption level>/base/**haps/\<module-name>**/temp/|
| databaseDir | \<Path prefix>/\<Encryption level>/database/**\<module-name>**/|
| distributedFilesDir | \<Path prefix>/el2/distributedFiles/**\<module-name>**/|
| bundleCodeDir | \<Path prefix>/el1/bundle|
| cacheDir | \<Path prefix>/\<Encryption level>/base/**haps/\<module-name>**/cache|
| filesDir | \<Path prefix>/\<Encryption level>/base/**haps/\<module-name>**/files|
| preferencesDir | \<Path prefix>/\<Encryption level>/base/**haps/\<module-name>**/preferences|
| tempDir | \<Path prefix>/\<Encryption level>/base/**haps/\<module-name>**/temp|
| databaseDir | \<Path prefix>/\<Encryption level>/database/**\<module-name>**|
| distributedFilesDir | \<Path prefix>/el2/distributedFiles/**\<module-name>**|
The sample code is as follows:
......@@ -141,6 +144,9 @@ The application file paths obtained by the preceding contexts are different.
let distributedFilesDir = this.context.distributedFilesDir;
let preferencesDir = this.context.preferencesDir;
...
// Obtain the application file path.
let filePath = tempDir + 'test.txt';
console.info(`filePath: ${filePath}`);
}
}
```
......
......@@ -53,9 +53,9 @@ The table below describes the main APIs used for cross-device migration. For det
| **API**| Description|
| -------- | -------- |
| onContinue(wantParam : {[key: string]: any}): OnContinueResult | Called by the initiator to store the data required for migration and indicate whether the migration is accepted.<br>- **AGREE**: The migration is accepted.<br>- **REJECT**: The migration is rejected, for example, when an application is abnormal in **onContinue()**.<br>- **MISMATCH**: The version does not match. The application on the initiator can obtain the version number of the target application from **onContinue()**. If the migration cannot be performed due to version mismatch, this error code is returned.|
| onCreate(want: Want, param: AbilityConstant.LaunchParam): void; | Called by the target to restore the data and UI page in the multiton migration scenario. For details, see [UIAbility Component Launch Type](uiability-launch-type.md).|
| onNewWant(want: Want, launchParams: AbilityConstant.LaunchParam): void; | Called by the target to restore the data and UI page in the singleton migration scenario. For details, see [UIAbility Component Launch Type](uiability-launch-type.md).|
| onContinue(wantParam : {[key: string]: Object}): OnContinueResult | Called by the initiator to store the data required for migration and indicate whether the migration is accepted.<br>- **AGREE**: The migration is accepted.<br>- **REJECT**: The migration is rejected, for example, when an application is abnormal in **onContinue()**.<br>- **MISMATCH**: The version does not match. The application on the initiator can obtain the version number of the target application from **onContinue()**. If the migration cannot be performed due to version mismatch, this error code is returned.|
| onCreate(want: Want, param: AbilityConstant.LaunchParam): void; | Called by the target to restore the data and UI page when the target uses cold start or the target is a multiton application and uses hot start. For details, see [UIAbility Component Launch Type](uiability-launch-type.md).|
| onNewWant(want: Want, launchParams: AbilityConstant.LaunchParam): void; | Called by the target to restore the data and UI page when the target is a singleton application and uses hot start. For details, see [UIAbility Component Launch Type](uiability-launch-type.md).|
......@@ -90,7 +90,7 @@ The table below describes the main APIs used for cross-device migration. For det
4. Implement [onContinue()](../reference/apis/js-apis-app-ability-uiAbility.md#abilityoncontinue) in the UIAbility of the initiator.
[onContinue()](../reference/apis/js-apis-app-ability-uiAbility.md#abilityoncontinue) is called on the initiator. You can save the data in this method to implement application compatibility check and migration decision.
[onContinue()](../reference/apis/js-apis-app-ability-uiAbility.md#abilityoncontinue) is called on the initiator. You can save the data in this method to implement application compatibility check and migration decision.
- Saving migrated data: You can save the data to be migrated in key-value pairs in **wantParam**.
- Checking application compatibility: You can obtain the version number of the target application from **wantParam** and that of the current application from **wantParam.version** of the **onContinue()** callback. Then you can check the compatibility between the two.
......@@ -114,7 +114,7 @@ The table below describes the main APIs used for cross-device migration. For det
```
5. Implement **onCreate()** and **onNewWant()** in the UIAbility of the target application to implement data restoration.
- Implementation example of **onCreate** in the multiton scenario
- Implementation example of **onCreate**
- The target device determines whether the startup is **LaunchReason.CONTINUATION** based on **launchReason** in **onCreate()**.
- You can obtain the saved migration data from the **want** parameter.
- After data restoration is complete, call **restoreWindowStage** to trigger page restoration, including page stack information.
......@@ -139,11 +139,29 @@ The table below describes the main APIs used for cross-device migration. For det
}
}
```
- For a singleton ability, use **onNewWant()** to achieve the same implementation.
- For a singleton application, you must also implement **onNewWant()**, in the same way as **onCreate()**.
- Determine the migration scenario in **onNewWant()**, restore data, and trigger page restoration.
```ts
export default class EntryAbility extends UIAbility {
storage : LocalStorage;
onNewWant(want, launchParam) {
console.info(`EntryAbility onNewWant ${AbilityConstant.LaunchReason.CONTINUATION}`)
if (launchParam.launchReason == AbilityConstant.LaunchReason.CONTINUATION) {
// Obtain the user data from the want parameter.
let workInput = want.parameters.work
console.info(`work input ${workInput}`)
AppStorage.SetOrCreate<string>('ContinueWork', workInput)
this.storage = new LocalStorage();
this.context.restoreWindowStage(this.storage);
}
}
}
```
6. (Optional) Call [setMissionContinueState](../reference/apis/js-apis-inner-application-uiAbilityContext.md#uiabilitycontextsetmissioncontinuestate10) to set the mission continuation state.
For an application that supports migration, mission migration is enabled by default, and the system notifies peripheral trusted devices that a mission can be migrated or canceled based on the gain/loss focus state of the mission. If you want the system to send a notification to peripheral devices only when your application is in a specific scenario, set the migration continuation state to **INACTIVE** when the application is started and change it to **ACTIVE** when the application enters that specific scenario. For details about the API, see [setMissionContinueState](../reference/apis/js-apis-inner-application-uiAbilityContext.md#uiabilitycontextsetmissioncontinuestate10).
For an application that supports migration, mission migration is enabled by default, and the system notifies peripheral trusted devices that a mission can be migrated or canceled based on the gain/loss focus state of the mission. If you want the system to send a notification to peripheral devices only when your application is in a specific scenario, set the migration continuation state to **INACTIVE** when the application is started and change it to **ACTIVE** when the application enters that specific scenario.
- Example: An application does not require migration during startup.
......@@ -180,7 +198,7 @@ The table below describes the main APIs used for cross-device migration. For det
onContinue(wantParam : {[key: string]: any}) {
console.info(`onContinue version = ${wantParam.version}, targetDevice: ${wantParam.targetDevice}`)
wantParam[wantConstant.SUPPORT_CONTINUE_PAGE_STACK_KEY] = false;
wantParam[wantConstant.Params.SUPPORT_CONTINUE_PAGE_STACK_KEY] = false;
return AbilityConstant.OnContinueResult.AGREE;
}
......@@ -202,7 +220,7 @@ The table below describes the main APIs used for cross-device migration. For det
onContinue(wantParam : {[key: string]: any}) {
console.info(`onContinue version = ${wantParam.version}, targetDevice: ${wantParam.targetDevice}`)
wantParam[wantConstant.SUPPORT_CONTINUE_SOURCE_EXIT_KEY] = false;
wantParam[wantConstant.Params.SUPPORT_CONTINUE_SOURCE_EXIT_KEY] = false;
return AbilityConstant.OnContinueResult.AGREE;
}
```
# mediaLibrary Switching
| API in the FA Model| Corresponding .d.ts File in the Stage Model| Corresponding API in the Stage Model|
| API in the FA Model| Corresponding .d.ts File in the Stage Model| Corresponding API in the Stage Model|
| -------- | -------- | -------- |
| [getMediaLibrary(): MediaLibrary;](../reference/apis/js-apis-medialibrary.md#medialibrarygetmedialibrary) | \@ohos.multimedia.mediaLibrary.d.ts | [getMediaLibrary(context: Context): MediaLibrary;](../reference/apis/js-apis-medialibrary.md#medialibrarygetmedialibrary8) |
| [getMediaLibrary():&nbsp;MediaLibrary;](../reference/apis/js-apis-medialibrary.md#medialibrarygetmedialibrary) | \@ohos.file.photoAccessHelper.d.ts | [getPhotoAccessHelper(context: Context): PhotoAccessHelper;](../reference/apis/js-apis-photoAccessHelper.md#photoaccesshelpergetphotoaccesshelper) |
......@@ -15,65 +15,64 @@ For details about the APIs, see [Sensor](../reference/apis/js-apis-sensor.md).
| ohos.sensor | sensor.on(sensorId, callback:AsyncCallback&lt;Response&gt;): void | Subscribes to data changes of a type of sensor.|
| ohos.sensor | sensor.once(sensorId, callback:AsyncCallback&lt;Response&gt;): void | Subscribes to only one data change of a type of sensor.|
| ohos.sensor | sensor.off(sensorId, callback?:AsyncCallback&lt;void&gt;): void | Unsubscribes from sensor data changes.|
| ohos.sensor | sensor.getSensorList(callback: AsyncCallback\<Array\<Sensor>>): void| Obtains information about all sensors on the device. This API uses an asynchronous callback to return the result.|
## How to Develop
1. Before obtaining data from a type of sensor, check whether the required permission has been configured.<br>
The system provides the following sensor-related permissions:
- ohos.permission.ACCELEROMETER
The acceleration sensor is used as an example.
- ohos.permission.GYROSCOPE
1. Import the module.
- ohos.permission.ACTIVITY_MOTION
- ohos.permission.READ_HEALTH_DATA
For details about how to configure a permission, see [Declaring Permissions](../security/accesstoken-guidelines.md).
2. Subscribe to data changes of a type of sensor. The following uses the acceleration sensor as an example.
```ts
import sensor from "@ohos.sensor";
sensor.on(sensor.SensorId.ACCELEROMETER, function (data) {
console.info("Succeeded in obtaining data. x: " + data.x + "y: " + data.y + "z: " + data.z); // Data is obtained.
});
```
![171e6f30-a8d9-414c-bafa-b430340305fb](figures/171e6f30-a8d9-414c-bafa-b430340305fb.png)
3. Unsubscribe from sensor data changes.
```ts
import sensor from "@ohos.sensor";
sensor.off(sensor.SensorId.ACCELEROMETER);
```
![65d69983-29f6-4381-80a3-f9ef2ec19e53](figures/65d69983-29f6-4381-80a3-f9ef2ec19e53.png)
2. Obtain information about all sensors on the device.
```ts
sensor.getSensorList(function (error, data) {
if (error) {
console.info('getSensorList failed');
} else {
console.info('getSensorList success');
for (let i = 0; i < data.length; i++) {
console.info(JSON.stringify(data[i]));
}
}
});
```
4. Subscribe to only one data change of a type of sensor.
```ts
import sensor from "@ohos.sensor";
![](figures/001.png)
sensor.once(sensor.SensorId.ACCELEROMETER, function (data) {
console.info("Succeeded in obtaining data. x: " + data.x + "y: " + data.y + "z: " + data.z); // Data is obtained.
});
```
![db5d017d-6c1c-4a71-a2dd-f74b7f23239e](figures/db5d017d-6c1c-4a71-a2dd-f74b7f23239e.png)
The minimum and the maximum sampling periods supported by the sensor are 5000000 ns and 200000000 ns, respectively. Therefore, the value of **interval** must be within this range.
3. Check whether the corresponding permission has been configured. For details, see [Applying for Permissions](../security/accesstoken-guidelines.md).
If the API fails to be called, you are advised to use the **try/catch** statement to capture error information that may occur in the code. Example:
4. Register a listener. You can call **on()** or **once()** to listen for sensor data changes.
- The **on()** API is used to continuously listen for data changes of the sensor. The sensor reporting interval is set to 100000000 ns.
```ts
sensor.on(sensor.SensorId.ACCELEROMETER, function (data) {
console.info("Succeeded in obtaining data. x: " + data.x + " y: " + data.y + " z: " + data.z);
}, {'interval': 100000000});
```
![](figures/002.png)
- The **once()** API is used to listen for only one data change of the sensor.
```ts
import sensor from "@ohos.sensor";
sensor.once(sensor.SensorId.ACCELEROMETER, function (data) {
console.info("Succeeded in obtaining data. x: " + data.x + " y: " + data.y + " z: " + data.z);
});
```
![](figures/003.png)
try {
sensor.once(sensor.SensorId.ACCELEROMETER, function (data) {
console.info("Succeeded in obtaining data. x: " + data.x + "y: " + data.y + "z: " + data.z); // Data is obtained.
});
} catch (error) {
console.error(`Failed to get sensor data. Code: ${error.code}, message: ${error.message}`);
}
5. Cancel continuous listening.
```ts
sensor.off(sensor.SensorId.ACCELEROMETER);
```
......@@ -76,9 +76,9 @@ This JSON file contains two attributes: **MetaData** and **Channels**.
- **Create**: time when the file was created. This parameter is optional.
- **Description**: additional information such as the vibration effect and creation information. This parameter is optional.
- **Channels** provides information about the vibration channel. It is a JSON array that holds information about each channel. It contains two attributes: **Parameters** and **Pattern**.
- **Parameters** provides parameters related to the channel. Under it, **Index** indicates the channel ID. The value is fixed at **1** for a single channel. This parameter is mandatory.
- **Parameters** provides parameters related to the channel. Under it, **Index** indicates the channel ID. The value is fixed at **1** for a single channel. This parameter is mandatory.
- **Pattern** indicates the vibration sequence. It is a JSON array. Under it, **Event** indicates a vibration event, which can be either of the following types:
- **transient**: short vibration
- **transient**: short vibration
- **continuous**: long vibration
The table below describes the parameters under **Event**.
......@@ -89,7 +89,7 @@ The table below describes the parameters under **Event**.
| StartTime | Start time of the vibration. This parameter is mandatory.| [0, 1800 000], in ms, without overlapping|
| Duration | Duration of the vibration. This parameter is valid only when **Type** is **continuous**.| (10, 1600), in ms|
| Intensity | Intensity of the vibration. This parameter is mandatory.| [0, 100], a relative value that does not represent the actual vibration strength.|
| Frequency | Frequency of the vibration. This parameter is mandatory.| [0, 100], a relative value that does not represent the actual vibration frequency|
| Frequency | Frequency of the vibration. This parameter is mandatory.| [0, 100], a relative value that does not represent the actual vibration frequency.|
The following requirements must be met:
......@@ -221,45 +221,42 @@ The following requirements must be met:
```ts
import vibrator from '@ohos.vibrator';
const FILE_NAME = "xxx.json";
// Obtain the file descriptor of the vibration configuration file.
let fileDescriptor = undefined;
getContext().resourceManager.getRawFd(FILE_NAME).then(value => {
fileDescriptor = { fd: value.fd, offset: value.offset, length: value.length };
console.info('Succeed in getting resource file descriptor');
}).catch(error => {
console.error(`Failed to get resource file descriptor. Code: ${error.code}, message: ${error.message}`);
});
// To use startVibration and stopVibration, you must configure the ohos.permission.VIBRATE permission.
try {
// Start custom vibration.
vibrator.startVibration({
type: "file",
hapticFd: { fd: fileDescriptor.fd, offset: fileDescriptor.offset, length: fileDescriptor.length }
}, {
usage: "alarm"
}).then(() => {
console.info('Succeed in starting vibration');
}, (error) => {
console.error(`Failed to start vibration. Code: ${error.code}, message: ${error.message}`);
});
// Stop vibration in all modes.
vibrator.stopVibration(function (error) {
if (error) {
console.error(`Failed to stop vibration. Code: ${error.code}, message: ${error.message}`);
return;
}
console.info('Succeed in stopping vibration');
})
} catch (error) {
console.error(`An unexpected error occurred. Code: ${error.code}, message: ${error.message}`);
async function getRawfileFd(fileName) {
let rawFd = await globalThis.getContext().resourceManager.getRawFd(fileName);
return rawFd;
}
// Close the file descriptor of the vibration configuration file.
async function closeRawfileFd(fileName) {
await globalThis.getContext().resourceManager.closeRawFd(fileName)
}
// Play the custom vibration. To use startVibration and stopVibration, you must configure the ohos.permission.VIBRATE permission.
async function playCustomHaptic(fileName) {
try {
let rawFd = await getRawfileFd(fileName);
vibrator.startVibration({
type: "file",
hapticFd: { fd: rawFd.fd, offset: rawFd.offset, length: rawFd.length }
}, {
usage: "alarm"
}).then(() => {
console.info('Succeed in starting vibration');
}, (error) => {
console.error(`Failed to start vibration. Code: ${error.code}, message: ${error.message}`);
});
vibrator.stopVibration(function (error) {
if (error) {
console.error(`Failed to stop vibration. Code: ${error.code}, message: ${error.message}`);
return;
}
console.info('Succeed in stopping vibration');
})
await closeRawfileFd(fileName);
} catch (error) {
console.error(`An unexpected error occurred. Code: ${error.code}, message: ${error.message}`);
}
}
// Close the vibration file.
getContext().resourceManager.closeRawFd(FILE_NAME).then(() => {
console.info('Succeed in closing resource file descriptor');
}).catch(error => {
console.error(`Failed to close resource file descriptor. Code: ${error.code}, message: ${error.message}`);
});
```
......@@ -21,7 +21,7 @@ hiTraceMeter provides APIs for system performance tracing. You can call the APIs
## Available APIs
The performance tracing APIs are provided by the **hiTraceMeter** module. For details, see [API Reference]( ../reference/apis/js-apis-hitracemeter.md).
The performance tracing APIs are provided by the **hiTraceMeter** module. For details, see [API Reference](../reference/apis/js-apis-hitracemeter.md).
**APIs for performance tracing**
......@@ -80,15 +80,15 @@ In this example, distributed call chain tracing begins when the application star
```
2. Create an ArkTs application project. In the displayed **Project** window, choose **entry** > **src** > **main** > **ets** > **pages** > **index**, and double-click **index.js**. Add the code to implement performance tracing upon page loading. For example, if the name of the trace task is **HITRACE\_TAG\_APP**, the sample code is as follows:
```ts
import hitrace from '@ohos.hiTraceMeter';
@Entry
@Component
struct Index {
@State message: string = 'Hello World';
build() {
Row() {
Column() {
......@@ -97,7 +97,7 @@ In this example, distributed call chain tracing begins when the application star
.fontWeight(FontWeight.Bold)
.onClick(() => {
this.message = 'Hello ArkUI';
// Start trace tasks with the same name concurrently.
hitrace.startTrace("HITRACE_TAG_APP", 1001);
// Keep the service process running.
......@@ -107,7 +107,7 @@ In this example, distributed call chain tracing begins when the application star
hitrace.startTrace("HITRACE_TAG_APP", 1002);
// Keep the service process running.
console.log(`HITRACE_TAG_APP running`);
hitrace.finishTrace("HITRACE_TAG_APP", 1001);
hitrace.finishTrace("HITRACE_TAG_APP", 1002);
......@@ -143,7 +143,7 @@ In this example, distributed call chain tracing begins when the application star
```
3. Click the run button on the application page. Then, run the following commands in sequence in shell:
```shell
hdc shell
hitrace --trace_begin app
......
......@@ -217,7 +217,7 @@ Use **Context.cacheDir** to obtain the cache directory of the application.
**Reference**
[Obtaining the Application Development Path](../application-models/application-context-stage.md#obtaining-the-application-development-path)
[Obtaining Application File Paths](../application-models/application-context-stage.md#obtaining-application-file-paths)
## In which JS file is the service widget lifecycle callback invoked?
......@@ -262,7 +262,7 @@ Obtain them from the application context. Specifically, use **this.context.getAp
**Reference**
[Obtaining the Application Development Path](../application-models/application-context-stage.md#obtaining-the-application-development-path)
[Obtaining Application File Paths](../application-models/application-context-stage.md#obtaining-application-file-paths)
## Why the application is not deleted from the background mission list after it calls terminateSelf?
......@@ -472,7 +472,7 @@ To start a continuous task in the background, you must configure the permission
[Continuous Task Permission](../security/permission-list.md#ohospermissionkeep_background_running)
[Continuous Task Development](../task-management/continuous-task-dev-guide.md#development-in-the-stage-model)
[Continuous Task Development](../task-management/continuous-task.md#stage-model)
## How do FA widgets exchange data?
......
......@@ -191,7 +191,7 @@ struct PageTransition2 {
**Reference**
[Page Transition Animation](../ui/arkts-page-transition-animation.md)
[Page Transition](../reference/arkui-ts/ts-page-transition-animation.md)
## How do I configure custom components to slide in and out from the bottom?
......@@ -266,4 +266,4 @@ struct ComponentChild2 {
**Reference**
[Transition Animation Within the Component](../ui/arkts-transition-animation-within-component.md)
[Transition Animation Within the Component](../ui/arkts-enter-exit-transition.md)
......@@ -98,7 +98,7 @@ Music cannot be played in the background.
**Reference**
[Continuous Task Development](../task-management/continuous-task-dev-guide.md)
[Continuous Task Development](../task-management/continuous-task.md)
[AVSession Development](../media/using-avsession-developer.md)
......
......@@ -91,7 +91,7 @@ Enable the default system audio effect.
## Obtaining the Global Audio Effect Mode
You can obtain the global audio effect mode corresponding to a specific audio content type (specified by **ContentType**) and audio stream usage (specified by **StreamUsage**).
You can obtain the global audio effect mode corresponding to a specific audio stream usage (specified by **StreamUsage**).
For an audio playback application, pay attention to the audio effect mode used by the audio stream of the application and perform corresponding operations. For example, for a music application, select the audio effect mode for the music scenario. Before obtaining the global audio effect mode, call **getStreamManager()** to create an **AudioStreamManager** instance.
### Creating an AudioStreamManager Instance
......@@ -107,7 +107,7 @@ Create an **AudioStreamManager** instance. Before using **AudioStreamManager** A
### Querying the Audio Effect Mode of the Corresponding Scenario
```js
audioStreamManager.getAudioEffectInfoArray(audio.ContentType.CONTENT_TYPE_MUSIC, audio.StreamUsage.STREAM_USAGE_MEDIA, async (err, audioEffectInfoArray) => {
audioStreamManager.getAudioEffectInfoArray(audio.StreamUsage.STREAM_USAGE_MEDIA, async (err, audioEffectInfoArray) => {
if (err) {
console.error('Failed to get effect info array');
return;
......
......@@ -20,6 +20,6 @@ To enable your application to play a video in the background or when the screen
1. The application is registered with the system for unified management through the **AVSession** APIs. Otherwise, the playback will be forcibly stopped when the application switches to the background. For details, see [AVSession Development](avsession-overview.md).
2. The application must request a continuous task to prevent from being suspended. For details, see [Continuous Task Development](../task-management/continuous-task-dev-guide.md).
2. The application must request a continuous task to prevent from being suspended. For details, see [Continuous Task](../task-management/continuous-task.md).
If the playback is interrupted when the application switches to the background, you can view the log to see whether the application has requested a continuous task. If the application has requested a continuous task, there is no log recording **pause id**; otherwise, there is a log recording **pause id**.
......@@ -4,7 +4,7 @@ The Audio and Video Session (AVSession) service is used to manage the playback b
Audio and video applications access the AVSession service and send application data (for example, a song that is being played and playback state) to it. Through a controller, the user can choose another application or device to continue the playback. If an application does not access the AVSession service, its playback will be forcibly interrupted when it switches to the background.
To implement background playback, you must request a continuous task to prevent the task from being suspended. For details, see [Continuous Task Development](../task-management/continuous-task-dev-guide.md).
To implement background playback, you must request a continuous task to prevent the task from being suspended. For details, see [Continuous Task](../task-management/continuous-task.md).
## Basic Concepts
......
......@@ -2,7 +2,7 @@
The AVPlayer is used to play raw media assets in an end-to-end manner. In this topic, you will learn how to use the AVPlayer to play a complete piece of music.
If you want the application to continue playing the music in the background or when the screen is off, you must use the [AVSession](avsession-overview.md) and [continuous task](../task-management/continuous-task-dev-guide.md) to prevent the playback from being forcibly interrupted by the system.
If you want the application to continue playing the music in the background or when the screen is off, you must use the [AVSession](avsession-overview.md) and [continuous task](../task-management/continuous-task.md) to prevent the playback from being forcibly interrupted by the system.
The full playback process includes creating an **AVPlayer** instance, setting the media asset to play, setting playback parameters (volume, speed, and focus mode), controlling playback (play, pause, seek, and stop), resetting the playback configuration, and releasing the instance.
......@@ -40,7 +40,7 @@ Read [AVPlayer](../reference/apis/js-apis-media.md#avplayer9) for the API refere
>
> The URL in the code snippet below is for reference only. You need to check the media asset validity and set the URL based on service requirements.
>
> - If local files are used for playback, ensure that the files are available and the application sandbox path is used for access. For details about how to obtain the application sandbox path, see [Obtaining the Application Development Path](../application-models/application-context-stage.md#obtaining-the-application-development-path). For details about the application sandbox and how to push files to the application sandbox, see [File Management](../file-management/app-sandbox-directory.md).
> - If local files are used for playback, ensure that the files are available and the application sandbox path is used for access. For details about how to obtain the application sandbox path, see [Obtaining Application File Paths](../application-models/application-context-stage.md#obtaining-application-file-paths). For details about the application sandbox and how to push files to the application sandbox, see [File Management](../file-management/app-sandbox-directory.md).
>
> - If a network playback path is used, you must request the ohos.permission.INTERNET [permission](../security/accesstoken-guidelines.md).
>
......
......@@ -6,7 +6,7 @@ OpenHarmony provides two solutions for video playback development:
- <Video\> component: encapsulates basic video playback capabilities. It can be used to play video files after the data source and basic information are set. However, its scalability is poor. This component is provided by ArkUI. For details about how to use this component for video playback development, see [Video Component](../ui/arkts-common-components-video-player.md).
In this topic, you will learn how to use the AVPlayer to develop a video playback service that plays a complete video file. If you want the application to continue playing the video in the background or when the screen is off, you must use the [AVSession](avsession-overview.md) and [continuous task](../task-management/continuous-task-dev-guide.md) to prevent the playback from being forcibly interrupted by the system.
In this topic, you will learn how to use the AVPlayer to develop a video playback service that plays a complete video file. If you want the application to continue playing the video in the background or when the screen is off, you must use the [AVSession](avsession-overview.md) and [continuous task](../task-management/continuous-task.md) to prevent the playback from being forcibly interrupted by the system.
## Development Guidelines
......
......@@ -41,8 +41,8 @@
- [Resource Categories and Access](resource-categories-and-access.md)
- Learning ArkTS
- [Getting Started with ArkTS](arkts-get-started.md)
- [Introduction to ArkTS](arkts/introduction-to-arkts.md)
- [TypeScript to ArkTS Migration Guide](arkts/typescript-to-arkts-migration-guide.md)
- [Introduction to ArkTS](introduction-to-arkts.md)
- [TypeScript to ArkTS Migration Guide](typescript-to-arkts-migration-guide.md)
- UI paradigms
- Basic Syntax
- [Basic Syntax Overview](arkts-basic-syntax-overview.md)
......
......@@ -548,9 +548,9 @@ Obtains the size, position, translation, scaling, rotation, and affine matrix in
**Return value**
| Type | Description |
| -------------------------------------------------------- | ------------------------------------------------ |
| [ComponentInfo](js-apis-componentUtils.md#componentinfo) | Size, position, translation, scaling, rotation, and affine matrix information of the component.|
| Type | Description |
| ------------- | ------------------------------------------------------------ |
| ComponentInfo | Size, position, translation, scaling, rotation, and affine matrix information of the component. |
**Example**
......
......@@ -100,7 +100,7 @@ Enumerates the types of Extension abilities.
| Name| Value| Description|
|:----------------:|:---:|-----|
| FORM | 0 | [FormExtensionAbility](../../application-models/service-widget-overview.md): provides APIs for widget development.|
| WORK_SCHEDULER | 1 | [WorkSchedulerExtensionAbility](../../task-management/work-scheduler-dev-guide.md): enables applications to execute non-real-time tasks when the system is idle.|
| WORK_SCHEDULER | 1 | [WorkSchedulerExtensionAbility](../../task-management/work-scheduler.md): enables applications to execute non-real-time tasks when the system is idle. |
| INPUT_METHOD | 2 | [InputMethodExtensionAbility](js-apis-inputmethod-extension-ability.md): provides APIs for developing input method applications.|
| SERVICE | 3 | [ServiceExtensionAbility](../../application-models/serviceextensionability.md): enables applications to run in the background and provide services.|
| ACCESSIBILITY | 4 | [AccessibilityExtensionAbility](js-apis-application-accessibilityExtensionAbility.md): provides accessibility for access to and operations on the UI.|
......
......@@ -18,8 +18,8 @@ import freeInstall from '@ohos.bundle.freeInstall';
| Permission | Permission Level | Description |
| ------------------------------------------ | ------------ | ------------------ |
| ohos.permission.GET_BUNDLE_INFO_PRIVILEGED | system_basic | Permission to query information about all bundles.|
| ohos.permission.INSTALL_BUNDLE | system_core | Permission to install or uninstall bundles. |
| ohos.permission.GET_BUNDLE_INFO_PRIVILEGED | system_basic | Permission to query information about all aplications.|
| ohos.permission.INSTALL_BUNDLE | system_core | Permission to install or uninstall other applications except enterprise applications, including enterprise InHouse, mobile device management (MDM), and Normal applications. |
For details, see [Permission Levels](../../security/accesstoken-overview.md#permission-levels).
## UpgradeFlag
......
......@@ -883,7 +883,7 @@ async function Demo() {
getColorSpace(): colorSpaceManager.ColorSpaceManager
Obtains the color space of this image
Obtains the color space of this image.
**System capability**: SystemCapability.Multimedia.Image.Core
......
......@@ -292,7 +292,7 @@ Registers a listener for application foreground/background state changes. This A
| Name | Type | Mandatory| Description |
| -------- | ------------------------------------------------------------ | ---- | ---------------- |
| type | string | Yes | Event type. The value is fixed at **'applicationStateChange'**, indicating that the application switches from the foreground to the background or vice versa.|
| callback | [ApplicationStateChangeCallback](#js-apis-app-ability-applicationStateChangeCallback.md) | Yes | Callback used to return the result. |
| callback | [ApplicationStateChangeCallback](js-apis-app-ability-applicationStateChangeCallback.md) | Yes | Callback used to return the result. |
**Example**
......@@ -370,7 +370,7 @@ Deregisters all the listeners for application foreground/background state change
| Name| Type | Mandatory| Description |
| ------ | ------------- | ---- | -------------------- |
| type | string | Yes | Event type. The value is fixed at **'applicationStateChange'**, indicating that the application switches from the foreground to the background or vice versa.|
| callback | [ApplicationStateChangeCallback](#js-apis-app-ability-applicationStateChangeCallback.md) | No | Callback used to return the result. |
| callback | [ApplicationStateChangeCallback](js-apis-app-ability-applicationStateChangeCallback.md) | No | Callback used to return the result. |
**Example**
......
......@@ -16,7 +16,11 @@ import installer from '@ohos.bundle.installer';
| Permission | Permission Level | Description |
| ------------------------------ | ----------- | ---------------- |
| ohos.permission.INSTALL_BUNDLE | system_core | Permission to install or uninstall bundles.|
| ohos.permission.INSTALL_BUNDLE | system_core | Permission to install or uninstall other applications except enterprise applications, including enterprise InHouse, mobile device management (MDM), and Normal applications.|
| ohos.permission.INSTALL_ENTERPRISE_BUNDLE | system_core | Permission to install enterprise InHouse applications.|
| ohos.permission.INSTALL_ENTERPRISE_MDM_BUNDLE | system_core | Permission to install enterprise MDM applications.|
| ohos.permission.INSTALL_ENTERPRISE_NORMAL_BUNDLE | system_core | Permission to install enterprise Normal applications.|
For details, see [Permission Levels](../../security/accesstoken-overview.md#permission-levels).
......
......@@ -310,19 +310,18 @@ Enumerates the media description keys.
**System capability**: SystemCapability.Multimedia.Media.Core
| Name | Value | Description |
| ----------------------------- | --------------- | ------------------------------------------------------------ |
| MD_KEY_TRACK_INDEX | 'track_index' | Track index, which is a number. |
| MD_KEY_TRACK_TYPE | 'track_type' | Track type, which is a number. For details, see [MediaType](#mediatype8).|
| MD_KEY_CODEC_MIME | 'codec_mime' | Codec MIME type, which is a string. |
| MD_KEY_DURATION | 'duration' | Media duration, which is a number, in units of ms. |
| MD_KEY_BITRATE | 'bitrate' | Bit rate, which is a number, in units of bit/s. |
| MD_KEY_WIDTH | 'width' | Video width, which is a number, in units of pixel. |
| MD_KEY_HEIGHT | 'height' | Video height, which is a number, in units of pixel. |
| MD_KEY_FRAME_RATE | 'frame_rate' | Video frame rate, which is a number, in units of 100 fps.|
| MD_KEY_AUD_CHANNEL_COUNT | 'channel_count' | Number of audio channels, which is a number. |
| MD_KEY_AUD_SAMPLE_RATE | 'sample_rate' | Sampling rate, which is a number, in units of Hz. |
| MD_KEY_LANGUAGE<sup>10+</sup> | "language" | Language, which is a string. |
| Name | Value | Description |
| ------------------------ | --------------- | ------------------------------------------------------------ |
| MD_KEY_TRACK_INDEX | 'track_index' | Track index, which is a number. |
| MD_KEY_TRACK_TYPE | 'track_type' | Track type, which is a number. For details, see [MediaType](#mediatype8).|
| MD_KEY_CODEC_MIME | 'codec_mime' | Codec MIME type, which is a string. |
| MD_KEY_DURATION | 'duration' | Media duration, which is a number, in units of ms. |
| MD_KEY_BITRATE | 'bitrate' | Bit rate, which is a number, in units of bit/s. |
| MD_KEY_WIDTH | 'width' | Video width, which is a number, in units of pixel. |
| MD_KEY_HEIGHT | 'height' | Video height, which is a number, in units of pixel. |
| MD_KEY_FRAME_RATE | 'frame_rate' | Video frame rate, which is a number, in units of 100 fps.|
| MD_KEY_AUD_CHANNEL_COUNT | 'channel_count' | Number of audio channels, which is a number. |
| MD_KEY_AUD_SAMPLE_RATE | 'sample_rate' | Sampling rate, which is a number, in units of Hz. |
## BufferingInfoType<sup>8+</sup>
......@@ -1001,124 +1000,6 @@ for (let i = 0; i < arrayDescription.length; i++) {
}
```
### selectTrack<sup>10+</sup><a name=avplayer_selecttrack></a>
selectTrack(index: number): void
Selects an audio track. This API can be called only when the AVPlayer is in the prepared state. You can listen for the [trackChange event](#trackchange_on) to determine whether the API calling takes effect.
**System capability**: SystemCapability.Multimedia.Media.AVPlayer
**Parameters**
| Name| Type | Mandatory| Description |
| ------ | ------ | ---- | ------------------------------------------------------------ |
| index | number | Yes | Track ID, which can be obtained by calling [getTrackDescription](#avplayer_gettrackdescription).|
**Example**
```js
let index = 2
avPlayer.selectTrack(index)
```
### deselectTrack<sup>10+</sup><a name=avplayer_deselecttrack></a>
deselectTrack(index: number): void
Deselects an audio track. The default audio track will be used after the audio track is deselected. This API can be called only when the AVPlayer is in the prepared state. You can listen for the [trackChange event](#trackchange_on) to determine whether the API calling takes effect.
**System capability**: SystemCapability.Multimedia.Media.AVPlayer
**Parameters**
| Name| Type | Mandatory| Description |
| ------ | ------ | ---- | ------------------------------------------------------------ |
| index | number | Yes | Track ID. You can obtain the ID of the current track by calling [getCurrentTrack](#avplayer_getcurrenttrack).|
**Example**
```js
let index = 2
avPlayer.deselectTrack(index)
```
### getCurrentTrack<sup>10+</sup><a name=avplayer_getcurrenttrack></a>
getCurrentTrack(trackType: MediaType, callback: AsyncCallback\<number>): void
Obtains the ID of the current track. This API uses an asynchronous callback to return the result. It can be called only when the AVPlayer is in the prepared, playing, paused, or completed state.
**System capability**: SystemCapability.Multimedia.Media.AVPlayer
**Parameters**
| Name | Type | Mandatory| Description |
| --------- | ----------------------- | ---- | ------------------------------------------------------------ |
| trackType | [MediaType](#mediatype) | Yes | Enumerates the media types. |
| callback | AsyncCallback\<number> | Yes | Callback used to return the current track. If **-1** is returned, no track for the specified media type exists.|
**Error codes**
For details about the error codes, see [Media Error Codes](../errorcodes/errorcode-media.md).
| ID| Error Message |
| -------- | ------------------------------------------ |
| 5400102 | Operation not allowed. Return by callback. |
**Example**
```js
let mediaType = media.MediaType.MEDIA_TYPE_AUD;
let trackIndex = null;
avPlayer.getCurrentTrack(mediaType, (err, index) => {
if (err == null) {
console.info('getCurrentTrack success');
trackIndex = index;
} else {
console.error('getCurrentTrack failed and error is ' + err.message);
}
});
```
### getCurrentTrack<sup>10+</sup>
getCurrentTrack(trackType: MediaType): Promise\<number>
Obtains the ID of the current track. This API uses a promise to return the result. It can be called only when the AVPlayer is in the prepared, playing, paused, or completed state.
**System capability**: SystemCapability.Multimedia.Media.AVPlayer
**Return value**
| Type | Description |
| ---------------- | ------------------------------------------------------------ |
| trackType | [MediaType](#mediatype) |
| Promise\<number>| Promise used to return the current track. If **-1** is returned, no track for the specified media type exists.|
**Error codes**
For details about the error codes, see [Media Error Codes](../errorcodes/errorcode-media.md).
| ID| Error Message |
| -------- | ----------------------------------------- |
| 5400102 | Operation not allowed. Return by promise. |
**Example**
```js
let mediaType = media.MediaType.MEDIA_TYPE_AUD;
let trackIndex = null;
avPlayer.getCurrentTrack(mediaType).then((index) => {
console.info('getCurrentTrack success');
trackIndex = index;
}).catch((err) => {
console.error('getCurrentTrack failed and catch error is ' + err.message);
});
```
### seek<sup>9+</sup><a name=avplayer_seek></a>
seek(timeMs: number, mode?:SeekMode): void
......@@ -1725,49 +1606,6 @@ Unsubscribes from the audio interruption event.
avPlayer.off('audioInterrupt')
```
### on('trackChange')<sup>10+</sup><a name = trackchange_on></a>
on(type: 'trackChange', callback: (index: number, isSelect: boolean) => void): void;
Subscribes to track changes, which are triggered by calling **selectTrack** or **deselectTrack**.
**System capability**: SystemCapability.Multimedia.Media.AVPlayer
**Parameters**
| Name | Type | Mandatory| Description |
| -------- | -------- | ---- | ----------------------------------------------------- |
| type | string | Yes | Event type, which is **'trackChange'** in this case.|
| callback | function | Yes | Callback invoked when the event is triggered. |
**Example**
```js
avPlayer.on('trackChange', (index: number, isSelect: boolean) => {
console.info('trackChange success, and index is:' + index + ', isSelect is :' + isSelect)
})
```
### off('trackChange')<sup>10+</sup><a name = trackchange_off></a>
off(type: 'trackChange'): void
Unsubscribes from track changes
**System capability**: SystemCapability.Multimedia.Media.AVPlayer
**Parameters**
| Name| Type | Mandatory| Description |
| ------ | ------ | ---- | --------------------------------------------------------- |
| type | string | Yes | Event type, which is **'trackChange'** in this case.|
**Example**
```js
avPlayer.off('trackChange')
```
## AVPlayerState<sup>9+</sup><a name = avplayerstate></a>
Enumerates the states of the [AVPlayer](#avplayer9). Your application can proactively obtain the AVPlayer state through the **state** attribute or obtain the reported AVPlayer state by subscribing to the [stateChange](#stateChange_on) event. For details about the rules for state transition, see [Audio Playback](../../media/using-avplayer-for-playback.md).
......@@ -2680,6 +2518,8 @@ Enumerates the AVRecorder states. You can obtain the state through the **state**
Describes the audio and video recording parameters.
The **audioSourceType** and **videoSourceType** parameters are used to distinguish audio-only recording, video-only recording, and audio and video recording. For audio-only recording, set only **audioSourceType**. For video-only recording, set only **videoSourceType**. For audio and video recording, set both **audioSourceType** and **videoSourceType**.
**System capability**: SystemCapability.Multimedia.Media.AVRecorder
| Name | Type | Mandatory| Description |
......@@ -2691,8 +2531,6 @@ Describes the audio and video recording parameters.
| rotation | number | No | Rotation angle of the recorded video. The value can only be 0 (default), 90, 180, or 270. |
| location | [Location](#location) | No | Geographical location of the recorded video. By default, the geographical location information is not recorded. |
The **audioSourceType** and **videoSourceType** parameters are used to distinguish audio-only recording, video-only recording, and audio and video recording. For audio-only recording, set only **audioSourceType**. For video-only recording, set only **videoSourceType**. For audio and video recording, set both **audioSourceType** and **videoSourceType**.
## AVRecorderProfile<sup>9+</sup>
Describes the audio and video recording profile.
......@@ -3517,13 +3355,15 @@ Enumerates the video recording states. You can obtain the state through the **st
Describes the video recording parameters.
The **audioSourceType** and **videoSourceType** parameters are used to distinguish video-only recording from audio and video recording. (For audio-only recording recording, use **[AVRecorder](#avrecorder9)** or **[AudioRecorder](#audiorecorderdeprecated)**.) For video-only recording, set only **videoSourceType**. For audio and video recording, set both **audioSourceType** and **videoSourceType**.
**System capability**: SystemCapability.Multimedia.Media.VideoRecorder
**System API**: This is a system API.
| Name | Type | Mandatory| Description |
| --------------- | ---------------------------------------------- | ---- | ------------------------------------------------------------ |
| audioSourceType | [AudioSourceType](#audiosourcetype9) | Yes | Type of the audio source for video recording. |
| audioSourceType | [AudioSourceType](#audiosourcetype9) | No | Type of the audio source for video recording. This parameter is mandatory for audio recording. |
| videoSourceType | [VideoSourceType](#videosourcetype9) | Yes | Type of the video source for video recording. |
| profile | [VideoRecorderProfile](#videorecorderprofile9) | Yes | Video recording profile. |
| rotation | number | No | Rotation angle of the recorded video. The value can only be 0 (default), 90, 180, or 270. |
......@@ -3540,10 +3380,10 @@ Describes the video recording profile.
| Name | Type | Mandatory| Description |
| ---------------- | -------------------------------------------- | ---- | ---------------- |
| audioBitrate | number | Yes | Audio encoding bit rate.|
| audioChannels | number | Yes | Number of audio channels.|
| audioCodec | [CodecMimeType](#codecmimetype8) | Yes | Audio encoding format. |
| audioSampleRate | number | Yes | Audio sampling rate. |
| audioBitrate | number | No | Audio encoding bit rate. This parameter is mandatory for audio recording.|
| audioChannels | number | No | Number of audio channels. This parameter is mandatory for audio recording.|
| audioCodec | [CodecMimeType](#codecmimetype8) | No | Audio encoding format. This parameter is mandatory for audio recording. |
| audioSampleRate | number | No | Audio sampling rate. This parameter is mandatory for audio recording. |
| fileFormat | [ContainerFormatType](#containerformattype8) | Yes | Container format of a file.|
| videoBitrate | number | Yes | Video encoding bit rate.|
| videoCodec | [CodecMimeType](#codecmimetype8) | Yes | Video encoding format. |
......
......@@ -49,7 +49,7 @@ console.log(view1) //<?xml version="1.0" encoding="utf-8"?>
setAttributes(name: string, value: string): void
Sets an attribute.
Writes an attribute and its value.
**System capability**: SystemCapability.Utils.Lang
......@@ -57,8 +57,8 @@ Sets an attribute.
| Name| Type | Mandatory| Description |
| ------ | ------ | ---- | --------------- |
| name | string | Yes | Key of the attribute. |
| value | string | Yes | Value of the attribute.|
| name | string | Yes | Attribute to write. |
| value | string | Yes | Attribute value to write.|
**Example**
......@@ -114,7 +114,7 @@ console.log(view1) //<d/>
setDeclaration(): void
Sets a declaration.
Writes an XML file declaration.
**System capability**: SystemCapability.Utils.Lang
......@@ -237,7 +237,7 @@ console.log(JSON.stringify(view1)) //<?xml version="1.0" encoding="utf-8"?>\r\n<
setComment(text: string): void
Sets the comment.
Writes a comment.
**System capability**: SystemCapability.Utils.Lang
......@@ -245,7 +245,7 @@ Sets the comment.
| Name| Type | Mandatory| Description |
| ------ | ------ | ---- | -------------------- |
| text | string | Yes | Comment to set.|
| text | string | Yes | Comment to write.|
**Example**
......@@ -268,7 +268,7 @@ console.log(view1) //<!--Hello, World!-->'
setCDATA(text: string): void
Sets CDATA attributes.
Writes CDATA data.
**System capability**: SystemCapability.Utils.Lang
......@@ -276,7 +276,7 @@ Sets CDATA attributes.
| Name| Type | Mandatory| Description |
| ------ | ------ | ---- | ----------------- |
| text | string | Yes | CDATA attribute to set.|
| text | string | Yes | CDATA data to write.|
**Example**
......@@ -299,7 +299,7 @@ console.log(view1) //'<![CDATA[root SYSTEM]]>''
setText(text: string): void
Sets **Text**.
Writes a tag value.
**System capability**: SystemCapability.Utils.Lang
......@@ -307,7 +307,7 @@ Sets **Text**.
| Name| Type | Mandatory| Description |
| ------ | ------ | ---- | ---------------- |
| text | string | Yes | Content of the **Text** to set.|
| text | string | Yes | Tag value to write, which is the content of the **text** attribute.|
**Example**
......@@ -333,7 +333,7 @@ console.log(view1) // '<note importance="high">Happy1</note>'
setDocType(text: string): void
Sets **DocType**.
Writes a document type.
**System capability**: SystemCapability.Utils.Lang
......@@ -341,7 +341,7 @@ Sets **DocType**.
| Name| Type | Mandatory| Description |
| ------ | ------ | ---- | ------------------- |
| text | string | Yes | Content of **DocType** to set.|
| text | string | Yes | Content of **DocType** to write.|
**Example**
......@@ -473,11 +473,11 @@ Defines the XML parsing options.
| Name | Type | Mandatory| Description |
| ------------------------------ | ------------------------------------------------------------ | ---- | --------------------------------------- |
| supportDoctype | boolean | No | Whether to ignore **Doctype**. The default value is **false**.|
| ignoreNameSpace | boolean | No | Whether to ignore **Namespace**. The default value is **false**. |
| tagValueCallbackFunction | (name: string, value: string) =&gt; boolean | No | Callback used to return **tagValue**. The default value is **null**. |
| attributeValueCallbackFunction | (name: string, value: string) =&gt; boolean | No | Callback used to return **attributeValue**. The default value is **null**. |
| tokenValueCallbackFunction | (eventType: [EventType](#eventtype), value: [ParseInfo](#parseinfo)) =&gt; boolean | No | Callback used to return **tokenValue**. The default value is **null**. |
| supportDoctype | boolean | No | Whether to ignore the document type. The default value is **false**, indicating that the document type is parsed.|
| ignoreNameSpace | boolean | No | Whether to ignore the namespace. The default value is **false**, indicating that the namespace is parsed.|
| tagValueCallbackFunction | (name: string, value: string) =&gt; boolean | No | Callback used to return **tagValue** for parsing the tag and tag value. The default value is **null**, indicating that the tag and tag value are not parsed. |
| attributeValueCallbackFunction | (name: string, value: string) =&gt; boolean | No | Callback used to return **attributeValue** for parsing the attribute and attribute value. The default value is **null**, indicating that the attribute and attribute value are not parsed.|
| tokenValueCallbackFunction | (eventType: [EventType](#eventtype), value: [ParseInfo](#parseinfo)) =&gt; boolean | No | Callback used to return **tokenValue** for parsing the [EventType](#eventtype) and [ParseInfo](#parseinfo) attributes. The default value is **null**, indicating that the **EventType** and **ParseInfo** attribute are not parsed.|
## ParseInfo
......@@ -923,20 +923,20 @@ console.log(str);
## EventType
Enumerates the events.
Enumerates the event types.
**System capability**: SystemCapability.Utils.Lang
| Name | Value | Description |
| ---------------- | ---- | --------------------- |
| START_DOCUMENT | 0 | Indicates a start document event. |
| END_DOCUMENT | 1 | Indicates an end document event. |
| START_TAG | 2 | Indicates a start tag event. |
| END_TAG | 3 | Indicates an end tag event. |
| TEXT | 4 | Indicates a text event. |
| CDSECT | 5 | Indicates a CDATA section event. |
| COMMENT | 6 | Indicates an XML comment event. |
| DOCDECL | 7 | Indicates an XML document type declaration event.|
| INSTRUCTION | 8 | Indicates an XML processing instruction event.|
| ENTITY_REFERENCE | 9 | Indicates an entity reference event. |
| WHITESPACE | 10 | Indicates a whitespace character event. |
| START_DOCUMENT | 0 | Start document event. |
| END_DOCUMENT | 1 | End document event. |
| START_TAG | 2 | Start tag event. |
| END_TAG | 3 | End tag event. |
| TEXT | 4 | Text event. |
| CDSECT | 5 | CDATA section event. |
| COMMENT | 6 | XML comment event. |
| DOCDECL | 7 | XML document type declaration event. |
| INSTRUCTION | 8 | XML processing instruction event. |
| ENTITY_REFERENCE | 9 | Entity reference event. |
| WHITESPACE | 10 | Whitespace character event. |
......@@ -1397,7 +1397,7 @@
- Components No Longer Maintained
- [GridContainer](reference/arkui-ts/ts-container-gridcontainer.md)
- APIs No Longer Maintained
- [Click Control](reference/arkui-ts/ts-universal-attributes-click.md)
- [Click Control](reference/arkui-ts/ts-universal-attributes-click.md)
- Component Reference (JavaScript-compatible Web-like Development Paradigm - ArkUI.Full)
- Universal Component Information
- [Universal Attributes](reference/arkui-js/js-components-common-attributes.md)
......
......@@ -34,7 +34,7 @@ In addition, OpenHarmony provides a wide array of system components that can be
| About OpenHarmony| Getting familiar with OpenHarmony | - [About OpenHarmony](https://gitee.com/openharmony)<br>- [Glossary](../glossary.md)|
| Development resources | Preparing for your development | - [Obtaining Source Code](get-code/sourcecode-acquire.md)<br>- [Obtaining Tools](get-code/gettools-acquire.md) |
| Getting started | Getting started with setup, build, burning, debugging, and running of OpenHarmony | - [Getting Started](quick-start/Readme-EN.md) |
| Basic capabilities | Using basic capabilities of OpenHarmony | - [Kernel for Mini System](kernel/kernel-mini-overview.md)<br>- [Kernel for Small System](kernel/kernel-small-overview.md)<br>- [HDF](driver/driver-hdf-overview.md)<br>- [Compilation and Building Guide](subsystems/subsys-build-all.md)<br>- [Security Guidelines](security/security-guidelines-overall.md)<br>- [Privacy Protection](security/security-privacy-protection.md)|
| Basic capabilities | Using basic capabilities of OpenHarmony | - [Kernel for Mini System](kernel/kernel-mini-overview.md)<br>- [Kernel for Small System](kernel/kernel-small-overview.md)<br>- [HDF](driver/driver-overview-foundation.md)<br>- [Compilation and Building Guide](subsystems/subsys-build-all.md)<br>- [Security Guidelines](security/security-guidelines-overall.md)<br>- [Privacy Protection](security/security-privacy-protection.md) |
| Advanced development | Developing smart devices based on system capabilities | - [WLAN-connected Products](guide/device-wlan-led-control.md)<br>- [Cameras with a Screen](guide/device-camera-control-overview.md) |
| Porting and adaptation | - Porting and adapting OpenHarmony to an SoC<br>- Porting and adapting OpenHarmony to a third-party library<br>- Third-party vendor porting cases<br>| - [Small System SoC Porting Guide](porting/porting-smallchip-prepare-needs.md)<br>- [Third-Party Library Porting Guide for Mini and Small Systems](porting/porting-thirdparty-overview.md) <br> - [Mini-System Devices with Screens — Bestechnic SoC Porting Case](porting/porting-bes2600w-on-minisystem-display-demo.md) |
| Contributing components | Contributing components to OpenHarmony | - [HPM Part Overview](hpm-part/hpm-part-about.md)<br>- [HPM Part Development](hpm-part/hpm-part-development.md)<br>- [HPM Part Reference](hpm-part/hpm-part-reference.md) |
......@@ -47,7 +47,7 @@ In addition, OpenHarmony provides a wide array of system components that can be
| About OpenHarmony| Getting familiar with OpenHarmony| - [About OpenHarmony](https://gitee.com/openharmony)<br>- [Glossary](../glossary.md)|
| Development resources| Preparing for your development| - [Obtaining Source Code](get-code/sourcecode-acquire.md)<br>- [Obtaining Tools](get-code/gettools-acquire.md) |
| Getting started| Getting started with setup, build, burning, debugging, and running of OpenHarmony| - [Getting Started](quick-start/Readme-EN.md) |
| Basic capabilities| Using basic capabilities of OpenHarmony| - [Kernel Development](kernel/kernel-standard-overview.md)<br>- [HDF](driver/driver-hdf-overview.md)<br>- [Compilation and Building Guide](subsystems/subsys-build-all.md)<br>- [Security Guidelines](security/security-guidelines-overall.md)<br>- [Privacy Protection](security/security-privacy-protection.md) |
| Basic capabilities| Using basic capabilities of OpenHarmony| - [Kernel Development](kernel/kernel-standard-overview.md)<br>- [HDF](driver/driver-overview-foundation.md)<br>- [Compilation and Building Guide](subsystems/subsys-build-all.md)<br>- [Security Guidelines](security/security-guidelines-overall.md)<br>- [Privacy Protection](security/security-privacy-protection.md) |
| Advanced development| Developing smart devices based on system capabilities| - [Development Guidelines on Clock Apps](guide/device-clock-guide.md)<br>- [Development Example for Platform Drivers](guide/device-driver-demo.md)<br>- [Development Example for Peripheral Drivers](guide/device-outerdriver-demo.md) |
| Porting and adaptation| - Porting and adapting OpenHarmony to an SoC<br>- Rapidly porting the OpenHarmony Linux kernel| - [Standard System Porting Guide](porting/standard-system-porting-guide.md)<br>- [A Method for Rapidly Porting the OpenHarmony Linux Kernel](porting/porting-linux-kernel.md) |
| Contributing components| Contributing components to OpenHarmony| - [HPM Part Overview](hpm-part/hpm-part-about.md)<br>- [HPM Part Development](hpm-part/hpm-part-development.md)<br>- [HPM Part Reference](hpm-part/hpm-part-reference.md) |
......
......@@ -9,16 +9,19 @@ The OpenHarmony driver subsystem provides the following features and capabilitie
- Elastic framework capabilities
Based on the traditional driver framework, the OpenHarmony driver subsystem builds elastic framework capabilities to enable deployment on terminal products with memory of hundreds KB to hundreds MB.
- Standardized driver interfaces
The OpenHarmony driver subsystem provides stable driver APIs compatible with the APIs of future-proof smartphones, tablets, smart TVs.
- Component-based driver model
The OpenHarmony driver subsystem provides the component-based driver model to implement more refined driver management. You can add or reduce components as required and focus on the interaction between the hardware and driver. The subsystem also presets some template-based driver model components, such as the network device model.
- Normalized configuration UI
The OpenHarmony driver subsystem provides a unified configuration tool that supports cross-platform configuration conversion and generation, enabling seamless switchover across platforms.
......
......@@ -143,7 +143,7 @@ Configure the **device\_info.hcs** file and obtain and parse device configurat
2. \(Optional\) Add configuration parameters.
The driver may require private configuration information to ensure that the register configuration meets the requirements of different products. If private configuration data is required, you can add a driver configuration file to store some default configuration information about the driver. When loading the driver, the HDF obtains the specified configuration information, saves it in the **property** attribute of **HdfDeviceObject**, and passes it to the driver via **Bind** and **Init**. For details about how to use **Bind** and **Init**, see [Driver Development](../driver/driver-hdf-development.md). You can create a configuration file and reference it in the **hdf.hcs** file of the board-level driver. In this example, configuration parameters are directly added to the existing configuration file **i2c\_config.hcs**.
The driver may require private configuration information to ensure that the register configuration meets the requirements of different products. If private configuration data is required, you can add a driver configuration file to store some default configuration information about the driver. When loading the driver, the HDF obtains the specified configuration information, saves it in the **property** attribute of **HdfDeviceObject**, and passes it to the driver via **Bind** and **Init**. For details about how to use **Bind** and **Init**, see [Driver Development](../driver/driver-overview-foundation.md). You can create a configuration file and reference it in the **hdf.hcs** file of the board-level driver. In this example, configuration parameters are directly added to the existing configuration file **i2c\_config.hcs**.
The following configuration parameters are added to the **i2c\_config.hcs** file:
......@@ -434,4 +434,3 @@ Initialize the controller hardware, call core-layer APIs to add or delete device
- For details about the operations in IDE mode, see [Building Source Code](../quick-start/quickstart-appendix-hi3516-ide.md#building-source-code) and [Burning an Image](../quick-start/quickstart-appendix-hi3516-ide.md#burning-an-image).
......@@ -41,7 +41,7 @@ You can configure the device driver description in the configuration file at **.
The **device\_info.hcs** file contains all necessary information for registering drivers in the input driver model with the HDF. You do not need to make any modification for the information unless otherwise required in special scenarios. The private configuration data of each driver uses the **deviceMatchAttr** field to match the **match\_attr** field in the **input\_config.hcs** file.
The input-related fields in the configuration file are as follows. For details about these fields, see [Driver Development](../driver/driver-hdf-development.md).
The input-related fields in the configuration file are as follows. For details about these fields, see [Driver Development](../driver/driver-overview-foundation.md).
```
input :: host {
......
......@@ -5,5 +5,5 @@ Drivers can be classified as platform drivers or device drivers. The platform dr
**Figure 1** OpenHarmony driver classification<a name="fig08631434121"></a>
![](figures/openharmony-driver-classification.png "openharmony-driver-classification")
The Hardware Driver Foundation \(HDF\) is designed to work across OSs. The HDF driver framework provides strong support for drivers to achieve this goal. During HDF driver development, you are advised to use only the APIs provided by the HDF driver framework. Otherwise, the driver cannot be used across OSs. Before driver development, familiarize yourself with the [HDF](../driver/driver-hdf-overview.md).
The Hardware Driver Foundation \(HDF\) is designed to work across OSs. The HDF driver framework provides strong support for drivers to achieve this goal. During HDF driver development, you are advised to use only the APIs provided by the HDF driver framework. Otherwise, the driver cannot be used across OSs. Before driver development, familiarize yourself with the [HDF](../driver/driver-overview-foundation.md).
......@@ -382,7 +382,7 @@ This version has the following updates to OpenHarmony 3.2 Release.
### APIs
For details about the API changes over OpenHarmony 3.2 Release, see [API Differences](/api-diff/v4.0-beta1/Readme-EN.md). A few API changes may affect applications developed using API version 9 or earlier. For details about the change impact and adaptation guide, see [Changelogs](changelogs/v4.0-beta1/Readme-EN.md).
For details about the API changes over OpenHarmony 3.2 Release, see [API Differences](api-diff/v4.0-beta1/Readme-EN.md). A few API changes may affect applications developed using API version 9 or earlier. For details about the change impact and adaptation guide, see [Changelogs](changelogs/v4.0-beta1/Readme-EN.md).
### Feature Updates
......
# Multimedia Subsystem Changelog
## cl.multimedia.1 Reference Paths Changed for the Audio/Video Encapsulation and Decapsulation Header Files
| Header File | Original Reference Path | New Reference Path |
| ------------------------------- | ------------------------------------- | ------------------------------------- |
| native_avmuxer.h | <multimedia/native_avmuxer.h> | <multimedia/player_framework/native_avmuxer.h> |
| native_avdemuxer.h | <multimedia/native_avdemuxer.h> | <multimedia/player_framework/native_avdemuxer.h> |
| native_avsource.h | <multimedia/native_avsource.h> | <multimedia/player_framework/native_avsource.h> |
**Change Impact**
Applications that use the involved APIs may have compatibility issues.
**Adaptation Guide**
Modify the reference paths when referencing the encapsulation and decapsulation header files.
......@@ -14,7 +14,6 @@ The bottom-layer implementation is changed. The result value of **getAllBundleIn
**Adaptation Guide**
If your application uses **getAllBundleInfo** in **@ohos.bundle.d.ts**, replace it with **getAllBundleInfo** in **@ohos.bundle.bundleManager.d.ts**. For details about how to use the new API, see [API Reference](../../../application-dev/reference/apis/js-apis-bundleManager.md#bundlemanagergetallbundleinfo).
```ets
import bundleManager from '@ohos.bundle.bundleManager';
```
......@@ -34,7 +33,6 @@ The bottom-layer implementation is changed. The result value of **getAllApplicat
**Adaptation Guide**
If your application uses **getAllApplicationInfo** in **@ohos.bundle.d.ts**, replace it with **getAllApplicationInfo** in **@ohos.bundle.bundleManager.d.ts**. For details about how to use the new API, see [API Reference](../../../application-dev/reference/apis/js-apis-bundleManager.md#bundlemanagergetallapplicationinfo).
```ets
import bundleManager from '@ohos.bundle.bundleManager';
```
......@@ -113,13 +111,13 @@ To use **getAdditionalInfo**, import the **bundleManager** module.
import bundleManager form '@ohos.bundle.bundleManager'
```
## cl.bundlemanager.7 proxyDatas under Schema Renamed proxyData
## cl.bundlemanager.7 proxyDatas Renamed proxyData in the module.json5 File
**proxyDatas** is renamed **proxyData**.
**Change Impact**
After an update to the new image version, **proxyDatas** is renamed **proxyData**. Currently **proxyDatas** can still be used, but it will be deprecated soon. You are advised to replace **proxyDatas** with **proxyData** as soon as possible.
After an update to the new SDK version, **proxyDatas** is **renamed proxyData**. If your application is not adapted, the build will fail.
**Key API/Component Changes**
......@@ -127,4 +125,5 @@ After an update to the new image version, **proxyDatas** is renamed **proxyData*
**Adaptation Guide**
Replace **proxyDatas** with **proxyData**.
\ No newline at end of file
Replace **proxyDatas** with **proxyData**. The content of **proxyDatas** does not need to be changed.
# Bundle Management Subsystem Changelog
## cl.bundlemanager.1 schema in the module.json File Changed
In the **module.json** file, the **name** attributes of the **module**, **ability**, and **extensionAbility** fields must start with a letter and contain only letters, digits, underscores (_), and dots (.).
**Change Impact**
After an update to the new SDK version, the build fails if the **name** attributes of these fields do not meet the preceding requirements.
**Key API/Component Changes**
In the **module.json** file, the **name** attributes of the **module**, **ability**, and **extensionAbility** fields must start with a letter and contain only letters, digits, underscores (_), and dots (.).
**Adaptation Guide**
Modify the **name** attributes for these fields accordingly to the new requirements.
\ No newline at end of file
# Media Subsystem ChangeLog
## cl.media.1 Playback APIs Changed
The APIs related to audio track switching are deleted.
**Change Impact**
These APIs are unavailable.
**Key API/Component Changes**
The deleted APIs are as follows:
| Class | API |
| -------------- | ------------------------------------------------------------ |
| Media.Core | MD_KEY_LANGUAGE |
| Media.AVPlayer | selectTrack(index: number): void |
| Media.AVPlayer | deselectTrack(index: number): void |
| Media.AVPlayer | getCurrentTrack(trackType: MediaType, callback: AsyncCallback\<number>): void |
| Media.AVPlayer | getCurrentTrack(trackType: MediaType): Promise\<number> |
| Media.AVPlayer | on(type: 'trackChange', callback: (index: number, isSelect: boolean) => void): void; |
| Media.AVPlayer | off(type: 'trackChange'): void |
# Multimedia Subsystem Changelog
## cl.multimedia.1 Deleted content from getAudioEffectInfoArray
The input parameter **content** is deleted from **getAudioEffectInfoArray**.
**Change Impact**
Applications that use the involved APIs may have compatibility issues.
**Key API/Component Changes**
Before change:
```js
getAudioEffectInfoArray(content: ContentType, usage: StreamUsage, callback: AsyncCallback<AudioEffectInfoArray>): void;
getAudioEffectInfoArray(content: ContentType, usage: StreamUsage): Promise<AudioEffectInfoArray>;
```
After change:
```js
getAudioEffectInfoArray(usage: StreamUsage, callback: AsyncCallback<AudioEffectInfoArray>): void;
getAudioEffectInfoArray(usage: StreamUsage): Promise<AudioEffectInfoArray>;
```
**Adaptation Guide**
When calling this API, pass in only the input parameter **usage**. If **getAudioEffectInfoArray** is used in your application code, delete the **content** parameter.
......@@ -51,7 +51,6 @@
- [Distributed Data Management](release-notes/api-diff/v4.0-beta1/js-apidiff-distributed-data.md)
- [Distributed Hardware](release-notes/api-diff/v4.0-beta1/js-apidiff-distributed-hardware.md)
- [File Management](release-notes/api-diff/v4.0-beta1/js-apidiff-file-management.md)
- [Location](release-notes/api-diff/v4.0-beta1/js-apidiff-geolocation.md)
- [Globalization](release-notes/api-diff/v4.0-beta1/js-apidiff-global.md)
- [Graphics](release-notes/api-diff/v4.0-beta1/js-apidiff-graphic.md)
- [Misc Software](release-notes/api-diff/v4.0-beta1/js-apidiff-misc.md)
......@@ -70,36 +69,13 @@
- [Window Manager](release-notes/api-diff/v4.0-beta1/js-apidiff-window.md)
- API Changelogs
- [Ability](release-notes/changelogs/v4.0-beta1/changelogs-ability.md)
- [Ability Access Control](release-notes/changelogs/v4.0-beta1/changelogs-accesstoken.md)
- [Account](release-notes/changelogs/v4.0-beta1/changelogs-account_os_account.md)
- [Notification](release-notes/changelogs/v4.0-beta1/changelogs-ans.md)
- [Compiler and Runtime](release-notes/changelogs/v4.0-beta1/changelogs-arkcompiler.md)
- [ArkUI](release-notes/changelogs/v4.0-beta1/changelogs-arkui.md)
- [Bluetooth](release-notes/changelogs/v4.0-beta1/changelogs-bluetooth.md)
- [Bundle Management](release-notes/changelogs/v4.0-beta1/changelogs-bundlemanager.md)
- [Common Event](release-notes/changelogs/v4.0-beta1/changelogs-ces.md)
- [Distributed Data Management](release-notes/changelogs/v4.0-beta1/changelogs-distributeddatamgr.md)
- [File Management](release-notes/changelogs/v4.0-beta1/changelogs-filemanagement.md)
- [Location](release-notes/changelogs/v4.0-beta1/changelogs-geoLocationManager.md)
- [Globalization](release-notes/changelogs/v4.0-beta1/changelogs-global.md)
- [Security - HUKS](release-notes/changelogs/v4.0-beta1/changelogs-huks.md)
- [Input Method Framework](release-notes/changelogs/v4.0-beta1/changelogs-imf.md)
- [Multimedia](release-notes/changelogs/v4.0-beta1/changelogs-media.md)
- [MISC Software](release-notes/changelogs/v4.0-beta1/changelogs-miscdevice.md)
- [Pasteboard](release-notes/changelogs/v4.0-beta1/changelogs-pasteboard.md)
- [Power Management](release-notes/changelogs/v4.0-beta1/changelogs-power.md)
- [Resource Scheduler](release-notes/changelogs/v4.0-beta1/changelogs-resourceschedule.md)
- [Theme Framework - Lock Screen](release-notes/changelogs/v4.0-beta1/changelogs-screenlock.md)
- [Basic Security Service](release-notes/changelogs/v4.0-beta1/changelogs-security.md)
- [Pan-sensor](release-notes/changelogs/v4.0-beta1/changelogs-sensor.md)
- [DSoftBus](release-notes/changelogs/v4.0-beta1/changelogs-softbus.md)
- [Startup Service](release-notes/changelogs/v4.0-beta1/changelogs-startup.md)
- [Telephony](release-notes/changelogs/v4.0-beta1/changelogs-telephony.md)
- [Test](release-notes/changelogs/v4.0-beta1/changelogs-testfwk_arkxtest.md)
- [USB](release-notes/changelogs/v4.0-beta1/changelogs-usb.md)
- [Theme Framework - Wallpaper](release-notes/changelogs/v4.0-beta1/changelogs-wallpaper.md)
- [Web](release-notes/changelogs/v4.0-beta1/changelogs-web.md)
- [WIFI](release-notes/changelogs/v4.0-beta1/changelogs-wifiManager.md)
- OpenHarmony 3.2 Release (Compared with OpenHarmony 3.1 Release)
- JS API Differences
- [Ability](release-notes/api-diff/v3.2-Release/js-apidiff-ability.md)
......@@ -332,11 +308,9 @@
- OpenHarmony v2.2 Beta2
- [JS API Differences](release-notes/api-diff/v2.2-beta2/js-apidiff-v2.2-beta2.md)
- [Native API Differences](release-notes/api-diff/v2.2-beta2/native-apidiff-v2.2-beta2.md)
- OpenHarmony Third-Party Components
- [Introduction to OpenHarmony Third-Party Components](third-party-components/third-party-components-introduction.md)
- [Using OpenHarmony JS and TS Third-Party Components](third-party-components/ohpm-third-party-guide.md)
- Contribution
- [How to Contribute](contribute/how-to-contribute.md)
- [Code of Conduct](contribute/code-of-conduct.md)
......
......@@ -64,23 +64,23 @@
## COMMON_EVENT_DISTRIBUTED_ACCOUNT_LOGIN
(预留事件,暂未支持)表示分布式帐号登录成功的动作。
- 值: usual.event.DISTRIBUTED_ACCOUNT_LOGIN
- 值: common.event.DISTRIBUTED_ACCOUNT_LOGIN
- 订阅者所需权限: 无
## COMMON_EVENT_DISTRIBUTED_ACCOUNT_LOGOUT
(预留事件,暂未支持)表示分布式帐号登出成功的动作。
- 值: usual.event.DISTRIBUTED_ACCOUNT_LOGOUT
- 值: common.event.DISTRIBUTED_ACCOUNT_LOGOUT
- 订阅者所需权限: 无
## COMMON_EVENT_DISTRIBUTED_ACCOUNT_TOKEN_INVALID
(预留事件,暂未支持)表示分布式帐号token令牌无效的动作。
- 值: usual.event.DISTRIBUTED_ACCOUNT_TOKEN_INVALID
- 值: common.event.DISTRIBUTED_ACCOUNT_TOKEN_INVALID
- 订阅者所需权限: 无
## COMMON_EVENT_DISTRIBUTED_ACCOUNT_LOGOFF
(预留事件,暂未支持)表示分布式帐号注销的动作。
- 值: usual.event.DISTRIBUTED_ACCOUNT_LOGOFF
- 值: common.event.DISTRIBUTED_ACCOUNT_LOGOFF
- 订阅者所需权限: 无
\ No newline at end of file
......@@ -39,6 +39,7 @@
}
```
2. @State、@Provide、 @Link和@Consume四种状态变量的数据类型声明只能由简单数据类型或引用数据类型的其中一种构成。
类型定义中的Length、ResourceStr、ResourceColor三个类型是简单数据类型或引用数据类型的组合,所以不能被以上四种状态装饰器变量使用。
......
......@@ -72,14 +72,14 @@
- [Web](release-notes/api-diff/v4.0-beta2/js-apidiff-web.md)
- [窗口](release-notes/api-diff/v4.0-beta2/js-apidiff-window.md)
- API变更说明
- [总览](release-notes/changelogs/v4.0-beta2/readme.md)
- [总览](release-notes/changelogs/v4.0-beta2/Readme-CN.md)
- [ArkUI Changelog](release-notes/changelogs/v4.0-beta2/changelogs-arkui.md)
- [包管理Changelog](release-notes/changelogs/v4.0-beta2/changelogs-bundlemanager.md)
- [程序访问控制Changelog](release-notes/changelogs/v4.0-beta2/changelogs-accesstoken.md)
- [分布式数据管理Changelog](release-notes/changelogs/v4.0-beta2/changelogs-distributeddatamgr.md)
- [元能力-卡片框架Changelog](release-notes/changelogs/v4.0-beta2/changelogs-formfwk.md)
- [图形Changelog](release-notes/changelogs/v4.0-beta2/changelogs-image.md)
- [输入法框架Changelog](changelogs-imf.md)
- [输入法框架Changelog](release-notes/changelogs/v4.0-beta2/changelogs-imf.md)
- [媒体Changelog](release-notes/changelogs/v4.0-beta2/changelogs-multimedia.md)
- [主题框架-锁屏管理Changelog](release-notes/changelogs/v4.0-beta2/changelogs-screenlock.md)
- [设备管理Changelog](release-notes/changelogs/v4.0-beta2/changelogs-device_manager.md)
......@@ -99,7 +99,6 @@
- [分布式数据管理](release-notes/api-diff/v4.0-beta1/js-apidiff-distributed-data.md)
- [分布式硬件](release-notes/api-diff/v4.0-beta1/js-apidiff-distributed-hardware.md)
- [文件管理](release-notes/api-diff/v4.0-beta1/js-apidiff-file-management.md)
- [位置](release-notes/api-diff/v4.0-beta1/js-apidiff-geolocation.md)
- [全球化](release-notes/api-diff/v4.0-beta1/js-apidiff-global.md)
- [图形](release-notes/api-diff/v4.0-beta1/js-apidiff-graphic.md)
- [Misc软件](release-notes/api-diff/v4.0-beta1/js-apidiff-misc.md)
......@@ -118,36 +117,14 @@
- [窗口](release-notes/api-diff/v4.0-beta1/js-apidiff-window.md)
- API变更说明
- [元能力](release-notes/changelogs/v4.0-beta1/changelogs-ability.md)
- [程序访问控制](release-notes/changelogs/v4.0-beta1/changelogs-accesstoken.md)
- [帐号](release-notes/changelogs/v4.0-beta1/changelogs-account_os_account.md)
- [通知](release-notes/changelogs/v4.0-beta1/changelogs-ans.md)
- [语言编译运行时](release-notes/changelogs/v4.0-beta1/changelogs-arkcompiler.md)
- [ArkUI](release-notes/changelogs/v4.0-beta1/changelogs-arkui.md)
- [蓝牙](release-notes/changelogs/v4.0-beta1/changelogs-bluetooth.md)
- [包管理](release-notes/changelogs/v4.0-beta1/changelogs-bundlemanager.md)
- [事件](release-notes/changelogs/v4.0-beta1/changelogs-ces.md)
- [分布式数据管理](release-notes/changelogs/v4.0-beta1/changelogs-distributeddatamgr.md)
- [文件管理](release-notes/changelogs/v4.0-beta1/changelogs-filemanagement.md)
- [位置](release-notes/changelogs/v4.0-beta1/changelogs-geoLocationManager.md)
- [通用能力](release-notes/changelogs/v4.0-beta1/changelogs-common.md)
- [全球化](release-notes/changelogs/v4.0-beta1/changelogs-global.md)
- [安全-huks](release-notes/changelogs/v4.0-beta1/changelogs-huks.md)
- [输入法框架](release-notes/changelogs/v4.0-beta1/changelogs-imf.md)
- [媒体](release-notes/changelogs/v4.0-beta1/changelogs-media.md)
- [Misc软件](release-notes/changelogs/v4.0-beta1/changelogs-miscdevice.md)
- [剪贴板](release-notes/changelogs/v4.0-beta1/changelogs-pasteboard.md)
- [电源](release-notes/changelogs/v4.0-beta1/changelogs-power.md)
- [资源调度](release-notes/changelogs/v4.0-beta1/changelogs-resourceschedule.md)
- [主题框架-锁屏](release-notes/changelogs/v4.0-beta1/changelogs-screenlock.md)
- [安全基础能力](release-notes/changelogs/v4.0-beta1/changelogs-security.md)
- [泛Sensor](release-notes/changelogs/v4.0-beta1/changelogs-sensor.md)
- [分布式软总线](release-notes/changelogs/v4.0-beta1/changelogs-softbus.md)
- [启动服务](release-notes/changelogs/v4.0-beta1/changelogs-startup.md)
- [电话服务](release-notes/changelogs/v4.0-beta1/changelogs-telephony.md)
- [测试框架](release-notes/changelogs/v4.0-beta1/changelogs-testfwk_arkxtest.md)
- [USB](release-notes/changelogs/v4.0-beta1/changelogs-usb.md)
- [主题框架-壁纸](release-notes/changelogs/v4.0-beta1/changelogs-wallpaper.md)
- [Web](release-notes/changelogs/v4.0-beta1/changelogs-web.md)
- [WIFI](release-notes/changelogs/v4.0-beta1/changelogs-wifiManager.md)
- OpenHarmony 3.2 Release (相比3.1 Release)
- ArkTS API差异报告
- [元能力](release-notes/api-diff/v3.2-Release/js-apidiff-ability.md)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册