isForeground

val isForeground: StateFlow<Boolean>(source)

true while the host app is foregrounded / visible. Observers should pause discretionary work whenever this flips to false.