1/*
2 * Copyright (c) 2022-2024 Huawei Device Co., Ltd.
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
6 *
7 *     http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
14 */
15
16/**
17 * @file
18 * @kit AbilityKit
19 */
20
21import { AsyncCallback } from './@ohos.base';
22import * as _ApplicationStateObserver from './application/ApplicationStateObserver';
23import type * as _AppForegroundStateObserver from './application/AppForegroundStateObserver';
24import * as _AbilityStateData from './application/AbilityStateData';
25import * as _AppStateData from './application/AppStateData';
26import type * as _ProcessData from './application/ProcessData';
27import { ProcessInformation as _ProcessInformation } from './application/ProcessInformation';
28import * as _AbilityFirstFrameStateObserver from './application/AbilityFirstFrameStateObserver';
29import * as _AbilityFirstFrameStateData from './application/AbilityFirstFrameStateData';
30import bundleManager from './@ohos.bundle.bundleManager';
31import { RunningMultiAppInfo as _RunningMultiAppInfo } from './application/RunningMultiAppInfo';
32
33/**
34 * This module provides the function of app manager service.
35 *
36 * @namespace appManager
37 * @syscap SystemCapability.Ability.AbilityRuntime.Core
38 * @since 9
39 */
40/**
41 * This module provides the function of app manager service.
42 *
43 * @namespace appManager
44 * @syscap SystemCapability.Ability.AbilityRuntime.Core
45 * @atomicservice
46 * @since 11
47 */
48declare namespace appManager {
49  /**
50   * Enum for the application state
51   *
52   * @enum { number }
53   * @syscap SystemCapability.Ability.AbilityRuntime.Core
54   * @systemapi
55   * @since 9
56   */
57  export enum ApplicationState {
58    /**
59     * The state in which the application is being created.
60     *
61     * @syscap SystemCapability.Ability.AbilityRuntime.Core
62     * @systemapi
63     * @since 9
64     */
65    STATE_CREATE,
66
67    /**
68     * The state that the application is in when it switches to the foreground.
69     *
70     * @syscap SystemCapability.Ability.AbilityRuntime.Core
71     * @systemapi
72     * @since 9
73     */
74    STATE_FOREGROUND,
75
76    /**
77     * The state in which the application is in focus.
78     *
79     * @syscap SystemCapability.Ability.AbilityRuntime.Core
80     * @systemapi
81     * @since 9
82     */
83    STATE_ACTIVE,
84
85    /**
86     * The state in which the application is invisible in the background.
87     *
88     * @syscap SystemCapability.Ability.AbilityRuntime.Core
89     * @systemapi
90     * @since 9
91     */
92    STATE_BACKGROUND,
93
94    /**
95     * The state that the application is in when it is destroyed.
96     *
97     * @syscap SystemCapability.Ability.AbilityRuntime.Core
98     * @systemapi
99     * @since 9
100     */
101    STATE_DESTROY
102  }
103
104  /**
105   * Enum for the process state
106   *
107   * @enum { number }
108   * @syscap SystemCapability.Ability.AbilityRuntime.Core
109   * @since 10
110   */
111  /**
112   * Enum for the process state
113   *
114   * @enum { number }
115   * @syscap SystemCapability.Ability.AbilityRuntime.Core
116   * @atomicservice
117   * @since 11
118   */
119  export enum ProcessState {
120    /**
121     * The state that the process is in when it is being created.
122     *
123     * @syscap SystemCapability.Ability.AbilityRuntime.Core
124     * @since 10
125     */
126    /**
127     * The state that the process is in when it is being created.
128     *
129     * @syscap SystemCapability.Ability.AbilityRuntime.Core
130     * @atomicservice
131     * @since 11
132     */
133    STATE_CREATE,
134
135    /**
136     * The state in which the process is in when it switches to the foreground.
137     *
138     * @syscap SystemCapability.Ability.AbilityRuntime.Core
139     * @since 10
140     */
141    /**
142     * The state in which the process is in when it switches to the foreground.
143     *
144     * @syscap SystemCapability.Ability.AbilityRuntime.Core
145     * @atomicservice
146     * @since 11
147     */
148    STATE_FOREGROUND,
149
150    /**
151     * The state in which the process is in focus.
152     *
153     * @syscap SystemCapability.Ability.AbilityRuntime.Core
154     * @since 10
155     */
156    /**
157     * The state in which the process is in focus.
158     *
159     * @syscap SystemCapability.Ability.AbilityRuntime.Core
160     * @atomicservice
161     * @since 11
162     */
163    STATE_ACTIVE,
164
165    /**
166     * The state in which a process is invisible in the background.
167     *
168     * @syscap SystemCapability.Ability.AbilityRuntime.Core
169     * @since 10
170     */
171    /**
172     * The state in which a process is invisible in the background.
173     *
174     * @syscap SystemCapability.Ability.AbilityRuntime.Core
175     * @atomicservice
176     * @since 11
177     */
178    STATE_BACKGROUND,
179
180    /**
181     * The state that the process is in when it is destroyed.
182     *
183     * @syscap SystemCapability.Ability.AbilityRuntime.Core
184     * @since 10
185     */
186    /**
187     * The state that the process is in when it is destroyed.
188     *
189     * @syscap SystemCapability.Ability.AbilityRuntime.Core
190     * @atomicservice
191     * @since 11
192     */
193    STATE_DESTROY
194  }
195
196  /**
197   * Enum for the preload mode
198   *
199   * @enum { number }
200   * @syscap SystemCapability.Ability.AbilityRuntime.Core
201   * @systemapi
202   * @stagemodelonly
203   * @since 12
204   */
205  export enum PreloadMode {
206    /**
207     * Preload application when press the app icon down.
208     *
209     * @syscap SystemCapability.Ability.AbilityRuntime.Core
210     * @systemapi
211     * @stagemodelonly
212     * @since 12
213     */
214    PRESS_DOWN
215  }
216
217  /**
218   * Register application state observer.
219   *
220   * @permission ohos.permission.RUNNING_STATE_OBSERVER
221   * @param { 'applicationState' } type - applicationState.
222   * @param { ApplicationStateObserver } observer - The application state observer.
223   * @returns { number } Returns the number code of the observer.
224   * @throws { BusinessError } 201 - Permission denied.
225   * @throws { BusinessError } 202 - Not system application.
226   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
227   * 2. Incorrect parameter types; 3. Parameter verification failed.
228   * @throws { BusinessError } 16000050 - Internal error.
229   * @syscap SystemCapability.Ability.AbilityRuntime.Core
230   * @systemapi
231   * @since 9
232   */
233  function on(type: 'applicationState', observer: ApplicationStateObserver): number;
234
235  /**
236   * Register application state observer.
237   *
238   * @permission ohos.permission.RUNNING_STATE_OBSERVER
239   * @param { 'applicationState' } type - applicationState.
240   * @param { ApplicationStateObserver } observer - The application state observer.
241   * @param { Array<string> } bundleNameList - The list of bundleName. The max length is 128.
242   * @returns { number } Returns the number code of the observer.
243   * @throws { BusinessError } 201 - Permission denied.
244   * @throws { BusinessError } 202 - Not system application.
245   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
246   * 2. Incorrect parameter types; 3. Parameter verification failed.
247   * @throws { BusinessError } 16000050 - Internal error.
248   * @syscap SystemCapability.Ability.AbilityRuntime.Core
249   * @systemapi
250   * @since 9
251   */
252  function on(type: 'applicationState', observer: ApplicationStateObserver, bundleNameList: Array<string>): number;
253
254  /**
255   * Register app foreground or background state observer.
256   *
257   * @permission ohos.permission.RUNNING_STATE_OBSERVER
258   * @param { 'appForegroundState' } type - app foreground or background state.
259   * @param { AppForegroundStateObserver } observer - The app foreground state observer.
260   * @throws { BusinessError } 201 - Permission denied.
261   * @throws { BusinessError } 202 - Not system application.
262   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
263   * 2. Incorrect parameter types; 3. Parameter verification failed.
264   * @throws { BusinessError } 16000050 - Internal error.
265   * @syscap SystemCapability.Ability.AbilityRuntime.Core
266   * @systemapi
267   * @since 11
268   */
269  function on(type: 'appForegroundState', observer: AppForegroundStateObserver): void;
270
271  /**
272   * Register ability first frame state observe.
273   *
274   * @permission ohos.permission.RUNNING_STATE_OBSERVER
275   * @param { 'abilityFirstFrameState' } type - The ability first frame drawing state.
276   * @param { AbilityFirstFrameStateObserver } observer - The ability first frame state observer.
277   * @param { string } [bundleName] - The target bundle name.
278   * @throws { BusinessError } 201 - Permission denied.
279   * @throws { BusinessError } 202 - Not system application.
280   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
281   * 2. Incorrect parameter types; 3. Parameter verification failed.
282   * @throws { BusinessError } 16000050 - Internal error.
283   * @syscap SystemCapability.Ability.AbilityRuntime.Core
284   * @systemapi
285   * @since 12
286   */
287  function on(type: 'abilityFirstFrameState', observer: AbilityFirstFrameStateObserver, bundleName?: string): void;
288
289  /**
290   * Unregister application state observer.
291   *
292   * @permission ohos.permission.RUNNING_STATE_OBSERVER
293   * @param { 'applicationState' } type - applicationState.
294   * @param { number } observerId - Indicates the number code of the observer.
295   * @param { AsyncCallback<void> } callback - The callback of off.
296   * @throws { BusinessError } 201 - Permission denied.
297   * @throws { BusinessError } 202 - Not system application.
298   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
299   * 2. Incorrect parameter types; 3. Parameter verification failed.
300   * @throws { BusinessError } 16000050 - Internal error.
301   * @syscap SystemCapability.Ability.AbilityRuntime.Core
302   * @systemapi
303   * @since 9
304   */
305  function off(type: 'applicationState', observerId: number, callback: AsyncCallback<void>): void;
306
307  /**
308   * Unregister application state observer.
309   *
310   * @permission ohos.permission.RUNNING_STATE_OBSERVER
311   * @param { 'applicationState' } type - applicationState.
312   * @param { number } observerId - Indicates the number code of the observer.
313   * @returns { Promise<void> } The promise returned by the function.
314   * @throws { BusinessError } 201 - Permission denied.
315   * @throws { BusinessError } 202 - Not system application.
316   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
317   * 2. Incorrect parameter types; 3. Parameter verification failed.
318   * @throws { BusinessError } 16000050 - Internal error.
319   * @syscap SystemCapability.Ability.AbilityRuntime.Core
320   * @systemapi
321   * @since 9
322   */
323  function off(type: 'applicationState', observerId: number): Promise<void>;
324
325  /**
326   * Unregister app foreground or background state observer.
327   *
328   * @permission ohos.permission.RUNNING_STATE_OBSERVER
329   * @param { 'appForegroundState' } type - app foreground or background state.
330   * @param { AppForegroundStateObserver } [observer] - The app foreground state observer.
331   * @throws { BusinessError } 201 - Permission denied.
332   * @throws { BusinessError } 202 - Not system application.
333   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
334   * 2. Incorrect parameter types; 3. Parameter verification failed.
335   * @throws { BusinessError } 16000050 - Internal error.
336   * @syscap SystemCapability.Ability.AbilityRuntime.Core
337   * @systemapi
338   * @since 11
339   */
340  function off(type: 'appForegroundState', observer?: AppForegroundStateObserver): void;
341
342  /**
343   * Unregister ability first frame state observer.
344   *
345   * @permission ohos.permission.RUNNING_STATE_OBSERVER
346   * @param { 'abilityFirstFrameState' } type - The ability first frame drawing state.
347   * @param { AbilityFirstFrameStateObserver } [observer] - The ability first frame state observer.
348   * @throws { BusinessError } 201 - Permission denied.
349   * @throws { BusinessError } 202 - Not system application.
350   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
351   * 2. Incorrect parameter types; 3. Parameter verification failed.
352   * @throws { BusinessError } 16000050 - Internal error.
353   * @syscap SystemCapability.Ability.AbilityRuntime.Core
354   * @systemapi
355   * @since 12
356   */
357  function off(type: 'abilityFirstFrameState', observer?: AbilityFirstFrameStateObserver): void;
358
359  /**
360   * getForegroundApplications.
361   *
362   * @permission ohos.permission.GET_RUNNING_INFO
363   * @param { AsyncCallback<Array<AppStateData>> } callback - The callback is used to return the list of AppStateData.
364   * @throws { BusinessError } 201 - Permission denied.
365   * @throws { BusinessError } 202 - Not system application.
366   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
367   * 2. Incorrect parameter types; 3. Parameter verification failed.
368   * @throws { BusinessError } 16000050 - Internal error.
369   * @syscap SystemCapability.Ability.AbilityRuntime.Core
370   * @systemapi
371   * @since 9
372   */
373  function getForegroundApplications(callback: AsyncCallback<Array<AppStateData>>): void;
374
375  /**
376   * getForegroundApplications.
377   *
378   * @permission ohos.permission.GET_RUNNING_INFO
379   * @returns { Promise<Array<AppStateData>> } Returns the list of AppStateData.
380   * @throws { BusinessError } 201 - Permission denied.
381   * @throws { BusinessError } 202 - Not system application.
382   * @throws { BusinessError } 16000050 - Internal error.
383   * @syscap SystemCapability.Ability.AbilityRuntime.Core
384   * @systemapi
385   * @since 9
386   */
387  function getForegroundApplications(): Promise<Array<AppStateData>>;
388
389  /**
390   * Kill process with account.
391   *
392   * @permission ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS and ohos.permission.CLEAN_BACKGROUND_PROCESSES
393   * @param { string } bundleName - The process bundle name.
394   * @param { number } accountId - The account id.
395   * @returns { Promise<void> } The promise returned by the function.
396   * @throws { BusinessError } 201 - Permission denied.
397   * @throws { BusinessError } 202 - Not system application.
398   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
399   * 2. Incorrect parameter types; 3. Parameter verification failed.
400   * @throws { BusinessError } 16000050 - Internal error.
401   * @syscap SystemCapability.Ability.AbilityRuntime.Core
402   * @systemapi
403   * @since 9
404   */
405  /**
406   * Kill process with account.
407   *
408   * @permission ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS and ohos.permission.KILL_APP_PROCESSES
409   *     or ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS and ohos.permission.CLEAN_BACKGROUND_PROCESSES
410   * @param { string } bundleName - The process bundle name.
411   * @param { number } accountId - The account id.
412   * @returns { Promise<void> } The promise returned by the function.
413   * @throws { BusinessError } 201 - Permission denied.
414   * @throws { BusinessError } 202 - Not system application.
415   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
416   *     2. Incorrect parameter types; 3. Parameter verification failed.
417   * @throws { BusinessError } 16000050 - Internal error.
418   * @syscap SystemCapability.Ability.AbilityRuntime.Core
419   * @systemapi
420   * @since 12
421   */
422  function killProcessWithAccount(bundleName: string, accountId: number): Promise<void>;
423
424  /**
425   * Kill process with account.
426   *
427   * @permission ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS and ohos.permission.CLEAN_BACKGROUND_PROCESSES
428   * @param { string } bundleName - The process bundle name.
429   * @param { number } accountId - The account id.
430   * @param { boolean } clearPageStack - The flag that indicates whether the page stack need to be cleared.
431   * @param { number } [appIndex] - The application index.
432   * @returns { Promise<void> } The promise returned by the function.
433   * @throws { BusinessError } 201 - Permission denied.
434   * @throws { BusinessError } 202 - Not system application.
435   * @throws { BusinessError } 401 - If the input parameter is not valid parameter.
436   * @throws { BusinessError } 16000050 - Internal error.
437   * @syscap SystemCapability.Ability.AbilityRuntime.Core
438   * @systemapi
439   * @since 13
440   */
441  function killProcessWithAccount(bundleName: string, accountId: number, clearPageStack: boolean, appIndex?: number):
442    Promise<void>;
443
444  /**
445   * Kill process with account.
446   *
447   * @permission ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS and ohos.permission.CLEAN_BACKGROUND_PROCESSES
448   * @param { string } bundleName - The process bundle name.
449   * @param { number } accountId - The account id.
450   * @param { AsyncCallback<void> } callback - The callback of killProcessWithAccount.
451   * @throws { BusinessError } 201 - Permission denied.
452   * @throws { BusinessError } 202 - Not system application.
453   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
454   * 2. Incorrect parameter types; 3. Parameter verification failed.
455   * @throws { BusinessError } 16000050 - Internal error.
456   * @syscap SystemCapability.Ability.AbilityRuntime.Core
457   * @systemapi
458   * @since 9
459   */
460  /**
461   * Kill process with account.
462   *
463   * @permission ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS and ohos.permission.KILL_APP_PROCESSES
464   *     or ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS and ohos.permission.CLEAN_BACKGROUND_PROCESSES
465   * @param { string } bundleName - The process bundle name.
466   * @param { number } accountId - The account id.
467   * @param { AsyncCallback<void> } callback - The callback of killProcessWithAccount.
468   * @throws { BusinessError } 201 - Permission denied.
469   * @throws { BusinessError } 202 - Not system application.
470   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
471   *     2. Incorrect parameter types; 3. Parameter verification failed.
472   * @throws { BusinessError } 16000050 - Internal error.
473   * @syscap SystemCapability.Ability.AbilityRuntime.Core
474   * @systemapi
475   * @since 12
476   */
477  function killProcessWithAccount(bundleName: string, accountId: number, callback: AsyncCallback<void>): void;
478
479  /**
480   * Is user running in stability test.
481   *
482   * @param { AsyncCallback<boolean> } callback - The callback is used to return true if user is running stability test.
483   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
484   * 2. Incorrect parameter types; 3. Parameter verification failed.
485   * @throws { BusinessError } 16000050 - Internal error.
486   * @syscap SystemCapability.Ability.AbilityRuntime.Core
487   * @since 9
488   */
489  /**
490   * Is user running in stability test.
491   *
492   * @param { AsyncCallback<boolean> } callback - The callback is used to return true if user is running stability test.
493   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
494   * 2. Incorrect parameter types; 3. Parameter verification failed.
495   * @throws { BusinessError } 16000050 - Internal error.
496   * @syscap SystemCapability.Ability.AbilityRuntime.Core
497   * @atomicservice
498   * @since 11
499   */
500  function isRunningInStabilityTest(callback: AsyncCallback<boolean>): void;
501
502  /**
503   * Is user running in stability test.
504   *
505   * @returns { Promise<boolean> } Returns true if user is running stability test.
506   * @throws { BusinessError } 16000050 - Internal error.
507   * @syscap SystemCapability.Ability.AbilityRuntime.Core
508   * @since 9
509   */
510  /**
511   * Is user running in stability test.
512   *
513   * @returns { Promise<boolean> } Returns true if user is running stability test.
514   * @throws { BusinessError } 16000050 - Internal error.
515   * @syscap SystemCapability.Ability.AbilityRuntime.Core
516   * @atomicservice
517   * @since 11
518   */
519  function isRunningInStabilityTest(): Promise<boolean>;
520
521  /**
522   * Kill processes by bundle name
523   *
524   * @permission ohos.permission.CLEAN_BACKGROUND_PROCESSES
525   * @param { string } bundleName - bundle name.
526   * @returns { Promise<void> } The promise returned by the function.
527   * @throws { BusinessError } 201 - Permission denied.
528   * @throws { BusinessError } 202 - Not system application.
529   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
530   * 2. Incorrect parameter types; 3. Parameter verification failed.
531   * @throws { BusinessError } 16000050 - Internal error.
532   * @syscap SystemCapability.Ability.AbilityRuntime.Core
533   * @systemapi
534   * @since 9
535   */
536  /**
537   * Kill processes by bundle name
538   *
539   * @permission ohos.permission.KILL_APP_PROCESSES or ohos.permission.CLEAN_BACKGROUND_PROCESSES
540   * @param { string } bundleName - bundle name.
541   * @returns { Promise<void> } The promise returned by the function.
542   * @throws { BusinessError } 201 - Permission denied.
543   * @throws { BusinessError } 202 - Not system application.
544   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
545   *     2. Incorrect parameter types; 3. Parameter verification failed.
546   * @throws { BusinessError } 16000050 - Internal error.
547   * @syscap SystemCapability.Ability.AbilityRuntime.Core
548   * @systemapi
549   * @since 12
550   */
551  function killProcessesByBundleName(bundleName: string): Promise<void>;
552
553  /**
554   * Kill processes by bundle name
555   *
556   * @permission ohos.permission.CLEAN_BACKGROUND_PROCESSES
557   * @param { string } bundleName - bundle name.
558   * @param { boolean } clearPageStack - The flag that indicates whether the page stack need to be cleared.
559   * @param { number } [appIndex] - The application index.
560   * @returns { Promise<void> } The promise returned by the function.
561   * @throws { BusinessError } 201 - Permission denied.
562   * @throws { BusinessError } 202 - Not system application.
563   * @throws { BusinessError } 401 - If the input parameter is not valid parameter.
564   * @throws { BusinessError } 16000050 - Internal error.
565   * @syscap SystemCapability.Ability.AbilityRuntime.Core
566   * @systemapi
567   * @since 13
568   */
569  function killProcessesByBundleName(bundleName: string, clearPageStack: boolean, appIndex?: number): Promise<void>;
570
571  /**
572   * Kill processes by bundle name
573   *
574   * @permission ohos.permission.CLEAN_BACKGROUND_PROCESSES
575   * @param { string } bundleName - bundle name.
576   * @param { AsyncCallback<void> } callback - The callback of killProcessesByBundleName.
577   * @throws { BusinessError } 201 - Permission denied.
578   * @throws { BusinessError } 202 - Not system application.
579   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
580   * 2. Incorrect parameter types; 3. Parameter verification failed.
581   * @throws { BusinessError } 16000050 - Internal error.
582   * @syscap SystemCapability.Ability.AbilityRuntime.Core
583   * @systemapi
584   * @since 9
585   */
586  /**
587   * Kill processes by bundle name
588   *
589   * @permission ohos.permission.KILL_APP_PROCESSES or ohos.permission.CLEAN_BACKGROUND_PROCESSES
590   * @param { string } bundleName - bundle name.
591   * @param { AsyncCallback<void> } callback - The callback of killProcessesByBundleName.
592   * @throws { BusinessError } 201 - Permission denied.
593   * @throws { BusinessError } 202 - Not system application.
594   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
595   *     2. Incorrect parameter types; 3. Parameter verification failed.
596   * @throws { BusinessError } 16000050 - Internal error.
597   * @syscap SystemCapability.Ability.AbilityRuntime.Core
598   * @systemapi
599   * @since 12
600   */
601  function killProcessesByBundleName(bundleName: string, callback: AsyncCallback<void>);
602
603  /**
604   * Clear up application data by bundle name
605   *
606   * @permission ohos.permission.CLEAN_APPLICATION_DATA
607   * @param { string } bundleName - bundle name.
608   * @returns { Promise<void> } The promise returned by the function.
609   * @throws { BusinessError } 201 - Permission denied.
610   * @throws { BusinessError } 202 - Not system application.
611   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
612   * 2. Incorrect parameter types; 3. Parameter verification failed.
613   * @throws { BusinessError } 16000050 - Internal error.
614   * @syscap SystemCapability.Ability.AbilityRuntime.Core
615   * @systemapi
616   * @since 9
617   */
618  function clearUpApplicationData(bundleName: string): Promise<void>;
619
620  /**
621   * Clear up application data by bundle name
622   *
623   * @permission ohos.permission.CLEAN_APPLICATION_DATA
624   * @param { string } bundleName - bundle name.
625   * @param { AsyncCallback<void> } callback - The callback of clearUpApplicationData.
626   * @throws { BusinessError } 201 - Permission denied.
627   * @throws { BusinessError } 202 - Not system application.
628   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
629   * 2. Incorrect parameter types; 3. Parameter verification failed.
630   * @throws { BusinessError } 16000050 - Internal error.
631   * @syscap SystemCapability.Ability.AbilityRuntime.Core
632   * @systemapi
633   * @since 9
634   */
635  function clearUpApplicationData(bundleName: string, callback: AsyncCallback<void>);
636
637  /**
638   * Is it a ram-constrained device
639   *
640   * @returns { Promise<boolean> } Returns true if the device is ram-constrained.
641   * @throws { BusinessError } 16000050 - Internal error.
642   * @syscap SystemCapability.Ability.AbilityRuntime.Core
643   * @since 9
644   */
645  /**
646   * Is it a ram-constrained device
647   *
648   * @returns { Promise<boolean> } Returns true if the device is ram-constrained.
649   * @throws { BusinessError } 16000050 - Internal error.
650   * @syscap SystemCapability.Ability.AbilityRuntime.Core
651   * @atomicservice
652   * @since 11
653   */
654  function isRamConstrainedDevice(): Promise<boolean>;
655
656  /**
657   * Is it a ram-constrained device
658   *
659   * @param { AsyncCallback<boolean> } callback - The callback is used to return true if the device is ram-constrained.
660   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
661   * 2. Incorrect parameter types; 3. Parameter verification failed.
662   * @throws { BusinessError } 16000050 - Internal error.
663   * @syscap SystemCapability.Ability.AbilityRuntime.Core
664   * @since 9
665   */
666  /**
667   * Is it a ram-constrained device
668   *
669   * @param { AsyncCallback<boolean> } callback - The callback is used to return true if the device is ram-constrained.
670   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
671   * 2. Incorrect parameter types; 3. Parameter verification failed.
672   * @throws { BusinessError } 16000050 - Internal error.
673   * @syscap SystemCapability.Ability.AbilityRuntime.Core
674   * @atomicservice
675   * @since 11
676   */
677  function isRamConstrainedDevice(callback: AsyncCallback<boolean>): void;
678
679  /**
680   * Get the memory size of the application
681   *
682   * @returns { Promise<number> } Returns the application memory size.
683   * @throws { BusinessError } 16000050 - Internal error.
684   * @syscap SystemCapability.Ability.AbilityRuntime.Core
685   * @since 9
686   */
687  /**
688   * Get the memory size of the application
689   *
690   * @returns { Promise<number> } Returns the application memory size.
691   * @throws { BusinessError } 16000050 - Internal error.
692   * @syscap SystemCapability.Ability.AbilityRuntime.Core
693   * @atomicservice
694   * @since 11
695   */
696  function getAppMemorySize(): Promise<number>;
697
698  /**
699   * Get the memory size of the application
700   *
701   * @param { AsyncCallback<number> } callback - The callback is used to return the application memory size.
702   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
703   * 2. Incorrect parameter types; 3. Parameter verification failed.
704   * @throws { BusinessError } 16000050 - Internal error.
705   * @syscap SystemCapability.Ability.AbilityRuntime.Core
706   * @since 9
707   */
708  /**
709   * Get the memory size of the application
710   *
711   * @param { AsyncCallback<number> } callback - The callback is used to return the application memory size.
712   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
713   * 2. Incorrect parameter types; 3. Parameter verification failed.
714   * @throws { BusinessError } 16000050 - Internal error.
715   * @syscap SystemCapability.Ability.AbilityRuntime.Core
716   * @atomicservice
717   * @since 11
718   */
719  function getAppMemorySize(callback: AsyncCallback<number>): void;
720
721  /**
722   * If you apply for permission, you can obtain information about all running processes.
723   * If you do not apply, you can only obtain information about the current process.
724   *
725   * @permission ohos.permission.GET_RUNNING_INFO
726   * @returns { Promise<Array<ProcessInformation>> } Returns the array of {@link ProcessInformation}.
727   * @throws { BusinessError } 16000050 - Internal error.
728   * @syscap SystemCapability.Ability.AbilityRuntime.Core
729   * @since 9
730   */
731  /**
732   * Get information about the current process.
733   *
734   * @returns { Promise<Array<ProcessInformation>> } Returns the array of {@link ProcessInformation}.
735   * @throws { BusinessError } 16000050 - Internal error.
736   * @syscap SystemCapability.Ability.AbilityRuntime.Core
737   * @atomicservice
738   * @since 11
739   */
740  function getRunningProcessInformation(): Promise<Array<ProcessInformation>>;
741
742  /**
743   * Get running process information by bundle type.
744   *
745   * @permission ohos.permission.GET_RUNNING_INFO
746   * @param { bundleManager.BundleType } bundleType - the bundle type of the process
747   * @returns { Promise<Array<ProcessInformation>> } Returns the array of {@link ProcessInformation}.
748   * @throws { BusinessError } 201 - Permission denied.
749   * @throws { BusinessError } 202 - Not system application.
750   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
751   * 2. Incorrect parameter types; 3. Parameter verification failed.
752   * @throws { BusinessError } 16000050 - Internal error.
753   * @syscap SystemCapability.Ability.AbilityRuntime.Core
754   * @systemapi
755   * @since 12
756   */
757  function getRunningProcessInformationByBundleType(
758    bundleType: bundleManager.BundleType): Promise<Array<ProcessInformation>>;
759
760  /**
761   * If you apply for permission, you can obtain information about all running processes.
762   * If you do not apply, you can only obtain information about the current process.
763   *
764   * @permission ohos.permission.GET_RUNNING_INFO
765   * @param { AsyncCallback<Array<ProcessInformation>> } callback - The callback is used to return the array of {@link ProcessInformation}.
766   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
767   * 2. Incorrect parameter types; 3. Parameter verification failed.
768   * @throws { BusinessError } 16000050 - Internal error.
769   * @syscap SystemCapability.Ability.AbilityRuntime.Core
770   * @since 9
771   */
772  /**
773   * Get information about the current process.
774   *
775   * @param { AsyncCallback<Array<ProcessInformation>> } callback - The callback is used to return the array of {@link ProcessInformation}.
776   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
777   * 2. Incorrect parameter types; 3. Parameter verification failed.
778   * @throws { BusinessError } 16000050 - Internal error.
779   * @syscap SystemCapability.Ability.AbilityRuntime.Core
780   * @atomicservice
781   * @since 11
782   */
783  function getRunningProcessInformation(callback: AsyncCallback<Array<ProcessInformation>>): void;
784
785  /**
786   * Check whether the shared bundle is running.
787   *
788   * @permission ohos.permission.GET_RUNNING_INFO
789   * @param { string } bundleName - Indicates the bundle name of the shared bundle.
790   * @param { number } versionCode - Indicates the version code of the shared bundle.
791   * @returns { Promise<boolean> } Returns the shared bundle running result. The result is true if running, false otherwise.
792   * @throws { BusinessError } 201 - Permission denied.
793   * @throws { BusinessError } 202 - Not system application.
794   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
795   * 2. Incorrect parameter types; 3. Parameter verification failed.
796   * @throws { BusinessError } 16000050 - Internal error.
797   * @syscap SystemCapability.Ability.AbilityRuntime.Core
798   * @systemapi
799   * @since 10
800   */
801  function isSharedBundleRunning(bundleName: string, versionCode: number): Promise<boolean>;
802
803  /**
804   * Check whether the shared bundle is running.
805   *
806   * @permission ohos.permission.GET_RUNNING_INFO
807   * @param { string } bundleName - Indicates the bundle name of the shared bundle.
808   * @param { number } versionCode - Indicates the version code of the shared bundle.
809   * @param { AsyncCallback<boolean> } callback - The callback of checking the shared bundle running result.
810   *                                              The result is true if running, false otherwise.
811   * @throws { BusinessError } 201 - Permission denied.
812   * @throws { BusinessError } 202 - Not system application.
813   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
814   * 2. Incorrect parameter types; 3. Parameter verification failed.
815   * @throws { BusinessError } 16000050 - Internal error.
816   * @syscap SystemCapability.Ability.AbilityRuntime.Core
817   * @systemapi
818   * @since 10
819   */
820  function isSharedBundleRunning(bundleName: string, versionCode: number, callback: AsyncCallback<boolean>): void;
821
822  /**
823   * Obtains memory usage of one process by its pid.
824   *
825   * @param { number } pid - Indicates the pid of the process.
826   * @returns { Promise<number> } Returns the memory usage of the process in KB.
827   * @throws { BusinessError } 202 - Permission denied, non-system app called system api.
828   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
829   * 2. Incorrect parameter types; 3. Parameter verification failed.
830   * @throws { BusinessError } 16000050 - Internal error.
831   * @syscap SystemCapability.Ability.AbilityRuntime.Core
832   * @systemapi
833   * @since 10
834   */
835  function getProcessMemoryByPid(pid: number): Promise<number>;
836
837  /**
838   * Obtains memory usage of one process by its pid.
839   *
840   * @param { number } pid - Indicates the pid of the process.
841   * @param { AsyncCallback<number> } callback - Indicates the callback of getting process memory by pid result.
842   * @throws { BusinessError } 202 - Permission denied, non-system app called system api.
843   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
844   * 2. Incorrect parameter types; 3. Parameter verification failed.
845   * @throws { BusinessError } 16000050 - Internal error.
846   * @syscap SystemCapability.Ability.AbilityRuntime.Core
847   * @systemapi
848   * @since 10
849   */
850  function getProcessMemoryByPid(pid: number, callback: AsyncCallback<number>): void;
851
852  /**
853   * Obtains the process information list of running processes that belong to a specific bundle of current user.
854   *
855   * @param { string } bundleName - Indicates the bundle name of the application to which the processes belong to.
856   * @param { AsyncCallback<Array<ProcessInformation>> } callback - Indicates the callback of getting process information by bundleName result.
857   * @throws { BusinessError } 202 - Permission denied, non-system app called system api.
858   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
859   * 2. Incorrect parameter types; 3. Parameter verification failed.
860   * @throws { BusinessError } 16000050 - Internal error.
861   * @syscap SystemCapability.Ability.AbilityRuntime.Core
862   * @systemapi
863   * @since 10
864   */
865  function getRunningProcessInfoByBundleName(bundleName: string, callback: AsyncCallback<Array<ProcessInformation>>): void;
866
867  /**
868   * Obtains the process information list of running processes that belong to a specific bundle and specific user ID.
869   *
870   * @param { string } bundleName - Indicates the bundle name of the application to which the processes belong to.
871   * @param { number } userId - Indicates the user ID of the application to which the processes belong to.
872   * @param { AsyncCallback<Array<ProcessInformation>> } callback - Indicates the callback of getting process information by bundleName result.
873   * @throws { BusinessError } 202 - Permission denied, non-system app called system api.
874   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
875   * 2. Incorrect parameter types; 3. Parameter verification failed.
876   * @throws { BusinessError } 16000050 - Internal error.
877   * @syscap SystemCapability.Ability.AbilityRuntime.Core
878   * @systemapi
879   * @since 10
880   */
881  function getRunningProcessInfoByBundleName(bundleName: string, userId: number, callback: AsyncCallback<Array<ProcessInformation>>): void;
882
883  /**
884   * Obtains the process information list of running processes that belong to a specific bundle of current user.
885   *
886   * @param { string } bundleName - Indicates the bundle name of the application to which the processes belong to.
887   * @returns { Promise<Array<ProcessInformation>> } Returns a list of process information.
888   * @throws { BusinessError } 202 - Permission denied, non-system app called system api.
889   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
890   * 2. Incorrect parameter types; 3. Parameter verification failed.
891   * @throws { BusinessError } 16000050 - Internal error.
892   * @syscap SystemCapability.Ability.AbilityRuntime.Core
893   * @systemapi
894   * @since 10
895   */
896  function getRunningProcessInfoByBundleName(bundleName: string): Promise<Array<ProcessInformation>>;
897
898  /**
899   * Obtains the process information list of running processes that belong to a specific bundle and specific user ID.
900   *
901   * @param { string } bundleName - Indicates the bundle name of the application to which the processes belong to.
902   * @param { number } userId - Indicates the user ID of the application to which the processes belong to.
903   * @returns { Promise<Array<ProcessInformation>> } Returns a list of process information.
904   * @throws { BusinessError } 202 - Permission denied, non-system app called system api.
905   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
906   * 2. Incorrect parameter types; 3. Parameter verification failed.
907   * @throws { BusinessError } 16000050 - Internal error.
908   * @syscap SystemCapability.Ability.AbilityRuntime.Core
909   * @systemapi
910   * @since 10
911   */
912  function getRunningProcessInfoByBundleName(bundleName: string, userId: number): Promise<Array<ProcessInformation>>;
913
914  /**
915   * Check whether the bundle is running.
916   *
917   * @permission ohos.permission.GET_RUNNING_INFO
918   * @param { string } bundleName - Indicates the bundle name of the bundle.
919   * @returns { Promise<boolean> } Returns the bundle running result. The result is true if running, false otherwise.
920   * @throws { BusinessError } 201 - Permission denied.
921   * @throws { BusinessError } 202 - Not system application.
922   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
923   * 2. Incorrect parameter types; 3. Parameter verification failed.
924   * @throws { BusinessError } 16000050 - Internal error.
925   * @syscap SystemCapability.Ability.AbilityRuntime.Core
926   * @systemapi
927   * @since 11
928   */
929  function isApplicationRunning(bundleName: string): Promise<boolean>;
930
931  /**
932   * Check whether the bundle is running.
933   *
934   * @permission ohos.permission.GET_RUNNING_INFO
935   * @param { string } bundleName - Indicates the bundle name of the bundle.
936   * @param { AsyncCallback<boolean> } callback - The callback of checking the bundle running result.
937   *                                              The result is true if running, false otherwise.
938   * @throws { BusinessError } 201 - Permission denied.
939   * @throws { BusinessError } 202 - Not system application.
940   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
941   * 2. Incorrect parameter types; 3. Parameter verification failed.
942   * @throws { BusinessError } 16000050 - Internal error.
943   * @syscap SystemCapability.Ability.AbilityRuntime.Core
944   * @systemapi
945   * @since 11
946   */
947  function isApplicationRunning(bundleName: string, callback: AsyncCallback<boolean>): void;
948
949  /**
950   * Preload the target application, create process and initialize resources.
951   *
952   * @permission ohos.permission.PRELOAD_APPLICATION
953   * @param { string } bundleName - The bundle name of the application to preload.
954   * @param { number } userId - Indicates the user identification.
955   * @param { PreloadMode } mode - Preload application mode.
956   * @param { number } [appIndex] - The index of application clone.
957   * @returns { Promise<void> } Returns the result of preloadApplication.
958   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
959   * @throws { BusinessError } 202 - Not system application.
960   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
961   * 2. Incorrect parameter types; 3. Parameter verification failed.
962   * @throws { BusinessError } 16000050 - Internal error.
963   * @throws { BusinessError } 16300005 - The target bundle does not exist.
964   * @syscap SystemCapability.Ability.AbilityRuntime.Core
965   * @systemapi
966   * @stagemodelonly
967   * @since 12
968   */
969  function preloadApplication(bundleName: string, userId: number, mode: PreloadMode, appIndex?: number): Promise<void>;
970
971  /**
972   * Get all running multi app info by bundleName
973   *
974   * @permission ohos.permission.GET_RUNNING_INFO
975   * @param { string } bundleName - The bundle name of the application to query.
976   * @returns { Promise<RunningMultiAppInfo> } Returns the {@link RunningMultiAppInfo} for given bundle.
977   * @throws { BusinessError } 201 - Permission denied.
978   * @throws { BusinessError } 202 - Not system application.
979   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
980   * 2. Incorrect parameter types; 3. Parameter verification failed.
981   * @throws { BusinessError } 16000072 - App clone or multi-instance is not supported.
982   * @throws { BusinessError } 18500001 - The bundle does not exist or no patch has been applied.
983   * @syscap SystemCapability.Ability.AbilityRuntime.Core
984   * @systemapi
985   * @stagemodelonly
986   * @since 12
987   */
988  function getRunningMultiAppInfo(bundleName: string): Promise<RunningMultiAppInfo>;
989
990  /**
991  * Check whether the bundle is running.
992  *
993  * @permission ohos.permission.GET_RUNNING_INFO
994  * @param { string } bundleName - Indicates the bundle name of the bundle.
995  * @param { number } [appCloneIndex] - app clone index
996  * @returns { Promise<boolean> } Returns the bundle running result. The result is true if running, false otherwise.
997  * @throws { BusinessError } 201 - Permission denied.
998  * @throws { BusinessError } 202 - Not system application.
999  * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
1000  * 2. Incorrect parameter types; 3. Parameter verification failed.
1001  * @throws { BusinessError } 16000050 - Internal error.
1002  * @throws { BusinessError } 16000073 - The app clone index is invalid.
1003  * @syscap SystemCapability.Ability.AbilityRuntime.Core
1004  * @systemapi
1005  * @since 12
1006  */
1007  function isAppRunning(bundleName: string, appCloneIndex?: number): Promise<boolean>;
1008
1009  /**
1010   * Clear up application data by bundle name
1011   *
1012   * @permission ohos.permission.CLEAN_APPLICATION_DATA
1013   * @param { string } bundleName - bundle name.
1014   * @param { number } [appCloneIndex] - app clone index
1015   * @returns { Promise<void> } The promise returned by the function.
1016   * @throws { BusinessError } 201 - Permission denied.
1017   * @throws { BusinessError } 202 - Not system application.
1018   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
1019   *    2. Incorrect parameter types; 3. Parameter verification failed.
1020   * @throws { BusinessError } 16000050 - Internal error.
1021   * @throws { BusinessError } 16000073 - The app clone index is invalid.
1022   * @syscap SystemCapability.Ability.AbilityRuntime.Core
1023   * @systemapi
1024   * @since 13
1025   */
1026  function clearUpAppData(bundleName: string, appCloneIndex?: number): Promise<void>;
1027
1028  /**
1029   * Terminate the mission of a UIAbility and back to caller.
1030   *
1031   * @permission ohos.permission.KILL_APP_PROCESSES
1032   * @param { number } missionId - The mission id of the UIAbility need to be terminated.
1033   * @returns { Promise<void> } Returns the result of terminateMission.
1034   * @throws { BusinessError } 201 - Permission denied.
1035   * @throws { BusinessError } 202 - Not system application.
1036   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
1037   *     2. Incorrect parameter types; 3. Parameter verification failed.
1038   * @throws { BusinessError } 16000050 - Internal error.
1039   * @syscap SystemCapability.Ability.AbilityRuntime.Core
1040   * @systemapi
1041   * @since 13
1042   */
1043  function terminateMission(missionId: number): Promise<void>;
1044
1045  /**
1046   * Get pids of processes which belong to specific bundle name and support process cache feature.
1047   *
1048   * @permission ohos.permission.GET_RUNNING_INFO
1049   * @param { string } bundleName - bundle name.
1050   * @returns { Promise<Array<number>> } Returns the list of pid.
1051   * @throws { BusinessError } 201 - Permission denied.
1052   * @throws { BusinessError } 202 - Not system application.
1053   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
1054   * 2. Incorrect parameter types; 3. Parameter verification failed.
1055   * @throws { BusinessError } 801 - Capability not supported.
1056   * @throws { BusinessError } 16000050 - Internal error.
1057   * @syscap SystemCapability.Ability.AbilityRuntime.Core
1058   * @systemapi
1059   * @stagemodelonly
1060   * @since 13
1061   */
1062  function getSupportedProcessCachePids(bundleName : string): Promise<Array<number>>;
1063
1064  /**
1065   * The ability or extension state data.
1066   *
1067   * @typedef { _AbilityStateData.default }
1068   * @syscap SystemCapability.Ability.AbilityRuntime.Core
1069   * @systemapi
1070   * @since 9
1071   */
1072  export type AbilityStateData = _AbilityStateData.default;
1073
1074  /**
1075   * The application state data.
1076   *
1077   * @typedef { _AppStateData.default }
1078   * @syscap SystemCapability.Ability.AbilityRuntime.Core
1079   * @systemapi
1080   * @since 9
1081   */
1082  export type AppStateData = _AppStateData.default;
1083
1084  /**
1085   * The application state observer.
1086   *
1087   * @typedef { _ApplicationStateObserver.default }
1088   * @syscap SystemCapability.Ability.AbilityRuntime.Core
1089   * @systemapi
1090   * @since 9
1091   */
1092  export type ApplicationStateObserver = _ApplicationStateObserver.default;
1093
1094  /**
1095   * The application foreground state observer.
1096   *
1097   * @typedef { _AppForegroundStateObserver.default }
1098   * @syscap SystemCapability.Ability.AbilityRuntime.Core
1099   * @systemapi
1100   * @since 11
1101   */
1102  export type AppForegroundStateObserver = _AppForegroundStateObserver.default;
1103
1104  /**
1105   * The class of a process information.
1106   *
1107   * @syscap SystemCapability.Ability.AbilityRuntime.Core
1108   * @since 9
1109   */
1110  /**
1111   * The class of a process information.
1112   *
1113   * @typedef { _ProcessInformation }
1114   * @syscap SystemCapability.Ability.AbilityRuntime.Core
1115   * @atomicservice
1116   * @since 11
1117   */
1118  export type ProcessInformation = _ProcessInformation;
1119
1120  /**
1121   * The class of a process information.
1122   *
1123   * @typedef { _ProcessData.default }
1124   * @syscap SystemCapability.Ability.AbilityRuntime.Core
1125   * @systemapi
1126   * @since 10
1127   */
1128  export type ProcessData = _ProcessData.default;
1129
1130  /**
1131   * The ability first frame state observer.
1132   *
1133   * @typedef { _AbilityFirstFrameStateObserver.default }
1134   * @syscap SystemCapability.Ability.AbilityRuntime.Core
1135   * @systemapi
1136   * @since 12
1137   */
1138  export type AbilityFirstFrameStateObserver = _AbilityFirstFrameStateObserver.default;
1139
1140  /**
1141   * The class of an ability first frame state data.
1142   *
1143   * @typedef { _AbilityFirstFrameStateData.default }
1144   * @syscap SystemCapability.Ability.AbilityRuntime.Core
1145   * @systemapi
1146   * @since 12
1147   */
1148  export type AbilityFirstFrameStateData = _AbilityFirstFrameStateData.default;
1149
1150  /**
1151   * The class of running multi app information.
1152   *
1153   * @typedef { _RunningMultiAppInfo }
1154   * @syscap SystemCapability.Ability.AbilityRuntime.Core
1155   * @systemapi
1156   * @since 12
1157   */
1158  export type RunningMultiAppInfo = _RunningMultiAppInfo;
1159}
1160
1161export default appManager;
1162