diff --git a/en/application-dev/application-models/Readme-EN.md b/en/application-dev/application-models/Readme-EN.md index aca0bbb39f14d5110bf82d2a610eca7d8b05dd6c..bdfbb5472e9389d57211c10042be0b9055508adc 100644 --- a/en/application-dev/application-models/Readme-EN.md +++ b/en/application-dev/application-models/Readme-EN.md @@ -5,7 +5,7 @@ - [Interpretation of the Application Model](application-model-description.md) - Stage Model Development - [Stage Model Development Overview](stage-model-development-overview.md) - - Stage Mode Application Components + - Stage Model Application Components - [Application- or Component-Level Configuration](application-component-configuration-stage.md) - UIAbility Component - [UIAbility Component Overview](uiability-overview.md) @@ -56,12 +56,13 @@ - [Using Explicit Want to Start an Application Component](ability-startup-with-explicit-want.md) - [Using Implicit Want to Open a Website](ability-startup-with-implicit-want.md) - [Using Want to Share Data Between Applications](data-share-via-want.md) - - [Component Startup Rules](component-startup-rules.md) - - Inter-Device Application Component Interaction (Continuation) + - [Component Startup Rules (Stage Model)](component-startup-rules.md) + - Inter-Device Application Component Interaction (Continuation) - [Continuation Overview](inter-device-interaction-hop-overview.md) - [Cross-Device Migration (for System Applications Only)](hop-cross-device-migration.md) - [Multi-device Collaboration (for System Applications Only)](hop-multi-device-collaboration.md) - [Subscribing to System Environment Variable Changes](subscribe-system-environment-variable-changes.md) + - [Setting Atomic Services to Support Sharing](atomic-services-support-sharing.md) - Process Model - [Process Model Overview](process-model-stage.md) - Common Events @@ -81,12 +82,12 @@ - Mission Management - [Mission Management Scenarios](mission-management-overview.md) - [Mission and Launch Type](mission-management-launch-type.md) - - [Page Stack and MissionList](page-mission-stack.md) + - [Page Stack and Mission List](page-mission-stack.md) - [Setting the Icon and Name of a Mission Snapshot](mission-set-icon-name-for-task-snapshot.md) - [Application Configuration File](config-file-stage.md) - FA Model Development - [FA Model Development Overview](fa-model-development-overview.md) - - FA Mode Application Components + - FA Model Application Components - [Application- or Component-Level Configuration](application-component-configuration-fa.md) - PageAbility Component Development - [PageAbility Component Overview](pageability-overview.md) @@ -119,7 +120,7 @@ - [Widget Development](widget-development-fa.md) - [Context](application-context-fa.md) - [Want](want-fa.md) - - [Component Startup Rules](component-startup-rules-fa.md) + - [Component Startup Rules (FA Model)](component-startup-rules-fa.md) - Process Model - [Process Model Overview](process-model-fa.md) - [Common Events](common-event-fa.md) diff --git a/en/application-dev/application-models/atomic-services-support-sharing.md b/en/application-dev/application-models/atomic-services-support-sharing.md new file mode 100644 index 0000000000000000000000000000000000000000..99feea4719836f576762c3a43b0323c6bf2388cc --- /dev/null +++ b/en/application-dev/application-models/atomic-services-support-sharing.md @@ -0,0 +1,39 @@ +# Setting Atomic Services to Support Sharing +By means of sharing, users can quickly access atomic services and use their features. + +## How to Develop +In the sharing scenario, there are two parties involved: a target application that shares data and an application that obtains the shared data. The two can be physically the same. The target application uses the **onShare()** lifecycle callback to set the data to share. After the target application is started, you can run the **hdc shell aa dump -a** command to check the started services and processes and find its mission ID. After the current application is started, call the **abilityManager.acquireShareData()** API with the mission ID passed in to obtain the shared data. +> **NOTE** +> +> The mission ID of the target application can also be obtained by calling [missionManager.getMissionInfos()](../reference/apis/js-apis-app-ability-missionManager.md#getmissioninfos). + +1. The target application calls **UIAbility.onShare()** provided by the UIAbility component to set the data to share. **ohos.extra.param.key.contentTitle** indicates the title of the content to share in the sharing box, **ohos.extra.param.key.shareAbstract** provides an abstract description of the content, and **ohos.extra.param.key.shareUrl** indicates the online address of the service. You need to set these three items as objects, with the key set to **title**, **abstract**, and **url**, respectively. + + ```ts + import AbilityConstant from '@ohos.app.ability.AbilityConstant'; + class MyUIAbility extends UIAbility { + onShare(wantParams) { + console.log('onShare'); + wantParams['ohos.extra.param.key.contentTitle'] = {title: "W3"}; + wantParams['ohos.extra.param.key.shareAbstract'] = {abstract: "communication for huawei employee"}; + wantParams['ohos.extra.param.key.shareUrl'] = {url: "w3.huawei.com"}; + } + } + ``` + +2. The current application calls **abilityManager.acquireShareData()** to obtain the data shared by the target application. **missionId** indicates the target application's mission ID, which can be obtained by running the **hdc shell aa dump -a** command or calling the **missionManager.getMissionInfos()** API after the target application is started. **wantParam** indicates the data shared by the target application through the **UIAbility.onShare()** lifecycle callback. + + ```ts + import abilityManager from '@ohos.app.ability.abilityManager'; + try { + abilityManager.acquireShareData(1, (err, wantParam) => { + if (err) { + console.error(`acquireShareData fail, err: ${JSON.stringify(err)}`); + } else { + console.log(`acquireShareData success, data: ${JSON.stringify(wantParam)}`); + } + }); + } catch (paramError) { + console.error(`error.code: ${JSON.stringify(paramError.code)}, error.message: ${JSON.stringify(paramError.message)}`); + } + ``` diff --git a/en/application-dev/faqs/Readme-EN.md b/en/application-dev/faqs/Readme-EN.md index 2d2d57ca6bb00f25c3db08338518910905417e5d..195bfc2294b5ba41c00d20bf5b7dec7938248c90 100644 --- a/en/application-dev/faqs/Readme-EN.md +++ b/en/application-dev/faqs/Readme-EN.md @@ -4,7 +4,12 @@ - [Switching to Full SDK](full-sdk-switch-guide.md) - [Application Model Development](faqs-ability.md) - ArkUI Framework Development (ArkTS) - - [ArkUI Development (ArkTS Syntax)](faqs-arkui-arkts.md) + - [ArkTS Syntax Usage](faqs-arkui-arkts.md) + - [ArkUI Component Development (ArkTS)](faqs-arkui-component.md) + - [ArkUI Layout Development (ArkTS)](faqs-arkui-layout.md) + - [ArkUI Routing/Navigation Development (ArkTS)](faqs-arkui-route-nav.md) + - [ArkUI Animation/Interaction Event Development (ArkTS)](faqs-arkui-animation-interactive-event.md) +- [ArkUI Development (JS)](faqs-arkui-js.md) - [Web Development](faqs-arkui-web.md) - [Bundle Management Development](faqs-bundle-management.md) - [Resource Manager Development](faqs-globalization.md) diff --git a/en/application-dev/faqs/faqs-arkui-animation-interactive-event.md b/en/application-dev/faqs/faqs-arkui-animation-interactive-event.md new file mode 100644 index 0000000000000000000000000000000000000000..fbe2594e6591bb774aa116095e721ca889490cc8 --- /dev/null +++ b/en/application-dev/faqs/faqs-arkui-animation-interactive-event.md @@ -0,0 +1,269 @@ +# ArkUI Animation/Interaction Event Development (ArkTS) + +## What should I do if the onBlur and onFocus callbacks cannot be triggered? + +Applicable to: OpenHarmony 3.2 Beta 5 (API version 9) + +**Symptom** + +The **onBlur** and **onFocus** callbacks of the focus event cannot be triggered. + +**Solution** + +Check the trigger device. By default, the focus event (and the **onBlur** and **onFocus** callbacks) can be triggered only by the Tab button and arrow buttons on the connected keyboard. To enable the focus event to be triggered by a touch, add the **focusOnTouch** attribute for the target component. + +**Reference** + +[Focus Control](../reference/arkui-ts/ts-universal-attributes-focus.md) + +## How do I disable the scroll event of a \ nested in the \? + +Applicable to: OpenHarmony 3.2 Beta 5 (API version 9) + +Implement nested scrolling of the containers, by using the **onScrollFrameBegin** event and the **scrollBy** method. + +**Reference** + +[Scroll](../reference/arkui-ts/ts-container-scroll.md#example-2) + +## How do I enable a component to rotate continuously? + +Applicable to: OpenHarmony 3.2 Beta 5 (API version 9) + +You can use [attribute animation](../reference/arkui-ts/ts-animatorproperty.md) to that effect. + +## How do I scroll a list with the keyboard? + +Applicable to: OpenHarmony 3.2 Beta 5 (API version 9) + +**Solution** + +- Add **focusable\(true\)** to the list item to enable it to obtain focus. + +- Nest a focusable component, for example, **\