• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# ExtensionRunningInfo
2
3> **NOTE**
4>
5> 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.
6
7
8Provides extension running information.
9
10## Modules to Import
11
12```js
13import abilitymanager from '@ohos.application.abilityManager';
14```
15
16## Usage
17
18
19The extension running information is obtained through an **abilityManager** instance.
20
21```js
22import abilitymanager from '@ohos.application.abilityManager';
23abilitymanager.getExtensionRunningInfos(upperLimit, (err,data) => {
24    console.log("getExtensionRunningInfos err: "  + err + " data: " + JSON.stringify(data));
25});
26```
27
28
29### Attributes
30
31**System capability**: SystemCapability.Ability.AbilityRuntime.Core
32
33| Name| Type| Readable| Writable| Description|
34| -------- | -------- | -------- | -------- | -------- |
35| extension | ElementName | Yes| No| Information that matches an extension.|
36| pid | number | Yes| No| Process ID.|
37| uid | number | Yes| No| User ID.|
38| processName | string | Yes| No| Process name.|
39| startTime | number | Yes| No| Extension start time.|
40| clientPackage | Array<String> | Yes| No| Names of all packages in the process.|
41| type | [bundle.ExtensionAbilityType](#bundleextensionabilitytype) | Yes| No| Extension type.|
42
43
44## bundle.ExtensionAbilityType
45
46Enumerates extension types.
47
48**System capability**: SystemCapability.BundleManager.BundleFramework
49
50| Name| Value| Description|
51| -------- | -------- | -------- |
52| FORM | 0 | Extension information of the form type.< |
53| WORK_SCHEDULER | 1 | Extension information of the work scheduler type.< |
54| INPUT_METHOD | 2 | Extension information of the input method type.< |
55| SERVICE | 3 | Extension information of the service type.< |
56| ACCESSIBILITY | 4 | Extension information of the accessibility type.< |
57| DATA_SHARE | 5 | Extension information of the data share type.< |
58| FILE_SHARE | 6 | Extension information of the file share type.< |
59| STATIC_SUBSCRIBER | 7 | Extension information of the static subscriber type.< |
60| WALLPAPER | 8 | Extension information of the wallpaper type.< |
61| UNSPECIFIED | 9 | Extension information of the unspecified type.< |
62