public interface AbilityLifecycleCallbacks
SystemCapability.Aafwk#ABILITY| 限定符和类型 | 方法 | 说明 |
|---|---|---|
void |
onAbilityActive(Ability ability) |
Called when the given ability calls
Ability#onActive(). |
void |
onAbilityBackground(Ability ability) |
Called when the given ability calls
Ability#onBackground(). |
void |
onAbilityForeground(Ability ability) |
Called when the given ability calls
Ability#onForeground. |
void |
onAbilityInactive(Ability ability) |
Called when the given ability calls
Ability#onInactive(). |
void |
onAbilitySaveState(PacMap outState) |
Called when an ability calls
Ability#onSaveAbilityState(PacMap). |
void |
onAbilityStart(Ability ability) |
Called when the given ability calls
Ability#onStart. |
void |
onAbilityStop(Ability ability) |
Called when the given ability calls
Ability#onStop(). |
void onAbilityStart(Ability ability)
Ability#onStart.
You can implement your own logic in this method.ability - Indicates the Ability object that calls the onStart() method.void onAbilityActive(Ability ability)
Ability#onActive().
You can implement your own logic in this method.ability - Indicates the Ability object that calls the onActive() method.void onAbilityInactive(Ability ability)
Ability#onInactive().
You can implement your own logic in this method.ability - Indicates the Ability object that calls the onInactive() method.void onAbilityForeground(Ability ability)
Ability#onForeground.
You can implement your own logic in this method.ability - Indicates the Ability object that calls the onForeground() method.void onAbilityBackground(Ability ability)
Ability#onBackground().
You can implement your own logic in this method.ability - Indicates the Ability object that calls the onBackground() method.void onAbilityStop(Ability ability)
Ability#onStop().
You can implement your own logic in this method.ability - Indicates the Ability object that calls the onStop() method.void onAbilitySaveState(PacMap outState)
Ability#onSaveAbilityState(PacMap).
You can implement your own logic in this method.outState - Indicates the PacMap object passed to
the onSaveAbilityState() callback.