🪐 Ceres is a comprehensive Android development framework designed to streamline your app development process. Powered by the latest technologies like Jetpack Compose, Hilt, Coroutines, and Flow, Ceres empowers developers to build modern and efficient Android applications.
This PR introduces a set of utility functions to observe the lifecycles of Activity, Application, and Composable components in a Jetpack Compose application. These utilities enable developers to execute custom actions when these components enter or exit the foreground.
The following functions have been added:
ObserveActivityLifecycle: Observes the lifecycle of the current Activity, allowing actions to be performed when it enters or exits the foreground.
ObserveApplicationLifecycle: Observes the lifecycle of the Application, enabling actions to be taken when it enters or exits the foreground.
ObserveComposableLifecycle: Observes the lifecycle of the current Composable, allowing actions to be performed when it enters or exits the foreground.
Additionally, a generic OnLifecycleEvent composable function has been introduced for observing the lifecycle of any LifecycleOwner and executing custom actions upon lifecycle events.
These utilities provide a convenient way to manage lifecycle-related behavior in Jetpack Compose applications.
This PR introduces a set of utility functions to observe the lifecycles of Activity, Application, and Composable components in a Jetpack Compose application. These utilities enable developers to execute custom actions when these components enter or exit the foreground.
The following functions have been added:
ObserveActivityLifecycle
: Observes the lifecycle of the current Activity, allowing actions to be performed when it enters or exits the foreground.ObserveApplicationLifecycle
: Observes the lifecycle of the Application, enabling actions to be taken when it enters or exits the foreground.ObserveComposableLifecycle
: Observes the lifecycle of the current Composable, allowing actions to be performed when it enters or exits the foreground.Additionally, a generic
OnLifecycleEvent
composable function has been introduced for observing the lifecycle of anyLifecycleOwner
and executing custom actions upon lifecycle events.These utilities provide a convenient way to manage lifecycle-related behavior in Jetpack Compose applications.