This is a very promising library. So far, I haven't been able to figure out how to use it for my Kotlin Multiplatform project.
My only real requirement is to run a OnResume function to update my main activity, when it is brought back into focus from background.
I am not clear where to instantiate the functions:
val lifecycleRegistry = LifecycleRegistry()
val someLogic = SomeLogic(lifecycleRegistry)
Do I need to call lifecycleRegistry.subscribe() from the Composable of the activity in question?
What I'm currently doing in my main module is define the SomeLogic class:
This is a very promising library. So far, I haven't been able to figure out how to use it for my Kotlin Multiplatform project. My only real requirement is to run a OnResume function to update my main activity, when it is brought back into focus from background.
I am not clear where to instantiate the functions:
Do I need to call
lifecycleRegistry.subscribe()
from the Composable of the activity in question?What I'm currently doing in my main module is define the SomeLogic class:
then instantiate the members in the Composable of the main activity: The OnResume function is however never called.
The OnResume function is however never called. Any advice or reference to sample projects would be highly appreciated.