提交 6d410542 编写于 作者: G Gloria

Update docs against 18415

Signed-off-by: wusongqing<wusongqing@huawei.com>
上级 1cdaa52a
......@@ -162,7 +162,7 @@ Go to the local installation path, choose **toolchains > 3.x.x.x** (the folder n
If the executable file does not exist, download the SDK package from the mirror as instructed in the [Release Notes](../../release-notes). The following uses [3.2 Beta3](../../release-notes/OpenHarmony-v3.2-beta3.md) as an example.
For details about how to replace the SDK package, see [Full SDK Compilation Guide](../quick-start/full-sdk-compile-guide.md).
For details about how to replace the SDK package, see [Full SDK Compilation Guide](../faqs/full-sdk-compile-guide.md).
After obtaining the executable file, perform subsequent development steps based on your scenario.
......
......@@ -2,9 +2,9 @@
- [Full SDK Compilation](full-sdk-compile-guide.md)
- [Switching to Full SDK](full-sdk-switch-guide.md)
- [Ability Development](faqs-ability.md)
- [ArkUI Development](faqs-arkui.md)
- [ArkUI Development (ArkTS Syntax)](faqs-arkui-arkts.md)
- [Application Model Development](faqs-ability.md)
- ArkUI Framework Development (ArkTS)
- [ArkUI Development (ArkTS Syntax)](faqs-arkui-arkts.md)
- [Web Development](faqs-arkui-web.md)
- [Bundle Management Development](faqs-bundle-management.md)
- [Resource Manager Development](faqs-globalization.md)
......
# Ability Development
# Application Model Development
## How do I obtain a notification when the device orientation changes?
Applicable to: OpenHarmony 3.2 Beta 5 (API version 9)
Applicable to: OpenHarmony 3.2 Beta5 (API version 9)
**Solution**
......@@ -14,7 +14,7 @@ Use the **UIAbility.onConfigurationUpdate\(\)** callback to subscribe to system
## How do I redirect a user to a specified page after they touch a service widget?
Applicable to: OpenHarmony 3.2 Beta 5 (API version 9)
Applicable to: OpenHarmony 3.2 Beta5 (API version 9)
**Solution**
......@@ -42,7 +42,7 @@ Create a background task to provide the background service.
## Can I create a UIAbility and specify the process to run the UIAbility in the FA and Stage models?
Applicable to: OpenHarmony 3.2 Beta 5 (API version 9)
Applicable to: OpenHarmony 3.2 Beta5 (API version 9)
**Solution**
......@@ -59,7 +59,7 @@ Yes.
## What are the differences between the stage model and the FA model in intra-process object sharing?
Applicable to: OpenHarmony 3.2 Beta 5 (API version 9)
Applicable to: OpenHarmony 3.2 Beta5 (API version 9)
**Solution**
......@@ -72,7 +72,7 @@ Applicable to: OpenHarmony 3.2 Beta 5 (API version 9)
## How do I use the lifecycle functions of AbilityStage?
Applicable to: OpenHarmony 3.2 Beta 5 (API version 9)
Applicable to: OpenHarmony 3.2 Beta5 (API version 9)
**Solution**
......@@ -85,7 +85,7 @@ Add the field **"srcEntry": "./ets/myabilitystage/MyAbilityStage.ts"** under **m
## How do I delete the mission snapshot in Recents after terminateself is called in the multiton scenario?
Applicable to: OpenHarmony 3.2 Beta 5 (API version 9)
Applicable to: OpenHarmony 3.2 Beta5 (API version 9)
**Solution**
......@@ -93,7 +93,7 @@ You can set **removeMissionAfterTerminate** to **true** in the **module.json5**
## Why can't I start a UIAbility instance by using startAbility\(\)?
Applicable to: OpenHarmony 3.2 Beta 5 (API version 9)
Applicable to: OpenHarmony 3.2 Beta5 (API version 9)
**Solution**
......@@ -102,7 +102,7 @@ Applicable to: OpenHarmony 3.2 Beta 5 (API version 9)
## How do I prevent "this" in a method from changing to "undefined" when the method is called?
Applicable to: OpenHarmony 3.2 Beta 5 (API version 9)
Applicable to: OpenHarmony 3.2 Beta5 (API version 9)
**Solution**
......@@ -112,7 +112,7 @@ Method 2: Use the arrow function.
## What should I do when the error message "must have required property 'startWindowIcon'" is displayed during the UIAbility startup?
Applicable to: OpenHarmony 3.2 Beta 5 (API version 9)
Applicable to: OpenHarmony 3.2 Beta5 (API version 9)
**Solution**
......@@ -135,11 +135,11 @@ Configure the **startWindowIcon** attribute under **abilities** in the **module.
**Reference**
[module.json5 Configuration File](../quick-start/module-configuration-file.md)
[module.json5 File](../quick-start/module-configuration-file.md)
## Can I obtain the context through globalThis in the stage model?
Applicable to: OpenHarmony 3.2 Beta 5 (API version 9)
Applicable to: OpenHarmony 3.2 Beta5 (API version 9)
Do not use **globalThis** to obtain the context in the stage model.
......@@ -151,7 +151,7 @@ This is because all the processes of an application share a JS VM instance in th
## What should I do when an error indicating too large size is reported during HAP deployment?
Applicable to: OpenHarmony 3.2 Beta 5 (API version 9)
Applicable to: OpenHarmony 3.2 Beta5 (API version 9)
**Symptom**
......@@ -165,11 +165,11 @@ You can split the HAP into multiple HAPs.
## How is data returned when startAbilityForResult is called?
Applicable to: OpenHarmony 3.2 Beta 5 (API version 9)
Applicable to: OpenHarmony 3.2 Beta5 (API version 9)
**Solution**
The target UIAbilities uses **AbilityContext.terminateSelfWithResult** to terminate itselef and pass the result to **startAbilityForResult**.
The target UIAbilities uses **AbilityContext.terminateSelfWithResult** to terminate itself and pass the result to **startAbilityForResult**.
**Reference**
......@@ -178,7 +178,7 @@ The target UIAbilities uses **AbilityContext.terminateSelfWithResult** to termin
## How do I obtain the system timestamp?
Applicable to: OpenHarmony 3.2 Beta 5 (API version 9)
Applicable to: OpenHarmony 3.2 Beta5 (API version 9)
**Solution**
......@@ -209,7 +209,7 @@ Use the **@ohos.systemDateTime** API as follows:
## How do I obtain the cache directory of the current application?
Applicable to: OpenHarmony 3.2 Beta 5 (API version 9)
Applicable to: OpenHarmony 3.2 Beta5 (API version 9)
**Solution**
......@@ -221,7 +221,7 @@ Use **Context.cacheDir** to obtain the cache directory of the application.
## In which JS file is the service widget lifecycle callback invoked?
Applicable to: OpenHarmony 3.2 Beta 5 (API version 9)
Applicable to: OpenHarmony 3.2 Beta5 (API version 9)
**Solution**
......@@ -233,7 +233,7 @@ When a widget is created, a **FormAblity.ts** file is generated, which contains
## What should I do when the compilation on DevEco Studio fails while ServiceExtensionAbility and DataShareExtensionAbility APIs are used?
Applicable to: OpenHarmony 3.2 Beta 5 (API version 9)
Applicable to: OpenHarmony 3.2 Beta5 (API version 9)
**Symptom**
......@@ -250,7 +250,7 @@ The SDK downloaded using DevEco Studio is the public SDK.
**Solution**
Third-party application cannot use **ServiceExtensionAbility** and **DataShareExtensionAbility**. To develop a system application, first [download the full SDK](../quick-start/full-sdk-switch-guide.md).
Third-party application cannot use **ServiceExtensionAbility** and **DataShareExtensionAbility**. To develop a system application, first [download the full SDK](../faqs/full-sdk-switch-guide.md).
## How do I obtain the temp and files paths at the application level?
......@@ -264,18 +264,99 @@ Obtain them from the application context. Specifically, use **this.context.getAp
[Obtaining the Application Development Path](../application-models/application-context-stage.md#obtaining-the-application-development-path)
## Why the application is not deleted from the background mission list after it calls terminateSelf?
Applicable to: OpenHarmony 3.2 Beta5
**Solution**
This is because the **removeMissionAfterTerminate** field under **abilities** in the **module.json5** file of the UIAbility is set to **false** (default value). To enable the application snapshot to be automatically deleted when the application is destroyed, set this field to **true**.
**Reference**
[module.json5 File](../quick-start/module-configuration-file.md)
## How does an application developed in the stage model start an application developed in the FA model?
Applicable to: OpenHarmony 3.2 Beta5 (API version 9)
**Solution**
Refer to the code snippet below:
```
let want = {
deviceId: "", // An empty deviceId indicates the local device.
bundleName: "com.example.myapplication",
abilityName: "EntryAbility",
moduleName: "Module1", // moduleName is optional.
parameters: { // Custom information.
},
}
// context is the AbilityContext of the FA model to be started.
context.startAbility(want).then(() => {
...
}).catch((err) => {
...
})
```
## Can atomic services be implemented using JavaScript code only?
Applicable to: OpenHarmony 3.2 Beta5 (API version 9)
**Solution**
Currently, the directory structure of new widgets is css+hml+json. This means that the widgets cannot be implemented by using JavaScript code only. Event triggering and parameter transfer can be processed in JSON files.
## Can the lifecycle callback of a released FA widget be triggered when the widget is displayed in the service center so that the user login information can be obtained without opening the FA application?
Applicable to: OpenHarmony 3.2 Beta 5 (API version 9)
Applicable to: OpenHarmony 3.2 Beta5 (API version 9)
**Solution**
After a widget is added, the **onCreate()** lifecycle is triggered so that related user information (silent login) can be displayed even when the application is not started. However, users must manually add the widget after the application is installed.
After a widget is added, the **onCreate\(\)** lifecycle is triggered so that related user information (silent login) can be displayed even when the application is not started. However, users must manually add the widget after the application is installed.
## What should I do when the error message "\[c4d4d3492eb8531, 0, 0\] ContextDeal::startAbility fetchAbilities failed" is displayed during switching to another application?
Applicable to: OpenHarmony 3.2 Beta5 (API version 9)
**Symptom**
The **startAbility** API reports an error during redirection.
**Solution**
Use **startAbility** for implementation as follows:
```
import featureAbility from '@ohos.ability.featureAbility'
function onStartRemoteAbility() {
console.info('onStartRemoteAbility begin');
let params;
let wantValue = {
bundleName: 'ohos.samples.etsDemo',
abilityName: 'ohos.samples.etsDemo.RemoteAbility',
deviceId: getRemoteDeviceId(),
parameters: params
};
console.info('onStartRemoteAbility want=' + JSON.stringify(wantValue));
featureAbility.startAbility({
want: wantValue
}).then((data) => {
console.info('onStartRemoteAbility finished, ' + JSON.stringify(data));
});
console.info('onStartRemoteAbility end');
}
```
**Reference**
See [Starting a Local PageAbility] (../application-models/start-local-pageability.md).
## How do I implement service login by touching a widget?
Applicable to: OpenHarmony 3.2 Beta 5 (API version 9)
Applicable to: OpenHarmony 3.2 Beta5 (API version 9)
**Solution**
......@@ -299,7 +380,7 @@ To create a service widget in the FA model, perform the following steps:
## How do I redirect to the application details page in Settings?
Applicable to: OpenHarmony 3.2 Beta 5 (API version 9)
Applicable to: OpenHarmony 3.2 Beta5 (API version 9)
**Solution**
......@@ -319,35 +400,33 @@ Applicable to: OpenHarmony 3.2 Beta5 (API version 9)
**Solution**
You can use **UIAbility.Context** to obtain the context.
You can use **UIAbility.Context** to obtain the context.
**Example**
```
import UIAbility from '@ohos.app.ability.UIAbility';
import common from '@ohos.app.ability.common';
let UIAbilityContext = UIAbility.context;
let ApplicationContext = UIAbility.context.getApplicationContext();
@Entry
@Component
struct AbilityContextTest {
// abilityContext
@State UIabilityInfo: string = 'Obtaining abilityInfo'
UIabilityContext: UIAbilityContext
@State UIAbilityInfo: string = 'Obtaining abilityInfo'
UIAbilityContext: common.UIAbilityContext
aboutToAppear() {
// Use getContext to obtain the context and convert it to abilityContext.
this.UIabilityContext = getContext(this) as UIAbilityContext
this.UIAbilityContext = getContext(this) as common.UIAbilityContext
}
build() {
Row() {
Column({ space: 20 }) {
Text(this.abilityInfo)
Text(this.UIAbilityInfo)
.fontSize(20)
.onClick(()=>{
this.UIabilityInfo = JSON.stringify(this.UIabilityContext.UIabilityInfo)
console.log(`ContextDemo abilityInfo= ${this.UIabilityInfo}`)
.onClick(() => {
this.UIAbilityInfo = JSON.stringify(this.UIAbilityContext.abilityInfo)
console.log(`ContextDemo abilityInfo = ${this.UIAbilityInfo}`)
})
}
.width('100%')
......@@ -356,3 +435,51 @@ struct AbilityContextTest {
}
}
```
## What should I do when starting a continuous task fails?
Applicable to: OpenHarmony 3.2 Release (API version 9)
**Symptom**
A ServiceAbility is started by calling **featureAbility.startAbility\(\)**. When the ServiceAbility attempts to start a continuous task, the error message \{"code":201,"message":"BussinessError 201: Permission denied."\} is reported.
**Solution**
To start a continuous task in the background, you must configure the permission **ohos.permission.KEEP\_BACKGROUND\_RUNNING** in the **module.json5** file and declare the background mode for the ability that needs to use the continuous task.
```
"module": {
"abilities": [
{
"backgroundModes": [
"dataTransfer",
"location"
], // Background mode
}
],
"requestPermissions": [
{
"name": "ohos.permission.KEEP_BACKGROUND_RUNNING" // Continuous task permission
}
]
}
```
**Reference**
[ServiceAbility Configuration Items - backgroundModes](../application-models/serviceability-configuration.md)
[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)
## How do FA widgets exchange data?
Applicable to: OpenHarmony 3.2 Beta5 (API version 9)
The widget interacts with the widget provider through the **postCardAction** API, and the provider updates data through the **updateForm** API.
**Reference**
[Widget Development in the FA Model](../application-models/widget-development-fa.md)
......@@ -2,7 +2,7 @@
## How do I determine whether an application is a system application?
Applicable to: OpenHarmony 3.2 Beta 5 (API version 9)
Applicable to: OpenHarmony 3.2 Beta5 (API version 9)
**Solution**
......@@ -14,7 +14,7 @@ Use **bundleManager.getApplicationInfo** (available only for system applications
## How do I obtain the version code and version name of an application?
Applicable to: OpenHarmony 3.2 Beta 5 (API version 9)
Applicable to: OpenHarmony 3.2 Beta5 (API version 9)
**Solution**
......@@ -96,7 +96,7 @@ Applicable to: OpenHarmony 3.2 Beta5
## How do I obtain the source file path of the current application?
Applicable to: OpenHarmony 3.2 Beta 5 (API version 9)
Applicable to: OpenHarmony 3.2 Beta5 (API version 9)
**Solution**
......@@ -121,6 +121,81 @@ Applicable to: OpenHarmony 3.2 Beta 5 (API version 9)
## Can I obtain the HAP information of other applications from the current application?
Applicable to: OpenHarmony 3.2 (API version 9)
**Solution**
Currently, only system applications can call the API to query information about other applications.
- To query information about an application in the system, you must obtain the normal-level permission **ohos.permission.GET\_BUNDLE\_INFO** and call the **bundleManager.getApplicationInfo\(\)** API.
- To query information about all applications in the system, you must obtain the system\_basic-level permission **ohos.permission.GET\_BUNDLE\_INFO\_PRIVILEGED** and call the **bundleManager.getAllApplicationInfo\(\)** API.
**Reference**
[@ohos.bundle.bundleManager \(bundleManager\)](../reference/apis/js-apis-bundleManager.md)
## How do I query the PID of a process?
Applicable to: OpenHarmony 3.2 Beta (API version 9)
**Solution**
You can obtain the PID through the **@ohos.process** interface.
**Example**
```
import process from '@ohos.process';
private pid = process.pid;
```
**Reference**
[@ohos.process \ (Obtaining Process Information\)](../reference/apis/js-apis-process.md)
## How do I disable the maximize button?
Applicable to: OpenHarmony 3.2 Beta (API version 9)
According to the OpenHarmony security design specifications, the SDK does not provide APIs for third-party applications to obtain bundle information (including but not limited to the application name and version number) of other applications.
**Solution**
You can use the **supportWindowModes** field to specify whether to display the maximize button.
- **full\_screen** means that a window in full-screen mode is supported.
- **split** means that a window in split-screen mode is supported.
- **floating** means that a floating window is supported.
**Example**
```
"abilities": [
{
"name": "EntryAbility",
"srcEntry": "./ets/entryability/EntryAbility.ts",
"description": "$string:EntryAbility_desc",
"icon": "$media:icon",
"label": "$string:EntryAbility_label",
"startWindowIcon": "$media:icon",
"startWindowBackground": "$color:start_window_background",
"exported": true,
"supportWindowMode": ["split", "floating"],
"skills": [
{
"entities": [
"entity.system.home"
],
"actions": [
"action.system.home"
]
}
]
}
]
```
**Reference**
[supportWindowModes](../reference/apis/js-apis-bundleManager-abilityInfo.md)
......@@ -23,7 +23,7 @@ try {
## How do I hide the status bar to get the immersive effect?
Applicable to: OpenHarmony 3.2 Beta5 (API version 9, stage model)
Applicable to: OpenHarmony 3.2 Beta5 (API version 9)
**Solution**
......@@ -59,7 +59,7 @@ Applicable to: OpenHarmony 3.2 Beta5 (API version 9, stage model)
## How do I obtain the window width and height?
Applicable to: OpenHarmony SDK 3.2 Beta5 (API version 9, stage model)
Applicable to: OpenHarmony 3.2 Beta5 (API version 9, stage model)
**Solution**
......@@ -90,3 +90,32 @@ try {
console.error('Failed to obtain the top window. Cause: ' + JSON.stringify(exception));
}
```
## How do I perform Gaussian blurring on images?
Applicable to: OpenHarmony 3.2 Beta5 (API version 9)
**Solution**
Import the **@ohos.multimedia.image** and **@ohos.effectKit** modules to process the image and add the blur effect.
**Example**
```
import image from "@ohos.multimedia.image";
import effectKit from "@ohos.effectKit";
const color = new ArrayBuffer(96);
let opts = { editable: true, pixelFormat: 3, size: { height: 4, width: 6 } };
image.createPixelMap(color, opts).then((pixelMap) => {
let radius = 5;
let headFilter = effectKit.createEffect(pixelMap);
if (headFilter != null) {
headFilter.blur(radius);
}
})
```
**Reference**
[blur](../reference/apis/js-apis-effectKit.md#blur)
......@@ -2,7 +2,7 @@
## How do I obtain the frame data of a camera when using the XComponent to display the preview output stream of the camera?
Applicable to: OpenHarmony 3.2 (API version 9, stage model)
Applicable to: OpenHarmony 3.2 (API version 9)
**Symptom**
......@@ -35,7 +35,7 @@ Create a dual-channel preview to obtain the frame data.
## How do I obtain the preview image of the front camera?
Applicable to: OpenHarmony 3.2 (API version 9, stage model)
Applicable to: OpenHarmony 3.2 (API version 9)
**Solution**
......@@ -76,7 +76,7 @@ Applicable to: OpenHarmony 3.2 (API version 9, stage model)
## How do I set the camera focal length?
Applicable to: OpenHarmony 3.2 (API version 9, stage model)
Applicable to: OpenHarmony 3.2 (API version 9)
**Solution**
......@@ -86,7 +86,7 @@ Applicable to: OpenHarmony 3.2 (API version 9, stage model)
## How do I play music in the background?
Applicable to: OpenHarmony 3.2 (API version 9, stage model)
Applicable to: OpenHarmony 3.2 (API version 9)
**Symptom**
......@@ -105,7 +105,7 @@ Music cannot be played in the background.
## What should I do when multiple video components cannot be used for playback?
Applicable to: OpenHarmony 3.2 (API version 9, stage model)
Applicable to: OpenHarmony 3.2 (API version 9)
**Symptom**
......@@ -115,10 +115,9 @@ A large number of video components are created. They cannot play media normally
A maximum of 13 media player instances can be created.
## How do I invoke the image library directly?
Applicable to: OpenHarmony 3.2 (API version 9, stage model)
Applicable to: OpenHarmony 3.2 (API version 9)
**Solution**
......@@ -133,3 +132,69 @@ let want = {
let context = getContext(this) as common.UIAbilityContext;
context.startAbility(want);
```
## How do I apply for the media read/write permission on a device?
Applicable to: OpenHarmony 3.2 (API version 9, stage model)
**Solution**
1. Configure the permissions **ohos.permission.READ\_MEDIA** and **ohos.permission.WRITE\_MEDIA** in the **module.json5** file.
Example:
```
{
"module" : {
"requestPermissions":[
{
"name" : "ohos.permission.READ_MEDIA",
"reason": "$string:reason"
},
{
"name" : "ohos.permission.WRITE_MEDIA",
"reason": "$string:reason"
}
]
}
}
```
2. Call **requestPermissionsFromUser** to request the permissions from end users in the form of a dialog box. This operation is required because the grant mode of both permissions is **user\_grant**.
```
let context = getContext(this) as common.UIAbilityContext;
let atManager = abilityAccessCtrl.createAtManager();
let permissions: Array<string> = ['ohos.permission.READ_MEDIA','ohos.permission.WRITE_MEDIA']
atManager.requestPermissionsFromUser(context, permissions)
.then((data) => {
console.log("Succeed to request permission from user with data: " + JSON.stringify(data))
}).catch((error) => {
console.log("Failed to request permission from user with error: " + JSON.stringify(error))
})
```
## How do I obtain the camera status?
Applicable to: OpenHarmony 3.2 (API version 9, stage model)
**Solution**
The **cameraManager** class provides a listener to subscribe to the camera status.
```
cameraManager.on('cameraStatus', (cameraStatusInfo) => {
console.log(`camera : ${cameraStatusInfo.camera.cameraId}`);
console.log(`status: ${cameraStatusInfo.status}`);
})
```
CameraStatus: Enumerates the camera statuses.
- **CAMERA_STATUS_APPEAR** (0): A camera appears.
- **CAMERA_STATUS_DISAPPEAR** (1): The camera disappears.
- **CAMERA_STATUS_AVAILABLE** (2): The camera is available.
- **CAMERA_STATUS_UNAVAILABLE** (3): The camera is unavailable.
**Reference**
[CameraStatus](../reference/apis/js-apis-camera.md#oncamerastatus)
\ No newline at end of file
......@@ -2,6 +2,24 @@
## Are the APIs used for obtaining PPG and ECG sensor data open to individual developers?
Applicable to: OpenHarmony 3.1 Beta 5 (API version 9)
Applicable to: OpenHarmony 3.1 Beta5 (API version 9)
Data collected by the PPG and ECG sensors of wearable devices is personal privacy data. Therefore, relative APIs are not open to individual developers.
## What should I do when error code 201 is reported during the calling of a vibrator API?
Applicable to: OpenHarmony 3.2 (API version 9, stage model)
**Symptom**
The following error message (error code 201) is reported when an API of the vibrator module is called:
vibrate fail, error.code: 201error.message: NaN
**Solution**
Permission verification failed. You must apply for the **ohos.permission.VIBRATE** permission.
**Reference**
[Applying for Permissions](../security/accesstoken-guidelines.md)
\ No newline at end of file
......@@ -2,19 +2,19 @@
## How do I obtain available third-party libraries?
Applicable to: OpenHarmony 3.1 Beta 5 (API version 9)
Applicable to: OpenHarmony 3.1 Beta5 (API version 9)
The three-party and four-party libraries that can be obtained through ohpm are summarized in the [OpenHarmony-TPC/tpc_resource repository](https://gitee.com/openharmony-tpc/tpc_resource). You can access this repository, and find the desired component based on the directory index.
## Which third-party libraries are related to network requests?
Applicable to: OpenHarmony 3.1 Beta 5 (API version 9)
Applicable to: OpenHarmony 3.1 Beta5 (API version 9)
The following third-party libraries are related to network requests: [Axios](https://gitee.com/openharmony-sig/axios), httpclient, and okdownload. For details, see the [OpenHarmony-TPC/tpc_resource repository](https://gitee.com/openharmony-tpc/tpc_resource).
## How do I use ohpm to import third- and fourth-party libraries?
Applicable to: OpenHarmony 3.1 Beta 5 (API version 9)
Applicable to: OpenHarmony 3.1 Beta5 (API version 9)
**Solution**
......
......@@ -2,7 +2,7 @@
## How do I obtain the height of the status bar and navigation bar?
Applicable to: OpenHarmony 3.2 Beta 5 (API version 9)
Applicable to: OpenHarmony 3.2 Beta5 (API version 9)
**Solution**
......@@ -44,7 +44,7 @@ export default class MainAbility extends Ability {
## How do I hide the status bar on the top of an application?
Applicable to: OpenHarmony 3.2 Beta 5 (API version 9)
Applicable to: OpenHarmony 3.2 Beta5 (API version 9)
**Solution**
......@@ -62,3 +62,101 @@ onWindowStageCreate(windowStage){
**Reference**
[Window](../reference/apis/js-apis-window.md)
## How do I lock the window in portrait mode so that it does not rotate with the device?
Applicable to: OpenHarmony SDK 3.2 Beta5 (API version 9, stage model)
**Solution**
To lock the window in portrait mode, call **setPreferredOrientation** of the window module, with **orientation** set to **window.Orientation.PORTRAIT**.
**Example**
```
import window from "@ohos.window";
// 1. Obtain a Window instance. Specifically, you can call createWindow to create a window or findWindow to obtain an existing window.
let windowClass = null;
let config = {name: "alertWindow", windowType: window.WindowType.TYPE_SYSTEM_ALERT, ctx: this.context};
try {
let promise = window.createWindow(config);
promise.then((data)=> {
windowClass = data;
console.info('Succeeded in creating the window. Data:' + JSON.stringify(data));
}).catch((err)=>{
console.error('Failed to create the Window. Cause:' + JSON.stringify(err));
});} catch (exception) {
console.error('Failed to create the window. Cause: ' + JSON.stringify(exception));
}
// 2. Call setPreferredOrientation to set the window orientation. The value PROTRAIT indicates that the window is displayed in portrait mode.
let orientation = window.Orientation.PORTRAIT;
if (windowClass) {
windowClass.setPreferredOrientation(orientation, (err) => {
if (err.code) {
console.error('Failed to set window orientation. Cause: ' + JSON.stringify(err));
return;
}
console.info('Succeeded in setting window orientation.');
}
```
**Reference**
[window.Orientation](../reference/apis/js-apis-window.md#orientation9)
## Why do the isStatusBarLightIcon and isNavigationBarLightIcon attributes set by calling setWindowSystemBarProperties not take effect?
Applicable to: OpenHarmony SDK 3.2 Beta5 (API version 9, stage model)
**Solution**
In effect, the **isStatusBarLightIcon** and **isNavigationBarLightIcon** attributes turn the font white when set to **true**. If **statusBarContentColor** is also set in **setWindowSystemBarProperties**, the **isStatusBarLightIcon** attribute does not take effect. Similarly, if **navigationBarContentColor** is set, the **isNavigationBarLightIcon** attribute does not take effect.
**Reference**
[window.SystemBarProperties](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/reference/apis/js-apis-window.md#systembarproperties)
## How do I keep the screen always on?
Applicable to: OpenHarmony 3.2 Beta5 (API version 9)
**Solution**
Obtain a **Window** instance, and call [setWindowKeepScreenOn](../reference/apis/js-apis-window.md#setwindowkeepscreenon9) to keep the screen always on.
```
let isKeepScreenOn = true;
try {
windowClass.setWindowKeepScreenOn(isKeepScreenOn, (err) => {
if (err.code) {
console.error('Failed to set the screen to be always on. Cause: ' + JSON.stringify(err));
return;
}
console.info('Succeeded in setting the screen to be always on.');
});
} catch (exception) {
console.error('Failed to set the screen to be always on. Cause: ' + JSON.stringify(exception));
}
```
## How do I listen for window size changes?
Applicable to: OpenHarmony 3.2 Beta5 (API version 9)
**Solution**
Obtain a **Window** instance, and call **on\('windowSizeChange'\)** to listen for window size changes.
```
try {
windowClass.on('windowSizeChange', (data) => {
console.info('Succeeded in enabling the listener for window size changes. Data: ' + JSON.stringify(data));
});
} catch (exception) {
console.error('Failed to enable the listener for window size changes. Cause: ' + JSON.stringify(exception));
}
```
**Reference**
[window.on\("windowSizeChange"\)](../reference/apis/js-apis-window.md#onwindowsizechange7)
# Using Native APIs (NDK) of the OHOS SDK in a CMake Project
## What Is Native API
For details, see [Native APIs](https://gitee.com/openharmony/docs/blob/master/en/application-dev/napi/Readme-EN.md).
## Downloading the NDK
You download the Native API Development Kit (NDK) by downloading the OHOS SDK, where the NDK is included. To download the OHOS SDK, use any of the following modes:
- (Recommended) Acquire source code from mirrors for an officially released version. For details, see [release notes](https://gitee.com/openharmony/docs/tree/master/en/release-notes#/openharmony/docs/blob/master/en/release-notes/OpenHarmony-v3.2-release.md).
- Download the SDK from the SDK Manager in DevEco Studio.
- Download the SDK from the [daily build](http://ci.openharmony.cn/dailys/dailybuilds), by clicking the download link to the ohos-sdk component.
![Download from Daily Build](figures/ci_download.png)
## Decompressing the NDK
Place the downloaded NDK in a folder you prefer and decompress it. Below shows the directory structure after decompression.
![SDK Directory Structure](figures/sdk-structure.png)
Configure the Linux environment as follows: (Skip this step if the NDK is downloaded from DevEco Studio.)
1. Add the CMake tool that comes with the NDK to the environment variables.
```
# Open the .bashrc file.
vim ~/.bashrc
# Append the custom CMake path to the file. Save the file and exit.
export PATH=~/ohos-sdk/ohos-sdk/linux/native/build-tools/cmake/bin:$PATH
# Run the source ~/.bashrc command to make the environment variables take effect.
source ~/.bashrc
```
2. Check the default CMake path.
```
# Run the which cmake command.
which cmake
# The result should be the same as the custom path previously appended to the file.
~/ohos-sdk/ohos-sdk/linux/native/build-tools/cmake/bin/cmake
```
## Using the NDK to Compile a Native Program
You can use the NDK to quickly develop a native program, including native dynamic libraries, static libraries, and executable files. The ArkUI application framework can call the native dynamic libraries through the NAPI framework. The following exemplifies how to use the NDK to compile a C/C++ dynamic library in a C/C++ demo project.
### Folders in the NDK
#### build Folder: ohos.toolchain.cmake file
The **ohos.toolchain.cmake** file contains the attributes of the CMake compilation target. Its path must be specified in the **CMAKE_TOOLCHAIN_FILE** parameter so that it can be located during CMake compilation. For details about the mandatory parameters in the **ohos.toolchain.cmake** file, see [Key Parameters in ohos.toolchain.cmake](#key-parameters-in-ohostoolchaincmake).
#### build-tools folder: Build Tool Provided by the NDK
```
# Run the following command to view the CMake version:
cmake -version
# Result
cmake version 3.16.5
CMake suite maintained and supported by Kitware (kitware.com/cmake).
```
#### llvm Folder: Compiler Provided by the NDK
![Compiler](figures/compiler.png)
### Demo Project for the NDK
#### Demo Project Directory
demo
├── CMakeLists.txt
├── include
└── sum.h
└── src
├── CMakeLists.txt
├── sum.cpp
└── hello.cpp
#### CMakeLists.txt in the demo Directory
```
# Specify the minimum CMake version.
CMAKE_MINIMUM_REQUIRED(VERSION 3.16)
# Set the project name, which is HELLO in this example.
PROJECT(HELLO)
# Add a subdirectory and build the subdirectory.
ADD_SUBDIRECTORY(src bin)
```
#### CMakeLists.txt in the src Directory
```
SET(LIBHELLO_SRC hello.cpp)
# Set compilation flags.
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O0")
# Set the link parameter. The value below is only for exemplary purposes.
SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--emit-relocs --verbose")
# Add a libsum dynamic library target. If the compilation is successful, a libsum.so file is generated.
ADD_LIBRARY(sum SHARED sum.cpp)
# Add the executable target called Hello. If the compilation is successful, a Hello executable is generated.
ADD_EXECUTABLE(Hello ${LIBHELLO_SRC})
# Specify the path to the include directory of the Hello target.
TARGET_INCLUDE_DIRECTORIES(Hello PUBLIC ../include)
# Specify the name of the library to be linked to the Hello target.
TARGET_LINK_LIBRARIES(Hello PUBLIC sum)
```
For details about CMake, see [CMake Tutorial](https://cmake.org/cmake/help/v3.16/guide/tutorial/).
#### Source Code
**hello.cpp** source code:
```
#include <iostream>
#include "sum.h"
int main(int argc,const char **argv)
{
std::cout<< "hello world!" <<std::endl;
int total = sum(1, 100);
std::cout<< "Sum 1 + 100=" << total << std::endl;
return 0;
}
```
**sum.h** source code:
```
int sum(int a, int b);
```
sum.cpp source code:
```
#include <iostream>
int sum(int a, int b)
{
return a + b;
}
```
### Key Parameters in ohos.toolchain.cmake
| Parameter | Type|Description|
|--------|------|------|
|OHOS_STL|c++\_shared/c++\_static|STL to use. The value must be consistent across the native libraries in the same application.<br>**c++\_shared** (default): The shared library of libc++, libc++\_shared.so, is used.<br>**c++\static**: The static library of libc++, libc++\_static.a, is used.|
|OHOS_ARCH|armeabi-v7a/arm64-v8a/x86_64|ABI to support. Currently, three types of ABI are supported.|
|OHOS_PLATFORM|OHOS|Target platform. Currently, only OHOS is supported.|
|CMAKE_TOOLCHAIN_FILE|Toolchain file|CMake toolchain file, that is, the aforementioned **ohos.toolchain.cmake** file.|
### Building from Command Line
In the project directory, create the **build** directory to store the intermediate files generated during CMake building.
> **NOTE**
>
> In the following commands, **ohos-sdk** is the root directory of the downloaded SDK. Replace it with the actual directory.
1. Use **OHOS_STL=c++_shared** for dynamic compilation.
```
>mkdir build && cd build
>cmake -DOHOS_STL=c++_shared -DOHOS_ARCH=armeabi-v7a -DOHOS_PLATFORM=OHOS -DCMAKE_TOOLCHAIN_FILE={ohos-sdk}/linux/native/build/cmake/ohos.toolchain.cmake ..
>cmake --build .
```
2. Use **OHOS_STL=c++_static** for static compilation.
```
>mkdir build && cd build
>cmake -DOHOS_STL=c++_static -DOHOS_ARCH=armeabi-v7a -DOHOS_PLATFORM=OHOS -DCMAKE_TOOLCHAIN_FILE={ohos-sdk}/linux/native/build/cmake/ohos.toolchain.cmake ..
>cmake --build .
```
<!--no_check-->
\ No newline at end of file
......@@ -29,14 +29,14 @@ A description regarding system APIs will be provided in the document.
A common application is an application whose application type is **hos_normal_app** in the HarmonyAppProvision configuration file. **hos_normal_app** is the default value for project creation.
The public SDK, which does not include system APIs, is provided as standard in DevEco Studio. To use the system APIs, you must:
- Switch the public SDK to the full SDK by following the instructions provided in [Guide to Switching to Full SDK](../../faqs/full-sdk-switch-guide.md).
- Change the value of **app-feature** in the HarmonyAppProvision configuration file to **hos_system_app**. For details, see [HarmonyAppProvision Configuration File](../../security/app-provision-structure.md).
- Switch the public SDK to the full SDK by following the instructions provided in [Switching to Full SDK](../../faqs/full-sdk-switch-guide.md).
- Change the value of **app-feature** in the HarmonyAppProvision configuration file to **hos_system_app** (indicating a system application). For details, see [HarmonyAppProvision Configuration File](../../security/app-provision-structure.md).
## Permission Description
By default, applications can access limited system resources. However, in some cases, an application needs to access excess data (including personal data) and functions of the system or another application to implement extended functions. For details, see [Access Control (Permission) Overview](../../security/accesstoken-overview.md).
By default, applications can access limited system resources. However, in some cases, an application needs to access excess data (including personal data) and functions of the system or another application to implement extended functions. For details, see [Access Control Overview](../../security/accesstoken-overview.md).
To call APIs to access these resources, you must apply for the corresponding permissions by following the instructions provided in [Applying for Permissions](../../security/accesstoken-guidelines.md).
To call APIs to access these resources, you must apply for the corresponding permissions by following the instructions provided in [Access Control Development](../../security/accesstoken-guidelines.md).
- If an application can call an API only after it has obtained a specific permission, the following description is provided for the API: "**Required permissions**: ohos.permission.xxxx"
- If an application can call an API without any permission, no special description is provided.
......
# @ohos.application.EnvironmentCallback (EnvironmentCallback)
The **EnvironmentCallback** module provides APIs, such as **onConfigurationUpdated** and **onMemoryLevel**, for the application context to listen for system environment changes.
> **NOTE**
>
> The APIs of this module are supported since API version 9 and are deprecated in versions later than API version 9. You are advised to use [@ohos.app.ability.EnvironmentCallback](js-apis-app-ability-environmentCallback.md) instead. Newly added APIs will be marked with a superscript to indicate their earliest API version.
> The APIs of this module can be used only in the stage model.
## Modules to Import
```ts
import EnvironmentCallback from '@ohos.application.EnvironmentCallback';
```
## EnvironmentCallback.onConfigurationUpdated
onConfigurationUpdated(config: Configuration): void;
Called when the system environment changes.
**System capability**: SystemCapability.Ability.AbilityRuntime.AbilityCore
**Parameters**
| Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
| config | [Configuration](js-apis-application-configuration.md) | Yes| **Configuration** object after the change.|
## EnvironmentCallback.onMemoryLevel
onMemoryLevel(level: number): void;
Called when the system memory level changes.
**System capability**: SystemCapability.Ability.AbilityRuntime.AbilityCore
**Parameters**
| Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
| level | [MemoryLevel](js-apis-app-ability-abilityConstant.md#abilityconstantmemorylevel) | Yes| New memory level.|
**Example**
```ts
import UIAbility from '@ohos.app.ability.UIAbility';
let callbackId;
export default class EntryAbility extends UIAbility {
onCreate() {
console.log('MyAbility onCreate');
globalThis.applicationContext = this.context.getApplicationContext();
let environmentCallback = {
onConfigurationUpdated(config){
console.log('onConfigurationUpdated config: ${JSON.stringify(config)}');
},
onMemoryLevel(level){
console.log('onMemoryLevel level: ${level}');
}
};
// 1. Obtain an applicationContext object.
let applicationContext = globalThis.applicationContext;
// 2. Register a listener for the environment changes through the applicationContext object.
callbackId = applicationContext.registerEnvironmentCallback(environmentCallback);
console.log('registerEnvironmentCallback number: ${JSON.stringify(callbackId)}');
}
onDestroy() {
let applicationContext = globalThis.applicationContext;
applicationContext.unregisterEnvironmentCallback(callbackId, (error, data) => {
if (error && error.code !== 0) {
console.error('unregisterEnvironmentCallback fail, error: ${JSON.stringify(error)}');
} else {
console.log('unregisterEnvironmentCallback success, data: ${JSON.stringify(data)}');
}
});
}
}
```
## PacMap
[key: string]: number | string | boolean | Array\<string | number | boolean> | null;
**System capability**: SystemCapability.Ability.AbilityRuntime.FAModel
| Name| Type| Mandatory| Description|
| ------ | ------ | ------ | ------ |
| [key: string] | number \| string \| boolean \| Array\<string \| number \| boolean\> \| null | Yes| Data stored in key-value pairs.|
......@@ -67,6 +67,7 @@
- [Application Event Logging Error Codes](errorcode-hiappevent.md)
- [HiSysEvent Error Codes](errorcode-hisysevent.md)
- [HiDebug Error Codes](errorcode-hiviewdfx-hidebug.md)
- [Log Library Error Codes](errorcode-loglibrary.md)
- [Input Method Framework Error Codes](errorcode-inputmethod-framework.md)
- [Pasteboard Error Codes](errorcode-pasteboard.md)
- [Screen Lock Management Error Codes](errorcode-screenlock.md)
......@@ -82,7 +83,8 @@
- [Thermal Manager Error Codes](errorcode-thermal.md)
- [Device Management Error Codes](errorcode-device-manager.md)
- [Location Subsystem Error Codes](errorcode-geoLocationManager.md)
- [Screen Hopping Error Codes](errorcode-multimodalinput.md)
- [Screen Hopping Error Codes](errorcode-devicestatus.md)
- [Screen Hopping Error Codes (to Be Deprecated)](errorcode-multimodalinput.md)
- [Sensor Error Codes](errorcode-sensor.md)
- [Vibrator Error Codes](errorcode-vibrator.md)
- [System Parameter Error Codes](errorcode-system-parameterV9.md)
......
......@@ -12,7 +12,7 @@ However, you can customize an animation to be played during the display or hidin
> **NOTE**
>
> This document involves the use of system APIs. Use the full SDK for development. For details, see [Guide to Switching to Full SDK](../quick-start/full-sdk-switch-guide.md).
> This document involves the use of system APIs. Use the full SDK for development. For details, see [Guide to Switching to Full SDK](../faqs/full-sdk-switch-guide.md).
## Available APIs
......
......@@ -36,7 +36,7 @@ The Contacts application allows third-party applications to invoke the system ca
| -------- | -------- | -------- |
| OpenHarmony | 3.1.1 Release | NA |
| Public SDK | Ohos_sdk_public 3.1.6.6 (API Version 8 Release)| This toolkit is intended for application developers and does not contain system APIs that require system permissions.<br>It is provided as standard in DevEco Studio 3.0 Beta4 or later.<br>The public SDK of API version 8 was released on July 6, 2022.|
| Full SDK | Ohos_sdk_full&nbsp;3.1.6.5 (API Version 8 Release) | This toolkit is intended for original equipment manufacturers (OEMs) and contains system APIs that require system permissions.<br>To use the full SDK, manually obtain it from the mirror and switch to it in DevEco Studio. For details, see [Guide to Switching to Full SDK](../application-dev/quick-start/full-sdk-switch-guide.md).|
| Full SDK | Ohos_sdk_full 3.1.6.5 (API Version 8 Release) | This toolkit is intended for original equipment manufacturers (OEMs) and contains system APIs that require system permissions.<br>To use the full SDK, manually obtain it from the mirror and switch to it in DevEco Studio. For details, see [Guide to Switching to Full SDK](../application-dev/faqs/full-sdk-switch-guide.md).|
| (Optional) HUAWEI DevEco Studio| 3.0 Beta3 for OpenHarmony | This tool is recommended for developing OpenHarmony applications.|
| (Optional) HUAWEI DevEco Device Tool| 3.0 Release | This tool is recommended for developing OpenHarmony smart devices.|
......
......@@ -21,7 +21,7 @@ Fixed known SDK defects, and released the latest SDK version.
| Software/Tool| Version| Remarks|
| -------- | -------- | -------- |
| OpenHarmony | 3.1.2 Release| N/A|
| Full SDK | Ohos_sdk_full&nbsp;3.1.7.7&nbsp;(API&nbsp;Version&nbsp;8&nbsp;Relese)<br>Ohos_sdk_full&nbsp;3.1.7.5&nbsp;(API&nbsp;Version&nbsp;8&nbsp;Relese) | This toolkit is intended for original equipment manufacturers (OEMs) and contains system APIs that require system permissions.<br>To use the Full SDK, you must manually obtain it from the mirror and switch to it in DevEco Studio. For details, see [Guide to Switching to Full SDK](https://gitee.com/openharmony/docs/blob/master/en/application-dev/quick-start/full-sdk-switch-guide.md).|
| Full SDK | Ohos_sdk_full 3.1.7.7 (API Version 8 Relese)<br>Ohos_sdk_full 3.1.7.5 (API Version 8 Relese) | This toolkit is intended for original equipment manufacturers (OEMs) and contains system APIs that require system permissions.<br>To use the full SDK, manually obtain it from the mirror and switch to it in DevEco Studio. For details, see [Guide to Switching to Full SDK](../application-dev/faqs/full-sdk-switch-guide.md).|
| Public SDK | Ohos_sdk_public&nbsp;3.1.7.7&nbsp;(API&nbsp;Version&nbsp;8&nbsp;Release)<br>Ohos_sdk_public 3.1.7.5 (API Version 8 Release) | This toolkit is intended for application developers and does not contain system APIs that require system permissions.<br>It is provided as standard in DevEco Studio 3.0 Beta4 or later.|
| (Optional) HUAWEI DevEco Studio| 3.0 Beta4 for OpenHarmony | Recommended for developing OpenHarmony applications.|
| (Optional) HUAWEI DevEco Device Tool| 3.0 Release | Recommended for developing OpenHarmony devices.|
......@@ -36,7 +36,7 @@ Fixed known SDK defects, and released the latest SDK version.
2. Register an SSH public key for access to Gitee.
3. Install the [git client](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git) and [git-lfs](https://gitee.com/vcs-all-in-one/git-lfs?_from=gitee_search#downloading), and configure user information.
3. Install the [Git client](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git) and [git-lfs](https://gitee.com/vcs-all-in-one/git-lfs?_from=gitee_search#downloading), and configure basic user information.
```
git config --global user.name "yourname"
......@@ -117,7 +117,7 @@ This version does not involve API updates.
### Chip and Development Board Adaptation
For details about the adaptation status, see [SIG_DevBoard](https://gitee.com/openharmony/community/blob/master/sig/sig_devboard/sig_devboard.md).
For details about the adaptation status, see [SIG-Devboard](https://gitee.com/openharmony/community/blob/master/sig/sig_devboard/sig_devboard.md).
## Resolved Issues
......
......@@ -13,7 +13,7 @@ OpenHarmony 3.1.3 Release provides enhanced system security over OpenHarmony 3.1
| Software/Tool| Version| Remarks|
| -------- | -------- | -------- |
| OpenHarmony | 3.1.3 Release | NA |
| Full SDK| Ohos_sdk_full 3.1.7.7 (API Version 8 Release)| This toolkit is intended for original equipment manufacturers (OEMs) and contains system APIs that require system permissions.<br>To use the Full SDK, you must manually obtain it from the mirror and switch to it in DevEco Studio. For details, see [Guide to Switching to Full SDK](../application-dev/quick-start/full-sdk-switch-guide.md). |
| Full SDK| Ohos_sdk_full 3.1.7.7 (API Version 8 Release)| This toolkit is intended for original equipment manufacturers (OEMs) and contains system APIs that require system permissions.<br>To use the Full SDK, you must manually obtain it from the mirror and switch to it in DevEco Studio. For details, see [Guide to Switching to Full SDK](../application-dev/faqs/full-sdk-switch-guide.md). |
| Public SDK| Ohos_sdk_public 3.1.7.7 (API Version 8 Release)| This toolkit is intended for application developers and does not contain system APIs that require system permissions.<br>It is provided as standard in DevEco Studio 3.0 Beta4 or later.|
| (Optional) HUAWEI DevEco Studio| 3.0 Release for OpenHarmony| Recommended for developing OpenHarmony applications|
| (Optional) HUAWEI DevEco Device Tool| 3.0 Release| Recommended for developing OpenHarmony smart devices|
......
......@@ -13,7 +13,7 @@ OpenHarmony 3.1.4 Release provides enhanced system security over OpenHarmony 3.1
| Software/Tool| Version| Remarks|
| -------- | -------- | -------- |
| OpenHarmony | 3.1.4 Release| NA |
| Full SDK | Ohos_sdk_full&nbsp;3.1.9.7&nbsp;(API&nbsp;Version&nbsp;8&nbsp;Relese) | This toolkit is intended for original equipment manufacturers (OEMs) and contains system APIs that require system permissions.<br>To use the Full SDK, you must manually obtain it from the mirror and switch to it in DevEco Studio. For details, see [Guide to Switching to Full SDK](../application-dev/quick-start/full-sdk-switch-guide.md).|
| Full SDK | Ohos_sdk_full 3.1.9.7 (API Version 8 Relese) | This toolkit is intended for original equipment manufacturers (OEMs) and contains system APIs that require system permissions.<br>To use the Full SDK, you must manually obtain it from the mirror and switch to it in DevEco Studio. For details, see [Guide to Switching to Full SDK](../application-dev/faqs/full-sdk-switch-guide.md).|
| Public SDK | Ohos_sdk_public 3.1.9.7 (API Version 8 Release)| This toolkit is intended for application developers and does not contain system APIs that require system permissions.<br>It is provided as standard in DevEco Studio 3.0 Beta4 or later.|
| (Optional) HUAWEI DevEco Studio| 3.1 Preview for OpenHarmony| Recommended for developing OpenHarmony applications|
| (Optional) HUAWEI DevEco Device Tool| 3.0 Release| Recommended for developing OpenHarmony smart devices|
......
......@@ -13,7 +13,7 @@ OpenHarmony 3.1.5 Release provides enhanced system security over OpenHarmony 3.1
| Software/Tool| Version| Remarks|
| -------- | -------- | -------- |
| OpenHarmony | 3.1.5 Release| NA |
| Full SDK | Ohos_sdk_full 3.1.11.5 (API Version 8 Release)| This toolkit is intended for original equipment manufacturers (OEMs) and contains system APIs that require system permissions.<br>To use the Full SDK, you must manually obtain it from the mirror and switch to it in DevEco Studio. For details, see [Guide to Switching to Full SDK](../application-dev/quick-start/full-sdk-switch-guide.md).|
| Full SDK | Ohos_sdk_full 3.1.11.5 (API Version 8 Release)| This toolkit is intended for original equipment manufacturers (OEMs) and contains system APIs that require system permissions.<br>To use the Full SDK, you must manually obtain it from the mirror and switch to it in DevEco Studio. For details, see [Guide to Switching to Full SDK](../application-dev/faqs/full-sdk-switch-guide.md).|
| Public SDK | Ohos_sdk_public 3.1.11.5 (API Version 8 Release)| This toolkit is intended for application developers and does not contain system APIs that require system permissions.<br>It is provided as standard in DevEco Studio 3.0 Beta4 or later.|
| (Optional) HUAWEI DevEco Studio| 3.1 Preview for OpenHarmony| Recommended for developing OpenHarmony applications|
| (Optional) HUAWEI DevEco Device Tool| 3.0 Release| Recommended for developing OpenHarmony smart devices|
......
......@@ -13,7 +13,7 @@ OpenHarmony 3.1.6 Release provides enhanced system security over OpenHarmony 3.1
| Software/Tool| Version| Remarks|
| -------- | -------- | -------- |
| OpenHarmony | 3.1.6 Release | NA |
| Full SDK | Ohos_sdk_full 3.1.12.5 (API Version 8 Release)| This toolkit is intended for original equipment manufacturers (OEMs) and contains system APIs that require system permissions.<br>To use the Full SDK, you must manually obtain it from the mirror and switch to it in DevEco Studio. For details, see [Guide to Switching to Full SDK](../application-dev/quick-start/full-sdk-switch-guide.md).|
| Full SDK | Ohos_sdk_full 3.1.12.5 (API Version 8 Release)| This toolkit is intended for original equipment manufacturers (OEMs) and contains system APIs that require system permissions.<br>To use the Full SDK, you must manually obtain it from the mirror and switch to it in DevEco Studio. For details, see [Guide to Switching to Full SDK](../application-dev/faqs/full-sdk-switch-guide.md).|
| Public SDK | Ohos_sdk_public 3.1.12.5 (API Version 8 Release)| This toolkit is intended for application developers and does not contain system APIs that require system permissions.<br>It is provided as standard in DevEco Studio 3.0 Beta4 or later.|
| (Optional) HUAWEI DevEco Studio| 3.1 Preview for OpenHarmony| Recommended for developing OpenHarmony applications|
| (Optional) HUAWEI DevEco Device Tool| 3.0 Release| Recommended for developing OpenHarmony smart devices|
......
......@@ -12,7 +12,7 @@ OpenHarmony 3.1.7 Release provides enhanced system security over OpenHarmony 3.1
| Software/Tool | Version | Remarks |
| ------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ |
| OpenHarmony | 3.1.7 Release | NA |
| Full SDK | Ohos_sdk_full 3.1.13.5 (API Version 8 Release)| This toolkit is intended for original equipment manufacturers (OEMs) and contains system APIs that require system permissions.<br>To use the Full SDK, you must manually obtain it from the mirror and switch to it in DevEco Studio. For details, see [Guide to Switching to Full SDK](../application-dev/quick-start/full-sdk-switch-guide.md).|
| Full SDK | Ohos_sdk_full 3.1.13.5 (API Version 8 Release)| This toolkit is intended for original equipment manufacturers (OEMs) and contains system APIs that require system permissions.<br>To use the Full SDK, you must manually obtain it from the mirror and switch to it in DevEco Studio. For details, see [Guide to Switching to Full SDK](../application-dev/faqs/full-sdk-switch-guide.md).|
| Public SDK | Ohos_sdk_public 3.1.13.5 (API Version 8 Release)| This toolkit is intended for application developers and does not contain system APIs that require system permissions.<br>It is provided as standard in DevEco Studio 3.0 Beta4 or later.|
| (Optional) HUAWEI DevEco Studio | 3.1 Preview for OpenHarmony | Recommended for developing OpenHarmony applications |
| (Optional) HUAWEI DevEco Device Tool| 3.0 Release | Recommended for developing OpenHarmony smart devices |
......
......@@ -36,7 +36,7 @@ Added samples such as Gobang, QR code generation and parsing, widget usage, mult
| -------- | -------- | -------- |
| OpenHarmony | 3.2 Beta2 | NA |
| Public SDK | Ohos_sdk_public 3.2.5.5 (API Version 9 Beta2)<br>Ohos_sdk_public 3.2.5.6 (API Version 9 Beta2) | This toolkit is intended for application developers and does not contain system APIs that require system permissions.<br>It is provided as standard in DevEco Studio.|
| Full SDK | Ohos_sdk_full 3.2.5.5 (API Version 9 Beta2)<br>Ohos_sdk_full 3.2.5.6 (API Version 9 Beta2) | This toolkit is intended for original equipment manufacturers (OEMs) and contains system APIs that require system permissions.<br>To use the full SDK, manually obtain it from the mirror and switch to it in DevEco Studio. For details, see [Guide to Switching to Full SDK](../application-dev/quick-start/full-sdk-switch-guide.md).|
| Full SDK | Ohos_sdk_full 3.2.5.5 (API Version 9 Beta2)<br>Ohos_sdk_full 3.2.5.6 (API Version 9 Beta2) | This toolkit is intended for original equipment manufacturers (OEMs) and contains system APIs that require system permissions.<br>To use the full SDK, manually obtain it from the mirror and switch to it in DevEco Studio. For details, see [Guide to Switching to Full SDK](../application-dev/faqs/full-sdk-switch-guide.md).|
| (Optional) HUAWEI DevEco Studio| 3.0 Beta4 | This tool is recommended for developing OpenHarmony applications.|
| (Optional) HUAWEI DevEco Device Tool| 3.0 Release | This tool is recommended for developing OpenHarmony smart devices.|
......@@ -132,7 +132,7 @@ This version has the following updates to OpenHarmony 3.2 Beta1.
### SDK Updates
From this version onwards, both the Public SDK and Full SDK are provided. The Public SDK is provided as standard in DevEco Studio.
If an application developed using the SDK of an earlier version calls system APIs, you must manually switch to the Full SDK by following the instructions provided in [Guide to Switching to Full SDK](../application-dev/quick-start/full-sdk-switch-guide.md) after the version upgrade. This operation ensures successful build of your application project.
If an application developed using the SDK of an earlier version calls system APIs, you must manually switch to the Full SDK by following the instructions provided in [Guide to Switching to Full SDK](../application-dev/faqs/full-sdk-switch-guide.md) after the version upgrade. This operation ensures successful build of your application project.
### Feature Updates
......
......@@ -54,7 +54,7 @@ The distributed database supports cross-device and cross-application sharing. Th
| -------- | -------- | -------- |
| OpenHarmony | 3.2 Beta3| NA |
| Public SDK | Ohos_sdk_public 3.2.7.5 (API Version 9 Beta3)<br>Ohos_sdk_public&nbsp;3.2.7.6&nbsp;(API&nbsp;Version&nbsp;9&nbsp;Beta3) | This toolkit is intended for application developers and does not contain system APIs that require system permissions.<br>It is provided as standard in DevEco Studio.|
| Full SDK | Ohos_sdk_full 3.2.7.5 (API Version 9 Beta3)<br>Ohos_sdk_full&nbsp;3.2.7.6&nbsp;(API&nbsp;Version&nbsp;9&nbsp;Beta3) | This toolkit is intended for original equipment manufacturers (OEMs) and contains system APIs that require system permissions.<br>To use the full SDK, manually obtain it from the mirror and switch to it in DevEco Studio. For details, see [Guide to Switching to Full SDK](../application-dev/quick-start/full-sdk-switch-guide.md).|
| Full SDK | Ohos_sdk_full 3.2.7.5 (API Version 9 Beta3)<br>Ohos_sdk_full&nbsp;3.2.7.6&nbsp;(API&nbsp;Version&nbsp;9&nbsp;Beta3) | This toolkit is intended for original equipment manufacturers (OEMs) and contains system APIs that require system permissions.<br>To use the full SDK, manually obtain it from the mirror and switch to it in DevEco Studio. For details, see [Guide to Switching to Full SDK](../application-dev/faqs/full-sdk-switch-guide.md).|
| (Optional) HUAWEI DevEco Studio| 3.0 Release| Recommended for developing OpenHarmony applications.|
| (Optional) HUAWEI DevEco Device Tool| 3.0 Release| Recommended for developing OpenHarmony devices.|
......
......@@ -46,7 +46,7 @@ The distributed hardware supports the request and import of credential parameter
| -------- | -------- | -------- |
| OpenHarmony | 3.2 Beta4 | NA |
| Public SDK | Ohos_sdk_public 3.2.9.2 (API Version 9 Beta4) | This toolkit is intended for application developers and does not contain system APIs that require system permissions. It is provided as standard in DevEco Studio.|
| Full SDK | Ohos_sdk_full 3.2.9.2 (API Version 9 Beta4) | This toolkit is intended for original equipment manufacturers (OEMs) and contains system APIs that require system permissions. To use the Full SDK, you must manually obtain it from the mirror and switch to it in DevEco Studio. For details, see [Guide to Switching to Full SDK](../application-dev/quick-start/full-sdk-switch-guide.md).|
| Full SDK | Ohos_sdk_full 3.2.9.2 (API Version 9 Beta4) | This toolkit is intended for original equipment manufacturers (OEMs) and contains system APIs that require system permissions. To use the Full SDK, you must manually obtain it from the mirror and switch to it in DevEco Studio. For details, see [Guide to Switching to Full SDK](../application-dev/faqs/full-sdk-switch-guide.md).|
| (Optional) HUAWEI DevEco Studio| 3.1 Canary1 | Recommended for developing OpenHarmony applications|
| (Optional) HUAWEI DevEco Device Tool| 3.1 Beta1 | Recommended for developing OpenHarmony smart devices|
......
......@@ -495,7 +495,7 @@ For details, see [DevEco Studio Version Change History](https://developer.harmon
| OpenHarmony | 3.2 Release | NA |
| Public SDK | Ohos_sdk_public 3.2.11.9 (API Version 9 Release) | This toolkit is intended for application developers and does not contain system APIs that require system permissions. It is provided as standard in DevEco Studio.|
| (Optional) HUAWEI DevEco Studio| 3.1 Beta2 | Recommended for developing OpenHarmony applications How to obtain:<br>[Windows(64-bit)](https://contentcenter-vali-drcn.dbankcdn.cn/pvt_2/DeveloperAlliance_package_901_9/f3/v3/uJyuq3syQ2ak4hE1QZmAug/devecostudio-windows-3.1.0.400.zip?HW-CC-KV=V1&HW-CC-Date=20230408T013335Z&HW-CC-Expire=315360000&HW-CC-Sign=96262721EDC9B34E6F62E66884AB7AE2A94C2A7B8C28D6F7FC891F46EB211A70)<br>[Mac(X86)](https://contentcenter-vali-drcn.dbankcdn.cn/pvt_2/DeveloperAlliance_package_901_9/b7/v3/4z3mLQPCQR-g5KlC56SC1w/devecostudio-mac-3.1.0.400.zip?HW-CC-KV=V1&HW-CC-Date=20230408T013430Z&HW-CC-Expire=315360000&HW-CC-Sign=93E83FD1F1CE504EF8F098E08955A938FDA4E4926A2555CF1E02DC8D57210D76)<br>[Mac(ARM)](https://contentcenter-vali-drcn.dbankcdn.cn/pvt_2/DeveloperAlliance_package_901_9/2e/v3/Fl9IY6PiQxqc3tnI2cftiw/devecostudio-mac-arm-3.1.0.400.zip?HW-CC-KV=V1&HW-CC-Date=20230408T013540Z&HW-CC-Expire=315360000&HW-CC-Sign=0906243123734033AAD34A7A005ED7671F00CAA693B6E674F81A094A0159ECCE) |
| (Optional) HUAWEI DevEco Device Tool| 3.1 Release | Recommended for developing OpenHarmony smart devices<br>[Click here](https://device.harmonyos.com/cn/develop/ide/).|
| (Optional) HUAWEI DevEco Device Tool| 3.1 Release | Recommended for developing OpenHarmony smart devices<br>[Click here](https://device.harmonyos.com/en/develop/ide/). |
## Source Code Acquisition
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册