未验证 提交 cb59c070 编写于 作者: O openharmony_ci 提交者: Gitee

!23880 翻译完成:22255+22190 onCreate()与onNewWant()接口中参数名修改

Merge pull request !23880 from wusongqing/TR22255
# Cross-Device Migration
## When to Use
The main task of cross-device migration is to migrate the current mission (including the page component status) of an application to the target device so that the mission can continue on that device. Cross-device migration supports the following features:
- Storage and restoration of custom data
- Storage and restoration of page routing information and page component status data
- Application compatibility detection
- Setting the mission continuation state (**ACTIVE** by default) dynamically
For example, for an editing application, only the text editing page needs to be migrated to the target service. In this case, you can call [setMissionContinueState](../reference/apis/js-apis-inner-application-uiAbilityContext.md#uiabilitycontextsetmissioncontinuestate10) for precise control.
Cross-device migration is used to migrate the current mission (including the page component status) of an application to the target device so that the mission can continue on that device. Cross-device migration supports the following features:
- Determining whether to restore the page stack (page stack restored by default)
- Saving and restoring custom data
- Saving and restoring page routing information and page component status data
- Checking application compatibility
- Dynamically setting the mission continuation state (**ACTIVE** by default)
If an application wants to customize the page to be displayed after being migrated to the target device, the application can use [SUPPORT_CONTINUE_PAGE_STACK_KEY](../reference/apis/js-apis-app-ability-wantConstant.md#wantconstantparams) for precise control.
For example, for an editing application, only the text editing page needs to be migrated to the target device. In this case, you can call [setMissionContinueState](../reference/apis/js-apis-inner-application-uiAbilityContext.md#uiabilitycontextsetmissioncontinuestate10) for precise control.
- Determining whether to restore the page stack (restored by default)
If an application wants to customize the page to be displayed after being migrated to the target device, you can use [SUPPORT_CONTINUE_PAGE_STACK_KEY](../reference/apis/js-apis-app-ability-wantConstant.md#wantconstantparams) for precise control.
- Determining whether to exit the application on the initiator after a successful migration (application exit by default)
You can use [SUPPORT_CONTINUE_SOURCE_EXIT_KEY](../reference/apis/js-apis-app-ability-wantConstant.md#wantconstantparams) for precise control.
......@@ -35,14 +29,9 @@ The following figure shows the cross-device migration process.
## Constraints
- Since cross-device migration mission management is not available, you can only develop applications that support cross-device migration. Your application cannot initiate migration.
- Cross-device migration must be performed between the same UIAbility component. In other words, the components must have the same **bundleName**, **abilityName**, and **signature**.
## Best Practices
For better user experience, you are advised to use the **wantParam** parameter to transmit data smaller than 100 KB.
- The initiation of mission migration depends on system application control. You can implement the control capabilities by following the instructions provided in [Verification Guide](#verification-guide).
- Cross-device migration must be performed between the same UIAbility component. In other words, **bundleName**, **abilityName**, and **signature** of the component on the two devices must be the same.
- For better user experience, you are advised to use the **wantParam** parameter to transmit data smaller than 100 KB.
## Available APIs
......@@ -53,24 +42,25 @@ The table below describes the main APIs used for cross-device migration. For det
| **API**| Description|
| -------- | -------- |
| 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).|
| onContinue(wantParam : {[key: string]: Object}): OnContinueResult | Called by the initiator to save the data required for migration and specify whether the migration is accepted.<br>- **AGREE**: The migration is accepted.<br>- **REJECT**: The migration is rejected. If the application is abnormal in **onContinue**, which results in abnormal display during data restoration, this error code is returned.<br>- **MISMATCH**: The version does not match. The application on the initiator can obtain the version of the target application from **onContinue**. If the migration cannot be performed due to version mismatch, this error code is returned.|
| onCreate(want: Want, launchParam: AbilityConstant.LaunchParam): void; | Called by the target to restore the data and UI page if 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, launchParam: AbilityConstant.LaunchParam): void; | Called by the target to restore the data and UI page if the target is a singleton application and uses hot start. For details, see [UIAbility Component Launch Type](uiability-launch-type.md).|
## How to Develop
1. Request the **ohos.permission.DISTRIBUTED_DATASYNC** permission. For details, see [Declaring Permissions in the Configuration File](../security/accesstoken-guidelines.md#declaring-permissions-in-the-configuration-file).
1. Request the **ohos.permission.DISTRIBUTED_DATASYNC** permission.
2. Display a dialog box to ask for authorization from the user when the application is started for the first time. For details, see [Requesting User Authorization](../security/accesstoken-guidelines.md#requesting-user-authorization).
For details, see [Declaring Permissions in the Configuration File](../security/accesstoken-guidelines.md#declaring-permissions-in-the-configuration-file).
3. Configure the fields related to cross-device migration in the configuration file.
2. Display a dialog box to ask for authorization from the user when the application is started for the first time.
Configure the application to support migration.
For details, see [Requesting User Authorization](../security/accesstoken-guidelines.md##requesting-user-authorization).
Set the **continuable** field in the **module.json5** file to **true**. The default value is **false**. If this parameter is set to **false**, the application cannot be continued on the target device.
3. Configure the fields related to cross-device migration in the configuration file.
Configure the application to support migration. Set the **continuable** field in the **module.json5** file to **true**. The default value is **false**. If this parameter is set to **false**, the application cannot be continued on the target device.
```json
{
......@@ -88,14 +78,15 @@ The table below describes the main APIs used for cross-device migration. For det
Configure the application launch type. For details, see [UIAbility Component Launch Type](uiability-launch-type.md).
4. Implement [onContinue()](../reference/apis/js-apis-app-ability-uiAbility.md#abilityoncontinue) in the UIAbility of the initiator.
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-making.
[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**.
- Saving data to migrate: You can save the data to migrate 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.
- Checking application compatibility: You can obtain the version of the target application from **wantParam.version** of the **onContinue** callback. Then you can check the compatibility between that version and the version of the current application.
- Making a migration decision: You can determine whether to support the migration based on the return value of **onContinue()**. For details about the return values, see [Available APIs](#available-apis).
- Making a migration decision: You can determine migration is supported based on the return value of **onContinue**. For details about the return values, see [Available APIs](#available-apis).
The sample code is as follows:
......@@ -103,44 +94,51 @@ The table below describes the main APIs used for cross-device migration. For det
import UIAbility from '@ohos.app.ability.UIAbility';
import AbilityConstant from '@ohos.app.ability.AbilityConstant';
onContinue(wantParam : {[key: string]: any}) {
console.info(`onContinue version = ${wantParam.version}, targetDevice: ${wantParam.targetDevice}`)
let workInput = AppStorage.Get<string>('ContinueWork');
// Set the user input data into wantParam.
wantParam["work"] = workInput // set user input data into want params
onContinue(wantParam : {[key: string]: Object}) {
console.info(`onContinue version = ${wantParam.version}, targetDevice: ${wantParam.targetDevice}`) // Prepare data to migrate.
let continueInput = 'Data to migrate';
// Save the data to migrate in the custom field (for example, data) of wantParam.
wantParam["data"] = continueInput
console.info(`onContinue input = ${wantParam["input"]}`);
return AbilityConstant.OnContinueResult.AGREE
}
```
5. Implement **onCreate()** and **onNewWant()** in the UIAbility of the target application to implement data restoration.
- 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.
5. Restore data and load the UI.
In the stage model, applications with different launch types can call different APIs to restore data and load the UI, as shown below.
![hop-cross-device-migration](figures/hop-cross-device-migration1.png)
Implement **onCreate** and **onNewWant** in the UIAbility on the target device to implement data restoration.
- Implementation example of **onCreate**
- The target device determines whether the startup is **LaunchReason.CONTINUATION** based on **launchReason** in **onCreate**.
- You can obtain the saved data from the **want** parameter.
- After data restoration is complete, call **restoreWindowStage** to trigger page restoration, including page stack information.
```ts
import UIAbility from '@ohos.app.ability.UIAbility';
import AbilityConstant from '@ohos.app.ability.AbilityConstant';
import distributedObject from '@ohos.data.distributedDataObject';
export default class EntryAbility extends UIAbility {
storage : LocalStorage;
onCreate(want, launchParam) {
console.info(`EntryAbility onCreate ${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)
// Obtain the data saved.
let continueInput = want.parameters.data
console.info(`continue input ${continueInput}`)
// Display the data on the current page.
this.storage = new LocalStorage();
this.context.restoreWindowStage(this.storage);
}
}
}
```
- 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.
- For a singleton application, you must also implement **onNewWant**, in the same way as **onCreate**.
Determine the migration scenario, restore data, and trigger page restoration in **onNewWant**.
```ts
export default class EntryAbility extends UIAbility {
......@@ -149,9 +147,8 @@ The table below describes the main APIs used for cross-device migration. For det
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)
let continueInput = want.parameters.data
console.info(`continue input ${continueInput}`)
this.storage = new LocalStorage();
this.context.restoreWindowStage(this.storage);
}
......@@ -159,44 +156,109 @@ The table below describes the main APIs used for cross-device migration. For det
}
```
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.
- Example: An application does not require migration during startup.
## Configuring Optional Migration Features
```ts
import UIAbility from '@ohos.app.ability.UIAbility';
import AbilityConstant from '@ohos.app.ability.AbilityConstant';
### Dynamically Setting the Mission Continuation State
onCreate(want, launchParam) {
this.context.setMissionContinueState(AbilityConstant.ContinueState.INACTIVE, (result) => {
console.info(`setMissionContinueState: ${JSON.stringify(result)}`);
});
Since API version 10, you can dynamically set the mission continuation state. Specifically, you can enable or disable mission migration as required by calling [setMissionContinueState](../reference/apis/js-apis-inner-application-uiAbilityContext.md#uiabilitycontextsetmissioncontinuestate10). By default, **ACTIVE** is set for an application that supports migration, indicating that mission continuation is enabled.
| Value | Description |
| :------------------------------------- | ---------------------- |
| AbilityConstant.ContinueState.ACTIVE | Mission continuation is enabled for the application.|
| AbilityConstant.ContinueState.INACTIVE | Mission continuation is disabled for the application.|
**Time for Setting the Mission Continuation State**
The change of the mission migration state can be implemented based on service requirements. Typical methods are as follows:
Call the API in the **onCreate** callback function of the UIAbility to set the mission continuation state when the application is created.
```ts
// EntryAbility.ets
onCreate(want, launchParam) {
...
this.context.setMissionContinueState(AbilityConstant.ContinueState.ACTIVE, (result) => {
console.info('setMissionContinueState ACTIVE result: ', JSON.stringify(result));
};
...
}
```
Call the API in the **onPageShow** callback function of the page to set the mission continuation state when a single page is displayed.
```ts
// PageName.ets
struct PageName {
Build() {
...
}
```
- Example: The application requires migration in a specific service process.
...
onPageShow(){
// When the page is displayed, set the mission continuation state to ACTIVE.
this.context.setMissionContinueState(AbilityConstant.ContinueState.ACTIVE, (result) => {
console.info('setMissionContinueState ACTIVE result: ', JSON.stringify(result));
};
}
}
```
```ts
import UIAbility from '@ohos.app.ability.UIAbility';
import AbilityConstant from '@ohos.app.ability.AbilityConstant';
Set the mission continuation state in the event of a component. For example, set the state in the **onClick** event of the **Button** component.
```ts
// xxx.ets
Button(){
...
}
.onClick(()=>{
// When the button is clicked, set the mission continuation state to ACTIVE.
this.context.setMissionContinueState(AbilityConstant.ContinueState.ACTIVE, (result) => {
console.info(`setMissionContinueState: ${JSON.stringify(result)}`);
});
```
console.info('setMissionContinueState ACTIVE result: ', JSON.stringify(result));
};
})
```
7. (Optional) Configure whether to restore the page stack.
**Ensuring Mission Continuation Continuity**
By default, the page stack is restored. If an application does not want to use the page stack restored by the system, you can set the page to be displayed in **onWindowStageRestore()**. For details about the configuration, see [SUPPORT_CONTINUE_PAGE_STACK_KEY](../reference/apis/js-apis-app-ability-wantConstant.md#wantconstantparams).
During UI page loading, the target application may have executed the command to set its own mission continuation state (for example, set the state to **INACTIVE** in **onCreate** during cold start or to **INACTIVE** during hot start since the peer has opened a page that cannot be migrated). To ensure a migration back to the initiator, you must set the mission continuation state to **ACTIVE** in **onCreate** and **onNewWant**.
- Example: An application does not want automatically restored page stack information.
```ts
// EntryAbility.ets
onCreate(want, launchparam) {
...
// Set the mission continuation state to ACTIVE when the launch is caused by continuation. This setting copes with cold start.
if (launchParam.launchReason == AbilityConstant.LaunchReason.CONTINUATION) {
this.context.setMissionContinueState(AbilityConstant.ContinueState.ACTIVE, (result) => {
console.info('setMissionContinueState ACTIVE result: ', JSON.stringify(result));
};
}
}
onNewWant(want, launchparam) {
...
// Set the mission continuation state to ACTIVE when the launch is caused by continuation. This setting copes with hot start.
if (launchParam.launchReason == AbilityConstant.LaunchReason.CONTINUATION) {
this.context.setMissionContinueState(AbilityConstant.ContinueState.ACTIVE, (result) => {
console.info('setMissionContinueState ACTIVE result: ', JSON.stringify(result));
};
}
}
```
### Migrating the Page Stack on Demand
Configure whether to restore the page stack. By default, the page stack is restored. If an application does not want to use the page stack restored by the system, you can set the page to be displayed on the target device in **onWindowStageRestore**. For details about the configuration, see [SUPPORT_CONTINUE_PAGE_STACK_KEY](../reference/apis/js-apis-app-ability-wantConstant.md#wantconstantparams).
The index and second routes exist in the page stack of the initiator. However, the target application wants to display a specified page, rather than that of the initiator.
Example: An application does not want automatically restored page stack information.
```ts
import UIAbility from '@ohos.app.ability.UIAbility';
import wantConstant from '@ohos.app.ability.wantConstant.d.ts';
import wantConstant from '@ohos.app.ability.wantConstant';
onContinue(wantParam : {[key: string]: any}) {
onContinue(wantParam : {[key: string]: Object}) {
console.info(`onContinue version = ${wantParam.version}, targetDevice: ${wantParam.targetDevice}`)
wantParam[wantConstant.Params.SUPPORT_CONTINUE_PAGE_STACK_KEY] = false;
return AbilityConstant.OnContinueResult.AGREE;
......@@ -208,19 +270,81 @@ The table below describes the main APIs used for cross-device migration. For det
}
```
8. (Optional) Configure whether to exit the application on the initiator after a successful migration.
### Exiting the Application on Demand
By default, the application on the initiator exits. If you do not want the application on the initiator to automatically exit after a successful migration, set the [SUPPORT_CONTINUE_SOURCE_EXIT_KEY](../reference/apis/js-apis-app-ability-wantConstant.md#wantconstantparams) parameter.
Configure whether to exit the application on the initiator after a successful migration. By default, the application on the initiator exits. If you do not want the application on the initiator to automatically exit after a successful migration, set the [SUPPORT_CONTINUE_SOURCE_EXIT_KEY](../reference/apis/js-apis-app-ability-wantConstant.md#wantconstantparams) parameter.
- Example: An application on the initiator does not exit after a successful migration.
Example: An application on the initiator does not exit after a successful migration.
```ts
import UIAbility from '@ohos.app.ability.UIAbility';
import wantConstant from '@ohos.app.ability.wantConstant.d.ts';
import wantConstant from '@ohos.app.ability.wantConstant';
onContinue(wantParam : {[key: string]: any}) {
onContinue(wantParam : {[key: string]: Object}) {
console.info(`onContinue version = ${wantParam.version}, targetDevice: ${wantParam.targetDevice}`)
wantParam[wantConstant.Params.SUPPORT_CONTINUE_SOURCE_EXIT_KEY] = false;
return AbilityConstant.OnContinueResult.AGREE;
}
```
## Verification Guide
A mission center demo is provided for you to verify the mission continuation capability of your application. The following walks you through on how to verify mission continuation by using the demo.
### Compiling and Installing the Demo
#### Environment Configuration
[Switch to the full SDK](../faqs/full-sdk-switch-guide.md) on DevEco Studio. This is because the mission center uses the system API [@ohos.distributedDeviceManager](../reference/apis/js-apis-distributedDeviceManager.md), which is not provided in the public SDK.
**NOTE**: The screenshots in this section are for reference only. The DevEco Studio and SDK versions in use prevail.
#### Demo Download
Download the mission center demo from [Sample Code](https://gitee.com/openharmony/ability_dmsfwk/tree/master/services/dtbschedmgr/test/missionCenterDemo/dmsDemo/entry/src/main).
#### Building Project Files
1. Create an empty OpenHarmony project and replace the corresponding folders with the downloaded files.
![hop-cross-device-migration](figures/hop-cross-device-migration2.png)
2. Complete the signature, build, and installation.
The default signature permission provided by the automatic signature template of DevEco Studio is normal. The mission center demo requires the **ohos.permission.MANAGE_MISSIONS** permission, which is at the system_core level. Therefore, you must escalate the permission to the system_core level. Specifically, change **"apl":"normal_core"** to **"apl":"system_core"** in the **UnsgnedReleasedProfileTemplate.json** file in **openharmony\*apiVersion*\toolchains\lib**. Then sign the files as follows:
1. Choose **File > Project Structure**.
![hop-cross-device-migration](figures/hop-cross-device-migration3.png)
2. Click **Signing Configs** and click **OK**.
![hop-cross-device-migration](figures/hop-cross-device-migration4.png)
3. Connect to the developer board and run the demo.
### Device Networking
1. Open the calculators of devices A and B.
2. Click the arrow in the upper right corner to select device B.
3. Select a trusted device on device B. The PIN is displayed.
4. Enter the PIN on device A.
5. Verify the networking. Enter a number on device A. If the number is displayed on device B, the networking is successful.
### Initiation Migration
1. Open your application on device B, and open the mission center demo on device A. The name of device A (Local: OpenHarmony 3.2) and the name of device B (OpenHarmony 3.2) are displayed on device A.
![hop-cross-device-migration](figures/hop-cross-device-migration5.png)
2. Click the name of device B. The application of device B is displayed.
![hop-cross-device-migration](figures/hop-cross-device-migration6.png)
3. Drag the application to the name of device A. The application on device A is started, and the application on device B exits.
![hop-cross-device-migration](figures/hop-cross-device-migration7.png)
# Multi-device Collaboration (for System Applications Only)
# Multi-device Collaboration
## When to Use
......@@ -57,29 +57,31 @@ On device A, touch the **Start** button provided by the initiator application to
3. Obtain the device ID of the target device.
```ts
import deviceManager from '@ohos.distributedHardware.deviceManager';
import deviceManager from '@ohos.distributedDeviceManager';
let dmClass;
let dmClass: deviceManager.DeviceManager;
function initDmClass() {
// createDeviceManager is a system API.
deviceManager.createDeviceManager('ohos.samples.demo', (err, dm) => {
if (err) {
...
return
try{
dmClass = deviceManager.createDeviceManager('ohos.samples.demo');
} catch(err) {
console.error("createDeviceManager errCode:" + err.code + ",errMessage:" + err.message);
}
dmClass = dm
})
}
function getRemoteDeviceId() {
if (typeof dmClass === 'object' && dmClass !== null) {
let list = dmClass.getTrustedDeviceListSync()
let list = dmClass.getAvailableDeviceListSync();
if (typeof (list) === 'undefined' || typeof (list.length) === 'undefined') {
console.info('EntryAbility onButtonClick getRemoteDeviceId err: list is null')
console.info('getRemoteDeviceId err: list is null');
return;
}
if (list.length === 0) {
console.info("getRemoteDeviceId err: list is empty");
return;
}
return list[0].deviceId
return list[0].networkId;
} else {
console.info('EntryAbility onButtonClick getRemoteDeviceId err: dmClass is null')
console.info('getRemoteDeviceId err: dmClass is null');
}
}
```
......@@ -90,8 +92,8 @@ On device A, touch the **Start** button provided by the initiator application to
let want = {
deviceId: getRemoteDeviceId(),
bundleName: 'com.example.myapplication',
abilityName: 'FuncAbility',
moduleName: 'module1', // moduleName is optional.
abilityName: 'EntryAbility',
moduleName: 'entry', // moduleName is optional.
}
// context is the AbilityContext of the initiator UIAbility.
this.context.startAbility(want).then(() => {
......@@ -217,7 +219,7 @@ A system application can connect to a service on another device by calling [conn
2. Display a dialog box to ask for authorization from the user when the application is started for the first time. For details, see [Requesting User Authorization](../security/accesstoken-guidelines.md#requesting-user-authorization).
3. (Optional) [Implement a background service](serviceextensionability.md#implementing-a-background-service). Perform this operation only if no background service is available.
3. (Optional) [Implement a background service](serviceextensionability.md#implementing-a-background-service-for-system-applications-only). Perform this operation only if no background service is available.
4. Connect to the background service.
- Implement the **IAbilityConnection** class. **IAbilityConnection** provides the following callbacks that you should implement: **onConnect()**, **onDisconnect()**, and **onFailed()**. The **onConnect()** callback is invoked when a service is connected, **onDisconnect()** is invoked when a service is unexpectedly disconnected, and **onFailed()** is invoked when the connection to a service fails.
......@@ -477,8 +479,8 @@ The following describes how to implement multi-device collaboration through cros
```ts
const MSG_SEND_METHOD: string = 'CallSendMsg';
originMsg: string = '';
backMsg: string = '';
let originMsg: string = '';
let backMsg: string = '';
async onButtonCallWithResult(originMsg, backMsg) {
try {
let msg = new MyParcelable(1, originMsg);
......
......@@ -20,12 +20,15 @@ In OpenHarmony, distributed operations across devices are called continuation (a
- **Multi-device collaboration**
Multi-device collaboration provides users with more efficient and immersive experience than with a single device. A typical multi-device collaboration scenario is as follows: You open the same note on devices A and B. On device A, you select images from the local Gallery, insert them to the note, and edit them. On device B, you edit the text. Another typical scenario is as follows: You are chatting with a customer on device A, and the customer asks for a file, which is stored on device B. You can use the chat software to open the file application on device B, select the required file, and send it back to device A. Then, you use the chat software to send it to the customer. From the perspective of application development, multi-device collaboration enables different UIAbility or ServiceExtensionAbility components to run simultaneously or alternately on multiple devices to provide a complete service, or enables the same UIAbility and ServiceExtensionAbility component to run simultaneously on multiple devices to provide a complete service.
Multi-device collaboration provides users with more efficient and immersive experience than with a single device. Multi-device collaboration is used in the following typical scenarios:
- Scenario 1: You open the same note on devices A and B. On device A, you select images from the local Gallery, insert them to the note, and edit them. On device B, you edit the text.
- Scenario 2: : You are chatting with a customer on device A, and the customer asks for a file, which is stored on device B. You can use the chat software to open the file application on device B, select the required file, and send it back to device A. Then, you use the chat software to send it to the customer. From the perspective of application development, multi-device collaboration enables different UIAbility or ServiceExtensionAbility components to run simultaneously or alternately on multiple devices to provide a complete service, or enables the same UIAbility and ServiceExtensionAbility component to run simultaneously on multiple devices to provide a complete service.
## Continuation Architecture
OpenHarmony provides a set of APIs for you to implement continuation in your applications. The continuation architecture has the following advantages:
OpenHarmony provides APIs for you to implement continuation in your applications. The continuation architecture has the following advantages:
- Capabilities such as remote service invocation to facilitate service design
......@@ -39,9 +42,9 @@ The following figure shows the continuation architecture.
![hop-structure](figures/hop-structure.png)
- Cross-device migration mission management: The initiator accepts a migration request from the user, provides a migration entry, and displays the migration result. (This capability is unavailable yet.)
- Cross-device migration mission management: The initiator accepts a migration request from the user, provides a migration entry, and displays the migration result.
- Multi-device collaboration mission management: The initiator accepts an application registration request and provides management capabilities such as starting or stopping collaboration and status display. (This capability is unavailable yet.)
- Multi-device collaboration mission management: The initiator accepts an application registration request and provides management capabilities such as starting or stopping collaboration and status display.
- Distributed component management: provides capabilities such as remote service startup, remote service connection, and remote migration, and provides applications with cross-device migration or multi-device collaboration based on a combination of these capabilities.
......
......@@ -6,16 +6,16 @@
| onShow?(): void; | \@ohos.window.d.ts | [on(eventType: 'windowStageEvent', callback: Callback&lt;WindowStageEventType&gt;): void;](../reference/apis/js-apis-window.md#onwindowstageevent9)<br>Listens for the switching to the [foreground](../reference/apis/js-apis-window.md#windowstageeventtype9).|
| onHide?(): void; | \@ohos.window.d.ts | [on(eventType: 'windowStageEvent', callback: Callback&lt;WindowStageEventType&gt;): void;](../reference/apis/js-apis-window.md#onwindowstageevent9)<br>Listens for the switching to the [background](../reference/apis/js-apis-window.md#windowstageeventtype9).|
| onDestroy?(): void; | \@ohos.app.ability.UIAbility.d.ts | [onDestroy(): void;](../reference/apis/js-apis-app-ability-uiAbility.md#abilityondestroy) |
| onCreate?(): void; | \@ohos.app.ability.UIAbility.d.ts | [onCreate(want: Want, param: AbilityConstant.LaunchParam): void;](../reference/apis/js-apis-app-ability-uiAbility.md#abilityoncreate) |
| onCreate?(): void; | \@ohos.app.ability.UIAbility.d.ts | [onCreate(want: Want, launchParam: AbilityConstant.LaunchParam): void;](../reference/apis/js-apis-app-ability-uiAbility.md#abilityoncreate) |
| onWindowDisplayModeChanged?(isShownInMultiWindow: boolean, newConfig: resourceManager.Configuration): void; | There is no corresponding API in the stage model.| No corresponding API is provided.|
| onStartContinuation?(): boolean; | There is no corresponding API in the stage model.| In the stage model, an application does not need to detect whether the continuation is successful (detected when the application initiates the continuation request). Therefore, the **onStartContinuation()** callback is deprecated.|
| onSaveData?(data: Object): boolean; | \@ohos.app.ability.UIAbility.d.ts | [onContinue(wantParam : {[key: string]: Object}): AbilityConstant.OnContinueResult;](../reference/apis/js-apis-app-ability-uiAbility.md#abilityoncontinue) |
| onCompleteContinuation?(result: number): void; | application\ContinueCallback.d.ts | [onContinueDone(result: number): void;](../reference/apis/js-apis-distributedMissionManager.md#continuecallback) |
| onRestoreData?(data: Object): void; | \@ohos.app.ability.UIAbility.d.ts | [onCreate(want: Want, param: AbilityConstant.LaunchParam): void;](../reference/apis/js-apis-app-ability-uiAbility.md#abilityoncreate)<br>[onNewWant(want: Want, launchParams: AbilityConstant.LaunchParam): void;](../reference/apis/js-apis-app-ability-uiAbility.md#abilityonnewwant)<br>In multiton or singleton mode, the target ability completes data restoration in the **onCreate()** callback. In the callback, **launchParam.launchReason** is used to determine whether it is a continuation-based launch scenario. If it is, the data saved before continuation can be obtained from the **want** parameter.|
| onRestoreData?(data: Object): void; | \@ohos.app.ability.UIAbility.d.ts | [onCreate(want: Want, launchParam: AbilityConstant.LaunchParam): void;](../reference/apis/js-apis-app-ability-uiAbility.md#abilityoncreate)<br>[onNewWant(want: Want, launchParam: AbilityConstant.LaunchParam): void;](../reference/apis/js-apis-app-ability-uiAbility.md#abilityonnewwant)<br>In multiton or singleton mode, the target ability completes data restoration in the **onCreate()** callback. In the callback, **launchParam.launchReason** is used to determine whether it is a continuation-based launch scenario. If it is, the data saved before continuation can be obtained from the **want** parameter.|
| onRemoteTerminated?(): void; | application\ContinueCallback.d.ts | [onContinueDone(result: number): void;](../reference/apis/js-apis-distributedMissionManager.md#continuecallback) |
| onSaveAbilityState?(outState: PacMap): void; | \@ohos.app.ability.UIAbility.d.ts | [onSaveState(reason: AbilityConstant.StateType, wantParam : {[key: string]: Object}): AbilityConstant.OnSaveResult;](../reference/apis/js-apis-app-ability-uiAbility.md#abilityonsavestate) |
| onRestoreAbilityState?(inState: PacMap): void; | \@ohos.app.ability.UIAbility.d.ts | [onCreate(want: Want, param: AbilityConstant.LaunchParam): void;](../reference/apis/js-apis-app-ability-uiAbility.md#abilityoncreate)<br>After an application is restarted, the **onCreate()** callback is triggered. In the callback, **launchParam.launchReason** is used to determine whether it is a self-recovery scenario. If it is, the data saved before the restart can be obtained from the **want** parameter.|
| onRestoreAbilityState?(inState: PacMap): void; | \@ohos.app.ability.UIAbility.d.ts | [onCreate(want: Want, launchParam: AbilityConstant.LaunchParam): void;](../reference/apis/js-apis-app-ability-uiAbility.md#abilityoncreate)<br>After an application is restarted, the **onCreate()** callback is triggered. In the callback, **launchParam.launchReason** is used to determine whether it is a self-recovery scenario. If it is, the data saved before the restart can be obtained from the **want** parameter.|
| onInactive?(): void; | \@ohos.app.ability.UIAbility.d.ts | [onBackground(): void;](../reference/apis/js-apis-app-ability-uiAbility.md#abilityonbackground) |
| onActive?(): void; | \@ohos.app.ability.UIAbility.d.ts | [onForeground(): void;](../reference/apis/js-apis-app-ability-uiAbility.md#abilityonforeground) |
| onNewWant?(want: Want): void; | \@ohos.app.ability.UIAbility.d.ts | [onNewWant(want: Want, launchParams: AbilityConstant.LaunchParam): void;](../reference/apis/js-apis-app-ability-uiAbility.md#abilityonnewwant) |
| onNewWant?(want: Want): void; | \@ohos.app.ability.UIAbility.d.ts | [onNewWant(want: Want, launchParam: AbilityConstant.LaunchParam): void;](../reference/apis/js-apis-app-ability-uiAbility.md#abilityonnewwant) |
| onMemoryLevel?(level: number): void | \@ohos.app.ability.UIAbility.d.ts | [onMemoryLevel(level: AbilityConstant.MemoryLevel): void;](../reference/apis/js-apis-app-ability-ability.md#abilityonmemorylevel) |
......@@ -8,18 +8,19 @@ The PageAbility component in the FA model corresponds to the UIAbility component
2. Migrate the PageAbility code to the UIAbility.
The PageAbility lifecycle is basically the same as the UIAbility lifecycle. The table below describes the details.
| PageAbility| UIAbility| Mapping Description|
| -------- | -------- | -------- |
| onCreate(): void| onCreate(want: Want, param: AbilityConstant.LaunchParam): void | The two methods have the same meaning and invoking time. In the stage model, parameters are added to the callback so that you can obtain startup-related data during creation.|
| NA | onWindowStageCreate(windowStage: window.WindowStage): void| This method is available only in the stage model. The callback is invoked when a window is created.|
| onActive(): void | on(eventType: 'windowStageEvent', callback: Callback&lt;WindowStageEventType&gt;): void;<br>WindowStageEventType.ACTIVE | The two methods have the same meaning and invoking time. In the stage model, this method is moved to the window object.|
| onShow(): void | onForeground(): void | The two methods have the same meaning, invoking time, and parameters.|
| onNewWant(want: Want): void| onNewWant(want: Want, launchParams: AbilityConstant.LaunchParam): void| The two methods have the same meaning and invoking time. In the stage model, the **LaunchParam** parameter is added to notify the application of the startup cause.|
| onInactive(): void| on(eventType: 'windowStageEvent', callback: Callback&lt;WindowStageEventType&gt;): void;<br>WindowStageEventType.INACTIVE | The two methods have the same meaning and invoking time. In the stage model, this method is moved to the window object.|
| onHide(): void | onBackground(): void | The two methods have the same meaning, invoking time, and parameters.|
| NA | onWindowStageDestroy(): void | This method is available only in the stage model. The callback is invoked when a window is destroyed.|
| PageAbility| UIAbility| Mapping Description|
| -------- | -------- | -------- |
| onCreate(): void| onCreate(want: Want, launchParam: AbilityConstant.LaunchParam): void | The two methods have the same meaning and invoking time. In the stage model, parameters are added to the callback so that you can obtain startup-related data during creation.|
| NA | onWindowStageCreate(windowStage: window.WindowStage): void| This method is available only in the stage model. The callback is invoked when a window is created.|
| onActive(): void | on(eventType: 'windowStageEvent', callback: Callback&lt;WindowStageEventType&gt;): void;<br>WindowStageEventType.ACTIVE | The two methods have the same meaning and invoking time. In the stage model, this method is moved to the window object.|
| onShow(): void | onForeground(): void | The two methods have the same meaning, invoking time, and parameters.|
| onNewWant(want: Want): void| onNewWant(want: Want, launchParam: AbilityConstant.LaunchParam): void | The two methods have the same meaning and invoking time. In the stage model, the **LaunchParam** parameter is added to notify the application of the startup cause.|
| onInactive(): void| on(eventType: 'windowStageEvent', callback: Callback&lt;WindowStageEventType&gt;): void;<br>WindowStageEventType.INACTIVE | The two methods have the same meaning and invoking time. In the stage model, this method is moved to the window object.|
| onHide(): void | onBackground(): void | The two methods have the same meaning, invoking time, and parameters.|
| NA | onWindowStageDestroy(): void | This method is available only in the stage model. The callback is invoked when a window is destroyed.|
| onDestroy(): void | onDestroy(): void | The two methods have the same meaning, invoking time, and parameters.|
![pageability-switch](figures/pageability-switch.png)
......@@ -31,7 +32,6 @@ The PageAbility lifecycle is basically the same as the UIAbility lifecycle. The
For example, to load the **pages/Index** page after the ability is started, use the following code in the **config.json** file in the FA model:
```json
"pages" : [
"pages/Index"
......@@ -40,7 +40,6 @@ The PageAbility lifecycle is basically the same as the UIAbility lifecycle. The
In the stage model, implement the following method in **MainAbility**:
```ts
import Window from '@ohos.window'
......
......@@ -350,8 +350,8 @@ The window mode is specified by the **windowMode** field in the [StartOptions](.
> **NOTE**
>
> 1. If the **windowMode** field is not specified, the UIAbility is started in the default window mode.
> 2. To ensure that the application can be displayed in the required window mode, check the **supportWindowMode** field under [abilities](../quick-start/module-configuration-file.md#abilities) in the [module.json5 file](../quick-start/module-configuration-file.md) of the UIAbility and make sure the specified window mode is supported.
> - If the **windowMode** field is not specified, the UIAbility is started in the default window mode.
> - To ensure that the application can be displayed in the required window mode, check the **supportWindowMode** field under [abilities](../quick-start/module-configuration-file.md#abilities) in the [module.json5 file](../quick-start/module-configuration-file.md) of the UIAbility and make sure the specified window mode is supported.
The following describes how to start the FuncAbility from the EntryAbility page and display it in floating window mode.
......@@ -521,7 +521,7 @@ The development procedure is as follows:
funcAbilityWant: Want;
uiContext: UIContext;
onNewWant(want: Want, launchParams: AbilityConstant.LaunchParam) {
onNewWant(want: Want, launchParam: AbilityConstant.LaunchParam) {
if (want?.parameters?.router && want.parameters.router === 'funcA') {
let funcAUrl = 'pages/Second';
let router: Router = this.uiContext.getRouter();
......@@ -624,6 +624,7 @@ For the CalleeAbility, implement the callback to receive data and the methods to
```
3. Define the agreed parcelable data.
The data formats sent and received by the CallerAbility and CalleeAbility must be consistent. In the following example, the data formats are number and string.
......@@ -631,7 +632,6 @@ For the CalleeAbility, implement the callback to receive data and the methods to
export default class MyParcelable {
num: number = 0;
str: string = '';
constructor(num, string) {
this.num = num;
this.str = string;
......
......@@ -29,7 +29,7 @@ import UIAbility from '@ohos.app.ability.UIAbility';
## UIAbility.onCreate
onCreate(want: Want, param: AbilityConstant.LaunchParam): void;
onCreate(want: Want, launchParam: AbilityConstant.LaunchParam): void;
Called to initialize the service logic when a UIAbility is created.
......@@ -46,7 +46,7 @@ Called to initialize the service logic when a UIAbility is created.
```ts
class MyUIAbility extends UIAbility {
onCreate(want, param) {
onCreate(want, launchParam) {
console.log('onCreate, want: ${want.abilityName}');
}
}
......@@ -226,7 +226,7 @@ Called to save data during the ability migration preparation process.
## UIAbility.onNewWant
onNewWant(want: Want, launchParams: AbilityConstant.LaunchParam): void;
onNewWant(want: Want, launchParam: AbilityConstant.LaunchParam): void;
Called when a new Want is passed in and this UIAbility is started again.
......@@ -237,15 +237,15 @@ Called when a new Want is passed in and this UIAbility is started again.
| Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
| want | [Want](js-apis-app-ability-want.md) | Yes| Want information, such as the ability name and bundle name.|
| launchParams | [AbilityConstant.LaunchParam](js-apis-app-ability-abilityConstant.md#abilityconstantlaunchparam) | Yes| Reason for the UIAbility startup and the last abnormal exit.|
| launchParam | [AbilityConstant.LaunchParam](js-apis-app-ability-abilityConstant.md#abilityconstantlaunchparam) | Yes| Reason for the UIAbility startup and the last abnormal exit.|
**Example**
```ts
class MyUIAbility extends UIAbility {
onNewWant(want, launchParams) {
onNewWant(want, launchParam) {
console.log('onNewWant, want: ${want.abilityName}');
console.log('onNewWant, launchParams: ${JSON.stringify(launchParams)}');
console.log('onNewWant, launchParam: ${JSON.stringify(launchParam)}');
}
}
```
......@@ -315,7 +315,7 @@ class MyUIAbility extends UIAbility {
onShare(wantParam:{ [key: string]: Object }): void;
Called by this UIAbility to set data to share. **ohos.extra.param.key.shareUrl** indicates the online address of the service.
Called by this UIAbility to set data to share in the cross-device sharing scenario.
**System capability**: SystemCapability.Ability.AbilityRuntime.AbilityCore
......@@ -323,7 +323,7 @@ Called by this UIAbility to set data to share. **ohos.extra.param.key.shareUrl**
| Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
| wantParam | {[key:&nbsp;string]:&nbsp;Object} | Yes| **want** parameter.|
| wantParam | {[key:&nbsp;string]:&nbsp;Object} | Yes| Data to share.|
**Example**
......
......@@ -257,7 +257,7 @@
|Added|NA|Module name: ohos.app.ability.UIAbility<br>Class name: UIAbility<br>Method or attribute name: launchWant: Want;|@ohos.app.ability.UIAbility.d.ts|
|Added|NA|Module name: ohos.app.ability.UIAbility<br>Class name: UIAbility<br>Method or attribute name: lastRequestWant: Want;|@ohos.app.ability.UIAbility.d.ts|
|Added|NA|Module name: ohos.app.ability.UIAbility<br>Class name: UIAbility<br>Method or attribute name: callee: Callee;|@ohos.app.ability.UIAbility.d.ts|
|Added|NA|Module name: ohos.app.ability.UIAbility<br>Class name: UIAbility<br>Method or attribute name: onCreate(want: Want, param: AbilityConstant.LaunchParam): void;|@ohos.app.ability.UIAbility.d.ts|
|Added|NA|Module name: ohos.app.ability.UIAbility<br>Class name: UIAbility<br>Method or attribute name: onCreate(want: Want, launchParam: AbilityConstant.LaunchParam): void;|@ohos.app.ability.UIAbility.d.ts|
|Added|NA|Module name: ohos.app.ability.UIAbility<br>Class name: UIAbility<br>Method or attribute name: onWindowStageCreate(windowStage: window.WindowStage): void;|@ohos.app.ability.UIAbility.d.ts|
|Added|NA|Module name: ohos.app.ability.UIAbility<br>Class name: UIAbility<br>Method or attribute name: onWindowStageDestroy(): void;|@ohos.app.ability.UIAbility.d.ts|
|Added|NA|Module name: ohos.app.ability.UIAbility<br>Class name: UIAbility<br>Method or attribute name: onWindowStageRestore(windowStage: window.WindowStage): void;|@ohos.app.ability.UIAbility.d.ts|
......@@ -265,7 +265,7 @@
|Added|NA|Module name: ohos.app.ability.UIAbility<br>Class name: UIAbility<br>Method or attribute name: onForeground(): void;|@ohos.app.ability.UIAbility.d.ts|
|Added|NA|Module name: ohos.app.ability.UIAbility<br>Class name: UIAbility<br>Method or attribute name: onBackground(): void;|@ohos.app.ability.UIAbility.d.ts|
|Added|NA|Module name: ohos.app.ability.UIAbility<br>Class name: UIAbility<br>Method or attribute name: onContinue(wantParam: { [key: string]: Object }): AbilityConstant.OnContinueResult;|@ohos.app.ability.UIAbility.d.ts|
|Added|NA|Module name: ohos.app.ability.UIAbility<br>Class name: UIAbility<br>Method or attribute name: onNewWant(want: Want, launchParams: AbilityConstant.LaunchParam): void;|@ohos.app.ability.UIAbility.d.ts|
|Added|NA|Module name: ohos.app.ability.UIAbility<br>Class name: UIAbility<br>Method or attribute name: onNewWant(want: Want, launchParam: AbilityConstant.LaunchParam): void;|@ohos.app.ability.UIAbility.d.ts|
|Added|NA|Module name: ohos.app.ability.UIAbility<br>Class name: UIAbility<br>Method or attribute name: onDump(params: Array\<string>): Array\<string>;|@ohos.app.ability.UIAbility.d.ts|
|Added|NA|Module name: ohos.app.ability.UIAbility<br>Class name: UIAbility<br>Method or attribute name: onSaveState(reason: AbilityConstant.StateType, wantParam : {[key: string]: Object}): AbilityConstant.OnSaveResult;|@ohos.app.ability.UIAbility.d.ts|
|Added|NA|Module name: ohos.app.ability.Want<br>Class name: Want|@ohos.app.ability.Want.d.ts|
......
......@@ -73,5 +73,5 @@ The table below lists the APIs changes of the ability framework in OpenHarmony 3
| FormExtensionContext | FormExtensionContext | updateForm(formId: string, formBindingData: formBindingData.FormBindingData, callback: AsyncCallback\<void>): void;<br>updateForm(formId: string, formBindingData: formBindingData.FormBindingData): Promise\<void>; | Deleted|
| ServiceExtensionContext | ServiceExtensionContext | extensionAbilityInfo: ExtensionAbilityInfo; | Deleted|
| ohos.application.appManager | appManager | getProcessRunningInfos(): Promise\<Array\<ProcessRunningInfo>>;<br>getProcessRunningInfos(callback: AsyncCallback\<Array\<ProcessRunningInfo>>): void; | Deprecated|
| ohos.application.Ability | Ability | old : onNewWant(want: Want): void;<br>new : onNewWant(want: Want, launchParams: AbilityConstant.LaunchParam): void; | Updated|
| ohos.application.Ability | Ability | old : onNewWant(want: Want): void;<br>new : onNewWant(want: Want, launchParam: AbilityConstant.LaunchParam): void; | Updated|
| ohos.application.Ability | Callee | old : on(method: string, callback: CaleeCallBack): void;<br>new : on(method: string, callback: CalleeCallBack): void; | Updated|
\ No newline at end of file
| Change Type | Old Version | New Version | d.ts File |
| Change Type | Old Version | New Version | .d.ts File |
| ---- | ------ | ------ | -------- |
|Added|NA|Module name: ohos.app.ability.dataUriUtils<br>Class name: dataUriUtils|@ohos.app.ability.dataUriUtils.d.ts|
|Added|NA|Module name: ohos.app.ability.dataUriUtils<br>Class name: dataUriUtils<br>Method or attribute name: function getId(uri: string): number|@ohos.app.ability.dataUriUtils.d.ts|
......@@ -24,7 +24,7 @@
|Deleted|Module name: ohos.application.Ability<br>Class name: Ability<br>Method or attribute name: launchWant: Want;|NA|@ohos.application.Ability.d.ts|
|Deleted|Module name: ohos.application.Ability<br>Class name: Ability<br>Method or attribute name: lastRequestWant: Want;|NA|@ohos.application.Ability.d.ts|
|Deleted|Module name: ohos.application.Ability<br>Class name: Ability<br>Method or attribute name: callee: Callee;|NA|@ohos.application.Ability.d.ts|
|Deleted|Module name: ohos.application.Ability<br>Class name: Ability<br>Method or attribute name: onCreate(want: Want, param: AbilityConstant.LaunchParam): void;|NA|@ohos.application.Ability.d.ts|
|Deleted|Module name: ohos.application.Ability<br>Class name: Ability<br>Method or attribute name: onCreate(want: Want, launchParam: AbilityConstant.LaunchParam): void;|NA|@ohos.application.Ability.d.ts|
|Deleted|Module name: ohos.application.Ability<br>Class name: Ability<br>Method or attribute name: onWindowStageCreate(windowStage: window.WindowStage): void;|NA|@ohos.application.Ability.d.ts|
|Deleted|Module name: ohos.application.Ability<br>Class name: Ability<br>Method or attribute name: onWindowStageDestroy(): void;|NA|@ohos.application.Ability.d.ts|
|Deleted|Module name: ohos.application.Ability<br>Class name: Ability<br>Method or attribute name: onWindowStageRestore(windowStage: window.WindowStage): void;|NA|@ohos.application.Ability.d.ts|
......@@ -32,7 +32,7 @@
|Deleted|Module name: ohos.application.Ability<br>Class name: Ability<br>Method or attribute name: onForeground(): void;|NA|@ohos.application.Ability.d.ts|
|Deleted|Module name: ohos.application.Ability<br>Class name: Ability<br>Method or attribute name: onBackground(): void;|NA|@ohos.application.Ability.d.ts|
|Deleted|Module name: ohos.application.Ability<br>Class name: Ability<br>Method or attribute name: onContinue(wantParam : {[key: string]: any}): AbilityConstant.OnContinueResult;|NA|@ohos.application.Ability.d.ts|
|Deleted|Module name: ohos.application.Ability<br>Class name: Ability<br>Method or attribute name: onNewWant(want: Want, launchParams: AbilityConstant.LaunchParam): void;|NA|@ohos.application.Ability.d.ts|
|Deleted|Module name: ohos.application.Ability<br>Class name: Ability<br>Method or attribute name: onNewWant(want: Want, launchParam: AbilityConstant.LaunchParam): void;|NA|@ohos.application.Ability.d.ts|
|Deleted|Module name: ohos.application.Ability<br>Class name: Ability<br>Method or attribute name: onConfigurationUpdated(config: Configuration): void;|NA|@ohos.application.Ability.d.ts|
|Deleted|Module name: ohos.application.Ability<br>Class name: Ability<br>Method or attribute name: dump(params: Array<string>): Array<string>;|NA|@ohos.application.Ability.d.ts|
|Deleted|Module name: ohos.application.Ability<br>Class name: Ability<br>Method or attribute name: onMemoryLevel(level: AbilityConstant.MemoryLevel): void;|NA|@ohos.application.Ability.d.ts|
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册