Thread
#compose
    j

    Julius Marozas

    1 year ago
    Hi, how can I observe when the application is in background? What's the alternative to onStart/onStop lifecycle methods in Compose?
    Zach Klippenstein (he/him) [MOD]

    Zach Klippenstein (he/him) [MOD]

    1 year ago
    Nothing, at least right now. You'd still need to use the regular activity hooks for that stuff.
    flosch

    flosch

    1 year ago
    there is a
    LifecycleOwnerAmbient
    that you can use
    i

    Ian Lake

    1 year ago
    What are you trying to do?
    j

    Julius Marozas

    1 year ago
    @flosch thanks, that's what I was looking for. @Ian Lake I have a composable that displays a real-time graph and it is quite battery intensive. So I was thinking that I could unmount the graph composable or just pause the graph temporarily when the app is in background.