1/* 2 * Copyright (c) 2023-2025 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 21/** 22 * The application state change callback. 23 * 24 * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore 25 * @StageModelOnly 26 * @since 10 27 */ 28/** 29 * The application state change callback. 30 * 31 * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore 32 * @StageModelOnly 33 * @atomicservice 34 * @since 11 35 */ 36/** 37 * The application state change callback. 38 * 39 * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore 40 * @StageModelOnly 41 * @crossplatform 42 * @atomicservice 43 * @since 18 44 */ 45export default class ApplicationStateChangeCallback { 46 /** 47 * Called back when the state of the application changes to foreground. 48 * 49 * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore 50 * @StageModelOnly 51 * @since 10 52 */ 53 /** 54 * Called back when the state of the application changes to foreground. 55 * 56 * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore 57 * @StageModelOnly 58 * @atomicservice 59 * @since 11 60 */ 61 /** 62 * Called back when the state of the application changes to foreground. 63 * 64 * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore 65 * @StageModelOnly 66 * @crossplatform 67 * @atomicservice 68 * @since 18 69 */ 70 onApplicationForeground(): void; 71 72 /** 73 * Called back when the state of the application changes to background. 74 * 75 * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore 76 * @StageModelOnly 77 * @since 10 78 */ 79 /** 80 * Called back when the state of the application changes to background. 81 * 82 * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore 83 * @StageModelOnly 84 * @atomicservice 85 * @since 11 86 */ 87 /** 88 * Called back when the state of the application changes to background. 89 * 90 * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore 91 * @StageModelOnly 92 * @crossplatform 93 * @atomicservice 94 * @since 18 95 */ 96 onApplicationBackground(): void; 97} 98