提交 27cb16a2 编写于 作者: Z zengyawen 提交者: Gitee

Merge branch 'master' of gitee.com:openharmony/docs into master

Signed-off-by: Nzengyawen <zengyawen1@huawei.com>
......@@ -6,7 +6,7 @@ Your applications can use the APIs provided by the **mediaLibrary** module to pe
>
> Before developing features, read [MediaLibrary Overview](medialibrary-overview.md) to learn how to obtain a **MediaLibrary** instance and request the permissions to call the APIs of **MediaLibrary**.
To ensure the application running efficiency, most **MediaLibrary** API calls are asynchronous, and both callback and promise modes are provided for these APIs. The following code samples use the promise mode. For details about the APIs, see [MediaLibrary API Reference](../reference/apis/js-apis-medialibrary.md).
To maximize the application running efficiency, most **MediaLibrary** API calls are asynchronous in callback or promise mode. The following code samples use the promise mode. For details about the APIs, see [MediaLibrary API Reference](../reference/apis/js-apis-medialibrary.md).
## Querying Media Assets
......@@ -215,7 +215,7 @@ async function getCameraImagePromise() {
## Obtaining the Thumbnail of an Image or a Video
You can call [FileAsset.getThumbnail](../reference/apis/js-apis-medialibrary.md#getthumbnail8-2) with the thumbnail size passed in to obtain the thumbnail of an image or a video. Thumbnails are usually displayed on the UI.
You can call [FileAsset.getThumbnail](../reference/apis/js-apis-medialibrary.md#getthumbnail8-2) with the thumbnail size passed in to obtain the thumbnail of an image or a video. Your application can use thumbnails to offer a quick preview on images and videos.
**Prerequisites**
......@@ -224,8 +224,6 @@ You can call [FileAsset.getThumbnail](../reference/apis/js-apis-medialibrary.md#
### Obtaining the Thumbnail of an Image
Your application may need to obtain the thumbnail of an image for preview purposes.
The following describes how to obtain the thumbnail (size: 720 x 720) of the first image in the album.
**How to Develop**
......@@ -273,7 +271,7 @@ You can call [MediaLibrary.createAsset](../reference/apis/js-apis-medialibrary.m
- You have obtained a **MediaLibrary** instance.
- You have granted the permission **ohos.permission.WRITE_MEDIA**.
- [Obtain the public directory](medialibrary-filepath-guidelines.md).
- [You have obtained a public directory](medialibrary-filepath-guidelines.md).
The following describes how to create a file of the **MediaType.FILE** type.
......@@ -296,7 +294,7 @@ async function example() {
You can use [FileAsset.trash](../reference/apis/js-apis-medialibrary.md#trash8) to move a media asset to the recycle bin.
By default, files in the recycle bin will be stored for 30 days. During this period, you can set **isTrash** in **trash** to **false** to recover the files from the recycle bin. Application users can also recover the files through the system applications **Files** or **Gallery**.
By default, files in the recycle bin will be stored for 30 days before being permanently removed. During this period, you can set **isTrash** in **trash** to **false** to recover the files. Application users can also recover the files through the system applications **Files** or **Gallery**.
**Prerequisites**
......@@ -339,11 +337,9 @@ async function example() {
## Renaming a Media Asset
Renaming modifies the **FileAsset.displayName** attribute of a file, that is, the displayed file name, including the file name extension.
After the modification, call [FileAsset.commitModify](../reference/apis/js-apis-medialibrary.md#commitmodify8-1) to commit the modification to the database.
To rename a media asset, modify the **FileAsset.displayName** attribute (which specifies the displayed file name, including the file name extension) and commit the modification through [FileAsset.commitModify](../reference/apis/js-apis-medialibrary.md#commitmodify8-1).
Before renaming a file, you must call [FetchFileResult](../reference/apis/js-apis-medialibrary.md#fetchfileresult7) to obtain the file.
Before renaming a file, you must obtain the file, for example, by calling [FetchFileResult](../reference/apis/js-apis-medialibrary.md#fetchfileresult7).
**Prerequisites**
......@@ -358,7 +354,7 @@ The following describes how to rename the first file in the result set as **newt
2. Call **getFileAssets** to obtain the images in the target album.
3. Call **getFirstObject** to obtain the first image among all the images obtained.
4. Rename the image as **newImage.jpg**.
5. Call **FileAsset.commitModify** to commit the modification of the attributes to the database.
5. Call **FileAsset.commitModify** to commit the modification to the database.
```ts
async function example() {
......
此差异已折叠。
# AVSession Overview
## Overview
AVSession, short for audio and video session, is also known as media session.
- Application developers can use the APIs provided by the **AVSession** module to connect their audio and video applications to the system's Media Controller.
- System developers can use the APIs provided by the **AVSession** module to display media information of system audio and video applications and carry out unified playback control.
You can implement the following features through the **AVSession** module:
1. Unified playback control entry
If there are multiple audio and video applications on the device, users need to switch to and access different applications to control media playback. With AVSession, a unified playback control entry of the system (such as Media Controller) is used for playback control of these audio and video applications. No more switching is required.
2. Better background application management
When an application running in the background automatically starts audio playback, it is difficult for users to locate the application. With AVSession, users can quickly find the application that plays the audio clip in Media Controller.
## Basic Concepts
- AVSession
A channel used for information exchange between applications and Media Controller. For AVSession, one end is the media application under control, and the other end is Media Controller. Through AVSession, an application can transfer the media playback information to Media Controller and receive control commands from Media Controller.
- AVSessionController
Object that controls media sessions and thereby controls the playback behavior of applications. Through AVSessionController, Media Controller can control the playback behavior of applications, obtain playback information, and send control commands. It can also monitor the playback state of applications to ensure synchronization of the media session information.
- Media Controller
Holder of AVSessionController. Through AVSessionController, Media Controller sends commands to control media playback of applications.
## Implementation Principle
The **AVSession** module provides two classes: **AVSession** and **AVSessionController**.
**Figure 1** AVSession interaction
![en-us_image_avsession](figures/en-us_image_avsession.png)
- Interaction between the application and Media Controller: First, an audio application creates an **AVSession** object and sets session information, including media metadata, launcher ability, and playback state information. Then, Media Controller creates an **AVSessionController** object to obtain session-related information and send the 'play' command to the audio application. Finally, the audio application responds to the command and updates the playback state.
- Distributed projection: When a connected device creates a local session, Media Controller or the audio application can select another device to be projected based on the device list, synchronize the local session to the remote device, and generate a controllable remote session. The remote session is controlled by sending control commands to the remote device's application through its AVSessionController.
## Constraints
- The playback information displayed in Media Controller is the media information proactively written by the media application to AVSession.
- Media Controller controls the playback of a media application based on the responses of the media application to control commands.
- AVSession can transmit media playback information and control commands. It does not display information or execute control commands.
- Do not develop Media Controller for common applications. For common audio and video applications running on OpenHarmony, the default control end is Media Controller, which is a system application. You do not need to carry out additional development for Media Controller.
- If you want to develop your own system running OpenHarmony, you can develop your own Media Controller.
- For better background management of audio and video applications, the **AVSession** module enforces background control for third-party applications. Only third-party applications that have accessed AVSession can play audio in the background. Otherwise, the system forcibly pauses the playback when a third-party application switches to the background.
此差异已折叠。
# AVSession Management Error Codes
## 6600101 Session Service Exception
**Error Message**
Session service exception
**Description**
The session service is abnormal, and the application cannot obtain a response from the session service. For example, the session service is not running or the communication with the session service fails.
**Possible Causes**
The session service is killed during session restart.
**Solution**
1. The system retries the operation automatically. If the error persists for 3 seconds or more, stop the operation on the session or controller.
2. Destroy the current session or session controller and re-create it. If the re-creation fails, stop the operation on the session.
## 6600102 Session Does Not Exist
**Error Message**
The session does not exist
**Description**
Parameters are set for or commands are sent to the session that does not exist.
**Possible Causes**
The session has been destroyed, and no session record exists on the server.
**Solution**
1. If the error occurs on the application, re-create the session. If the error occurs on Media Controller, stop sending query or control commands to the session.
2. If the error occurs on the session service, query the current session record and pass the correct session ID when creating the controller.
## 6600103 Session Controller Does Not Exist
**Error Message**
The session controller does not exist
**Description**
A control command or an event is sent to the controller that does not exist.
**Possible Causes**
The controller has been destroyed.
**Solution**
Query the session record and create the corresponding controller.
## 6600104 Remote Session Connection Failure
**Error Message**
The remote session connection failed
**Description**
The communication between the local session and the remote session fails.
**Possible Causes**
The communication between devices is interrupted.
**Solution**
Stop sending control commands to the session. Subscribe to output device changes, and resume the sending when the output device is changed.
## 6600105 Invalid Session Command
**Error Message**
Invalid session command
**Description**
The control command or event sent to the session is not supported.
**Possible Causes**
The session does not support this command.
**Solution**
Stop sending the command or event. Query the commands supported by the session, and send a command supported.
## 6600106 Session Not Activated
**Error Message**
The session not active
**Description**
A control command or event is sent to the session that is not activated.
**Possible Causes**
The session is in the inactive state.
**Solution**
Stop sending the command or event. Subscribe to the session activation status, and resume the sending when the session is activated.
## 6600107 Too Many Commands or Events
**Error Message**
Command or event overload
**Description**
The session client sends too many messages or commands to the server in a period of time, causing the server to be overloaded.
**Possible Causes**
The server is overloaded with messages or events.
**Solution**
Control the frequency of sending commands or events.
......@@ -11,7 +11,7 @@ You only need to perform operations in [Resource Files](#resource-files) and [Re
Resource files store application content in multiple languages. This framework uses JSON files to store resource definitions. Place the resource file of each locale in the i18n directory described in [File Organization](../ui/js-framework-file.md).
Resource files should be named in _language-script-region_.json format. For example, the resource file for Hong Kong Chinese in the traditional script is named zh-Hant-HK. You can omit the region, for example, zh-CN for simplified Chinese, or omit both the script and region, for example, zh for Chinese.
Resource files should be named in _language-script-region_.json format. For example, the resource file for Hong Kong(China) in the traditional script is named zh-Hant-HK. You can omit the region, for example, zh-CN for simplified Chinese, or omit both the script and region, for example, zh for Chinese.
```
......
......@@ -57,8 +57,9 @@ In the stage model, the main window of an application is created and maintained
1. Obtain the main window.
Call **getMainWindow** to obtain the main window of the application.
Call **getMainWindow** to obtain the main window of the application.
2. Set the properties of the main window.
You can set multiple properties of the main window, such as the background color, brightness, and whether the main window is touchable. The code snippet below uses the **touchable** property as an example.
......@@ -83,21 +84,21 @@ class MainAbility extends Ability {
console.info('Succeeded in obtaining the main window. Data: ' + JSON.stringify(data));
// 2. Set the touchable property of the main window.
let isTouchable = true;
windowClass.setTouchable(isTouchable, (err, data) => {
windowClass.setTouchable(isTouchable, (err) => {
if (err.code) {
console.error('Failed to set the window to be touchable. Cause:' + JSON.stringify(err));
return;
}
console.info('Succeeded in setting the window to be touchable. Data:' + JSON.stringify(data));
console.info('Succeeded in setting the window to be touchable.');
})
})
// 3. Load the page content to the main window.
windowStage.loadContent("pages/page2", (err, data) => {
windowStage.loadContent("pages/page2", (err) => {
if (err.code) {
console.error('Failed to load the content. Cause:' + JSON.stringify(err));
return;
}
console.info('Succeeded in loading the content. Data: ' + JSON.stringify(data));
console.info('Succeeded in loading the content.');
});
}
};
......@@ -111,12 +112,11 @@ You can create an application subwindow, such as a dialog box, and set its prope
### How to Develop
1. Create or obtain a subwindow.
Call **createSubWindow** to create a subwindow.
Call **getSubWindow** to obtain a subwindow.
1. Create a subwindow.
Call **createSubWindow** to create a subwindow.
2. Set the properties of the subwindow.
After the subwindow is created, you can set its properties, such as the size, position, background color, and brightness.
......@@ -144,44 +144,35 @@ Call **getSubWindow** to obtain a subwindow.
}
sub_windowClass = data;
console.info('Succeeded in creating the subwindow. Data: ' + JSON.stringify(data));
// 1. Obtain an available subwindow.
windowStage_.getSubWindow((err, data) => {
if (err.code) {
console.error('Failed to obtain the subWindow. Cause:' + JSON.stringify(err));
return;
}
console.info('Succeeded in obtaining the subWindow. Data: ' + JSON.stringify(data));
sub_windowClass = data;
});
// 2. Set the position, size, and other properties of the subwindow.
sub_windowClass.moveTo(300, 300, (err, data) => {
sub_windowClass.moveTo(300, 300, (err) => {
if (err.code) {
console.error('Failed to move the window. Cause:' + JSON.stringify(err));
return;
}
console.info('Succeeded in moving the window. Data: ' + JSON.stringify(data));
console.info('Succeeded in moving the window.');
});
sub_windowClass.resetSize(500, 1000, (err, data) => {
sub_windowClass.resetSize(500, 1000, (err) => {
if (err.code) {
console.error('Failed to change the window size. Cause:' + JSON.stringify(err));
return;
}
console.info('Succeeded in changing the window size. Data: ' + JSON.stringify(data));
console.info('Succeeded in changing the window size.');
});
// 3. Load the page content to the subwindow.
sub_windowClass.loadContent("pages/page3", (err, data) => {
sub_windowClass.loadContent("pages/page3", (err) => {
if (err.code) {
console.error('Failed to load the content. Cause:' + JSON.stringify(err));
return;
}
console.info('Succeeded in loading the content. Data: ' + JSON.stringify(data));
console.info('Succeeded in loading the content.');
// 3. Show the subwindow.
sub_windowClass.show((err, data) => {
sub_windowClass.show((err) => {
if (err.code) {
console.error('Failed to show the window. Cause:' + JSON.stringify(err));
console.error('Failed to show the window. Cause: ' + JSON.stringify(err));
return;
}
console.info('Succeeded in showing the window. Data: ' + JSON.stringify(data));
console.info('Succeeded in showing the window.');
});
});
})
......@@ -189,18 +180,18 @@ Call **getSubWindow** to obtain a subwindow.
destroySubWindow() {
// 4. Destroy the subwindow when it is no longer needed (depending on the service logic).
sub_windowClass.destroy((err, data) => {
sub_windowClass.destroy((err) => {
if (err.code) {
console.error('Failed to destroy the window. Cause: ' + JSON.stringify(err));
return;
}
console.info('Succeeded in destroying the window. Data: ' + JSON.stringify(data));
console.info('Succeeded in destroying the window.');
});
}
onWindowStageCreate(windowStage) {
windowStage_ = windowStage;
// Create the subwindow when it is needed, for example, when a click event occurs in the main window. Calling onWindowStageCreate is not always necessary. The code here is for reference only.
// Create a subwindow when it is needed, for example, when a click event occurs in the main window. Calling onWindowStageCreate is not always necessary. The code here is for reference only.
this.showSubWindow();
}
......@@ -221,8 +212,9 @@ To create a better video watching and gaming experience, you can use the immersi
1. Obtain the main window.
Call **getMainWindow** to obtain the main window of the application.
Call **getMainWindow** to obtain the main window of the application.
2. Implement the immersive effect. You can use any of the following methods:
- Method 1: Call **setFullScreen** to set the main window to be displayed in full screen. In this case, the navigation bar and status bar are hidden.
- Method 2: Call **setSystemBarEnable** to hide the navigation bar and status bar.
......@@ -249,30 +241,30 @@ Call **getMainWindow** to obtain the main window of the application.
// 2. Use method 1 to implement the immersive effect.
let isFullScreen = true;
windowClass.setFullScreen(isFullScreen, (err, data) => {
windowClass.setFullScreen(isFullScreen, (err) => {
if (err.code) {
console.error('Failed to enable the full-screen mode. Cause:' + JSON.stringify(err));
return;
}
console.info('Succeeded in enabling the full-screen mode. Data: ' + JSON.stringify(data));
console.info('Succeeded in enabling the full-screen mode.');
});
// 2. Use method 2 to implement the immersive effect.
let names = [];
windowClass.setSystemBarEnable(names, (err, data) => {
windowClass.setSystemBarEnable(names, (err) => {
if (err.code) {
console.error('Failed to set the system bar to be visible. Cause:' + JSON.stringify(err));
return;
}
console.info('Succeeded in setting the system bar to be visible. Data: ' + JSON.stringify(data));
console.info('Succeeded in setting the system bar to be visible.');
});
// 2. Use method 3 to implement the immersive effect.
let isLayoutFullScreen = true;
windowClass.setLayoutFullScreen(isLayoutFullScreen, (err, data) => {
windowClass.setLayoutFullScreen(isLayoutFullScreen, (err) => {
if (err.code) {
console.error('Failed to set the window layout to full-screen mode. Cause:' + JSON.stringify(err));
return;
}
console.info('Succeeded in setting the window layout to full-screen mode. Data: ' + JSON.stringify(data));
console.info('Succeeded in setting the window layout to full-screen mode.');
});
let sysBarProps = {
statusBarColor: '#ff00ff',
......@@ -281,21 +273,21 @@ Call **getMainWindow** to obtain the main window of the application.
statusBarContentColor: '#ffffff',
navigationBarContentColor: '#ffffff'
};
windowClass.setSystemBarProperties(sysBarProps, (err, data) => {
windowClass.setSystemBarProperties(sysBarProps, (err) => {
if (err.code) {
console.error('Failed to set the system bar properties. Cause: ' + JSON.stringify(err));
return;
}
console.info('Succeeded in setting the system bar properties. Data: ' + JSON.stringify(data));
console.info('Succeeded in setting the system bar properties.');
});
})
// 3. Load the page content to the immersive window.
windowStage.loadContent("pages/page2", (err, data) => {
windowStage.loadContent("pages/page2", (err) => {
if (err.code) {
console.error('Failed to load the content. Cause:' + JSON.stringify(err));
return;
}
console.info('Succeeded in loading the content. Data: ' + JSON.stringify(data));
console.info('Succeeded in loading the content.');
});
}
};
......@@ -310,13 +302,13 @@ A floating window is created based on an existing task. It is always displayed i
### How to Develop
1. Apply for permissions.
To create a floating window (of the **WindowType.TYPE_FLOAT** type), you must configure the **ohos.permission.SYSTEM_FLOAT_WINDOW** permission in the **requestPermissions** field of the **module.json5** file. For details about the file, see [Application Package Structure Configuration File](../quick-start/stage-structure.md).
To create a floating window (of the **WindowType.TYPE_FLOAT** type), you must configure the **ohos.permission.SYSTEM_FLOAT_WINDOW** permission in the **requestPermissions** field of the **module.json5** file. For details about the file, see [Application Package Structure Configuration File](../quick-start/stage-structure.md).
> **NOTE**
>
> If the task for creating the floating window is reclaimed by the system, the floating window will no longer be displayed. If you want the floating window to be displayed in such a case, apply for a [continuous task](../task-management/background-task-overview.md).
```json
{
"module": {
......@@ -334,7 +326,7 @@ To create a floating window (of the **WindowType.TYPE_FLOAT** type), you must co
}
}
```
2. Create a floating window.
Call **window.create** to create a floating window.
......@@ -368,43 +360,43 @@ To create a floating window (of the **WindowType.TYPE_FLOAT** type), you must co
console.info('Succeeded in creating the floatWindow. Data: ' + JSON.stringify(data));
windowClass = data;
// 3. Set the position, size, and properties of the floating window.
windowClass.moveTo(300, 300, (err, data) => {
windowClass.moveTo(300, 300, (err) => {
if (err.code) {
console.error('Failed to move the window. Cause:' + JSON.stringify(err));
return;
}
console.info('Succeeded in moving the window. Data: ' + JSON.stringify(data));
console.info('Succeeded in moving the window.');
});
windowClass.resetSize(500, 1000, (err, data) => {
windowClass.resetSize(500, 1000, (err) => {
if (err.code) {
console.error('Failed to change the window size. Cause:' + JSON.stringify(err));
return;
}
console.info('Succeeded in changing the window size. Data: ' + JSON.stringify(data));
console.info('Succeeded in changing the window size.');
});
// 4. Load the page content to the floating window.
windowClass.loadContent("pages/page4", (err, data) => {
windowClass.loadContent("pages/page4", (err) => {
if (err.code) {
console.error('Failed to load the content. Cause:' + JSON.stringify(err));
return;
}
console.info('Succeeded in loading the content. Data: ' + JSON.stringify(data));
console.info('Succeeded in loading the content.');
// 4. Show the floating window.
windowClass.show((err, data) => {
windowClass.show((err) => {
if (err.code) {
console.error('Failed to show the window. Cause: ' + JSON.stringify(err));
return;
}
console.info('Succeeded in showing the window. Data: ' + JSON.stringify(data));
console.info('Succeeded in showing the window.');
});
});
// 5. Destroy the floating window when it is no longer needed (depending on the service logic).
windowClass.destroy((err, data) => {
windowClass.destroy((err) => {
if (err.code) {
console.error('Failed to destroy the window. Cause: ' + JSON.stringify(err));
return;
}
console.info('Succeeded in destroying the window. Data: ' + JSON.stringify(data));
console.info('Succeeded in destroying the window.');
});
});
}
......
......@@ -65,46 +65,46 @@ export default class ServiceExtensionAbility1 extends ExtensionContext {
console.info('Succeeded in creating the volume window.')
windowClass = data;
// 2. Change the size and position of the volume bar window, or set its properties such as the background color and brightness.
windowClass.moveTo(300, 300, (err, data) => {
windowClass.moveTo(300, 300, (err) => {
if (err.code) {
console.error('Failed to move the window. Cause:' + JSON.stringify(err));
return;
}
console.info('Succeeded in moving the window. Data: ' + JSON.stringify(data));
console.info('Succeeded in moving the window.');
});
windowClass.resetSize(500, 1000, (err, data) => {
windowClass.resetSize(500, 1000, (err) => {
if (err.code) {
console.error('Failed to change the window size. Cause:' + JSON.stringify(err));
return;
}
console.info('Succeeded in changing the window size. Data: ' + JSON.stringify(data));
console.info('Succeeded in changing the window size.');
});
// 3. Load the page content to the volume bar window.
windowClass.loadContent("pages/page_volume", (err, data) => {
windowClass.loadContent("pages/page_volume", (err) => {
if (err.code) {
console.error('Failed to load the content. Cause:' + JSON.stringify(err));
return;
}
console.info('Succeeded in loading the content. Data: ' + JSON.stringify(data));
console.info('Succeeded in loading the content.');
// 3. Show the volume bar window.
windowClass.show((err, data) => {
windowClass.show((err) => {
if (err.code) {
console.error('Failed to show the window. Cause:' + JSON.stringify(err));
return;
}
console.info('Succeeded in showing the window. Data: ' + JSON.stringify(data));
console.info('Succeeded in showing the window.');
});
});
// 4. Hide or destroy the volume bar window.
// Hide the volume bar window when a click event outside the window is detected.
windowClass.on('touchOutside', () => {
console.info('touch outside');
windowClass.hide((err, data) => {
windowClass.hide((err) => {
if (err.code) {
console.error('Failed to hide the window. Cause: ' + JSON.stringify(err));
return;
}
console.info('Succeeded in hidinging the window. Data: ' + JSON.stringify(data));
console.info('Succeeded in hidinging the window.');
});
});
});
......
......@@ -63,4 +63,8 @@ You are advised to use the stage model for window development.
## Constraints
You cannot develop system windows in the FA model.
- You cannot develop system windows in the FA model.
- The main window and subwindow have the following size limits: [320, 2560] in width and [240, 2560] in height, both in units of vp.
- The system window has the following size limits: [0, 2560] in width and [0, 2560] in height, both in units of vp.
......@@ -361,7 +361,7 @@ currentSession.deactivate().then(() => {
| sendControlCommand(command: AVControlCommand, callback: AsyncCallback\<void>): void | 发送控制命令 |
| sendSystemAVKeyEvent(event: KeyEvent, callback: AsyncCallback\<void>): void | 发送系统按键命令 |
| sendSystemControlCommand(command: AVControlCommand, callback: AsyncCallback\<void>): void | 发送系统控制命令 |
| castAudio(session: SessionToken | 'all', audioDevices: Array\<audio.AudioDeviceDescriptor>, callback: AsyncCallback\<void>): void | 远端投播 |
| castAudio(session: SessionToken \| 'all', audioDevices: Array\<audio.AudioDeviceDescriptor>, callback: AsyncCallback\<void>): void | 远端投播 |
### 开发步骤
1.导入模块接口
......
......@@ -26,7 +26,7 @@ SystemCapability.BundleManager.DistributedBundleFramework
## distributedBundle.getRemoteAbilityInfo<sup>deprecated<sup>
> 从API version 9开始不再维护,建议使用[getRemoteAbilityInfo](js-apis-distributedBundle.md)替代。
> 从API version 9开始不再维护,建议使用[getRemoteAbilityInfo(@ohos.bundle.distributedBundle)](js-apis-distributedBundle.md)替代。
getRemoteAbilityInfo(elementName: ElementName, callback: AsyncCallback&lt;RemoteAbilityInfo&gt;): void;
......@@ -55,7 +55,7 @@ SystemCapability.BundleManager.DistributedBundleFramework
## distributedBundle.getRemoteAbilityInfo<sup>deprecated<sup>
> 从API version 9开始不再维护,建议使用[getRemoteAbilityInfo](js-apis-distributedBundle.md)替代。
> 从API version 9开始不再维护,建议使用[getRemoteAbilityInfo(@ohos.bundle.distributedBundle)](js-apis-distributedBundle.md)替代。
getRemoteAbilityInfo(elementName: ElementName): Promise&lt;RemoteAbilityInfo&gt;
......@@ -87,7 +87,7 @@ SystemCapability.BundleManager.DistributedBundleFramework
## distributedBundle.getRemoteAbilityInfos<sup>deprecated<sup>
> 从API version 9开始不再维护,建议使用[getRemoteAbilityInfo](js-apis-distributedBundle.md)替代。
> 从API version 9开始不再维护,建议使用[getRemoteAbilityInfo(@ohos.bundle.distributedBundle)](js-apis-distributedBundle.md)替代。
getRemoteAbilityInfos(elementNames: Array&lt;ElementName&gt;, callback: AsyncCallback&lt;Array&lt;RemoteAbilityInfo&gt;&gt;): void;
......@@ -116,7 +116,7 @@ SystemCapability.BundleManager.DistributedBundleFramework
## distributedBundle.getRemoteAbilityInfos<sup>deprecated<sup>
> 从API version 9开始不再维护,建议使用[getRemoteAbilityInfo](js-apis-distributedBundle.md)替代。
> 从API version 9开始不再维护,建议使用[getRemoteAbilityInfo(@ohos.bundle.distributedBundle)](js-apis-distributedBundle.md)替代。
getRemoteAbilityInfos(elementNames: Array&lt;ElementName&gt;): Promise&lt;Array&lt;RemoteAbilityInfo&gt;&gt;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册