harmony 鸿蒙@ohos.distributedBundle (Distributed Bundle Management)
@ohos.distributedBundle (Distributed Bundle Management)
The distributedBundle module manages distributed bundles.
NOTE
The initial APIs of this module are supported since API version 8. Newly added APIs will be marked with a superscript to indicate their earliest API version.
Modules to Import
import distributedBundle from '@ohos.distributedBundle';
System Capability
SystemCapability.BundleManager.DistributedBundleFramework
Required Permissions
Permission | Permission Level | Description |
---|---|---|
ohos.permission.GET_BUNDLE_INFO_PRIVILEGED | system_basic | Permission to query information about all applications. |
For details, see Permission Levels.
distributedBundle.getRemoteAbilityInfodeprecated
This API is deprecated since API version 9. You are advised to use getRemoteAbilityInfo(@ohos.bundle.distributedBundleManager) instead.
getRemoteAbilityInfo(elementName: ElementName, callback: AsyncCallback<RemoteAbilityInfo>): void;
Obtains information about the remote ability that matches the given element name. This API uses an asynchronous callback to return the result.
Required permissions
ohos.permission.GET_BUNDLE_INFO_PRIVILEGED
System capability
SystemCapability.BundleManager.DistributedBundleFramework
System API
This is a system API.
Parameters
Name | Type | Mandatory | Description |
---|---|---|---|
elementName | ElementName | Yes | ElementName. |
callback | AsyncCallback<RemoteAbilityInfo> | Yes | Callback used to return the remote ability information. |
distributedBundle.getRemoteAbilityInfodeprecated
This API is deprecated since API version 9. You are advised to use getRemoteAbilityInfo(@ohos.bundle.distributedBundleManager) instead.
getRemoteAbilityInfo(elementName: ElementName): Promise<RemoteAbilityInfo>
Obtains information about the remote ability that matches the given element name. This API uses a promise to return the result.
Required permissions
ohos.permission.GET_BUNDLE_INFO_PRIVILEGED
System capability
SystemCapability.BundleManager.DistributedBundleFramework
System API
This is a system API.
Parameters
Name | Type | Mandatory | Description |
---|---|---|---|
elementName | ElementName | Yes | ElementName. |
Return value
Type | Description |
---|---|
Promise<RemoteAbilityInfo> | Promise used to return the remote ability information. |
distributedBundle.getRemoteAbilityInfosdeprecated
This API is deprecated since API version 9. You are advised to use getRemoteAbilityInfo(@ohos.bundle.distributedBundleManager) instead.
getRemoteAbilityInfos(elementNames: Array<ElementName>, callback: AsyncCallback<Array<RemoteAbilityInfo>>): void;
Obtains information about remote abilities that match the given element names. This API uses an asynchronous callback to return the result.
Required permissions
ohos.permission.GET_BUNDLE_INFO_PRIVILEGED
System capability
SystemCapability.BundleManager.DistributedBundleFramework
System API
This is a system API.
Parameters
Name | Type | Mandatory | Description |
---|---|---|---|
elementNames | Array<ElementName> | Yes | ElementName array, whose maximum length is 10. |
callback | AsyncCallback< Array<RemoteAbilityInfo>> | Yes | Callback used to return an array of the remote ability information. |
distributedBundle.getRemoteAbilityInfosdeprecated
This API is deprecated since API version 9. You are advised to use getRemoteAbilityInfo(@ohos.bundle.distributedBundleManager) instead.
getRemoteAbilityInfos(elementNames: Array<ElementName>): Promise<Array<RemoteAbilityInfo>>
Obtains information about remote abilities that match the given element names. This API uses a promise to return the result.
Required permissions
ohos.permission.GET_BUNDLE_INFO_PRIVILEGED
System capability
SystemCapability.BundleManager.DistributedBundleFramework
System API
This is a system API.
Parameters
Name | Type | Mandatory | Description |
---|---|---|---|
elementNames | Array<ElementName> | Yes | ElementName array, whose maximum length is 10. |
Return value
Type | Description |
---|---|
Promise<Array<RemoteAbilityInfo>> | Promise used to return an array of the remote ability information. |
你可能感兴趣的鸿蒙文章
harmony 鸿蒙System Common Events (To Be Deprecated Soon)
harmony 鸿蒙System Common Events
harmony 鸿蒙API Reference Document Description
harmony 鸿蒙Enterprise Device Management Overview (for System Applications Only)
harmony 鸿蒙BundleStatusCallback
harmony 鸿蒙@ohos.bundle.innerBundleManager (innerBundleManager)
harmony 鸿蒙@ohos.bundle (Bundle)
harmony 鸿蒙@ohos.enterprise.EnterpriseAdminExtensionAbility (EnterpriseAdminExtensionAbility)
harmony 鸿蒙@ohos.WallpaperExtensionAbility (WallpaperExtensionAbility)
- 所属分类: 后端技术
- 本文标签:
热门推荐
-
2、 - 优质文章
-
3、 gate.io
-
8、 golang
-
9、 openharmony
-
10、 Vue中input框自动聚焦