Closed himanshumistri closed 3 months ago
It would be nice if you could provide a complete reproducer, as the provided code is incomplete.
Here you go with my native main activity code of android : https://github.com/himanshumistri/KMPStarterKit/blob/main/androidApp/src/main/java/com/bumble/starter/MainActivity.kt
Here is my Compose Multiplatform Code where I need lifecycle event callback.
I am not getting any event in ChildNode1
I think your implementation has multiple issues. Here are some of them.
Lifecycle
, but the registered callbacks are never called.AbcAppLifeCycle
gets somehow connected with the LifecycleRegistry
defined in MainActivity
.MainActivity
you are calling essentyLifecycle()
but you are not using the returned Lifecycle
. You could just use that instead of LifecycleRegistry
.Since you are using Appyx, I suggest reaching out to the developers and asking for help with lifecycle handling. Maybe there is an out-of-the box way. Or just use Decompose for navigation.
Closing this for now. Feel free to reopen if there are any questions or issues related to the Essenty library.
In Common code of Compose Multiplatform,
I have the below code.
I does not trigger, I am testing it with Android for now, May be I am missing something...
I am also try below as well
private var mlifecycle :LifecycleRegistry = LifecycleRegistry(initialState = Lifecycle.State.INITIALIZED)
In my Android Native activity.