js-apis-extensionAbilityInfo.md 2.1 KB
Newer Older
W
wusongqing 已提交
1 2
# ExtensionAbilityInfo

W
wusongqing 已提交
3
> **NOTE**
W
wusongqing 已提交
4 5 6
>
> The initial APIs of this module are supported since API version 9. API version 9 is a canary version for trial use. The APIs of this version may be unstable.

W
wusongqing 已提交
7 8 9 10 11 12
## Modules to Import
```js
import bundle from "@ohos.bundle";
```


W
wusongqing 已提交
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
## AbilityInfo

Provides the ability information.

**System capability**: SystemCapability.Ability.AbilityRuntime.Core

| Name                   | Type                   | Readable  | Writable  | Description                      |
| --------------------- | --------------------- | ---- | ---- | ------------------------ |
| bundleName            | string                | Yes   | No   | Bundle name of the application.                    |
| moduleName            | string                | Yes   | No   | Name of the HAP file to which the ability belongs.       |
| name                  | string                | Yes   | No   | Ability name.               |
| labelId               | number                | Yes   | No   | Ability label ID.            |
| descriptionId         | number                | Yes   | No   | Ability description ID.            |
| iconId                | number                | Yes   | No   | Ability icon ID.            |
| isVisible             | boolean               | Yes   | No   | Whether the ability can be called by other applications.    |
| extensionAbilityType  | bundle.ExtensionAbilityType | Yes  | No  | Type of the Extension ability.     |
| permissions           | Array\<string>        | Yes   | No   | Permissions required for other applications to call the ability.|
| applicationInfo       | ApplicationInfo       | Yes   | No   | Application configuration information.               |
| metaData              | Array\<Metadata>      | Yes   | No   | Metadata of the ability.             |
| enabled               | boolean               | Yes   | No   | Whether the ability is enabled.             |
| readPermission        | string                | Yes   | No   | Permission required for reading the ability data.        |
| writePermission       | string                | Yes   | No   | Permission required for writing data to the ability.        |