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]
09/28/2020, 12:22 PM
Nothing, at least right now. You'd still need to use the regular activity hooks for that stuff.
09/28/2020, 1:50 PM
there is a
that you can use
09/28/2020, 4:24 PM
What are you trying to do?
09/29/2020, 1:02 PM
@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.