1/* 2 * Copyright (c) 2023 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 */ 36export default class ApplicationStateChangeCallback { 37 /** 38 * Called back when the state of the application changes to foreground. 39 * 40 * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore 41 * @StageModelOnly 42 * @since 10 43 */ 44 /** 45 * Called back when the state of the application changes to foreground. 46 * 47 * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore 48 * @StageModelOnly 49 * @atomicservice 50 * @since 11 51 */ 52 onApplicationForeground(): void; 53 54 /** 55 * Called back when the state of the application changes to background. 56 * 57 * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore 58 * @StageModelOnly 59 * @since 10 60 */ 61 /** 62 * Called back when the state of the application changes to background. 63 * 64 * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore 65 * @StageModelOnly 66 * @atomicservice 67 * @since 11 68 */ 69 onApplicationBackground(): void; 70} 71