Package 

Interface StreamLifecycleListener


  • 
    public interface StreamLifecycleListener
    
                        

    Callbacks mirroring host lifecycle events emitted by StreamLifecycleMonitor.

    Implementers typically register via StreamLifecycleMonitor.subscribe(listener) and override the relevant callbacks to react to lifecycle transitions.

    • Method Summary

      Modifier and Type Method Description
      Unit onForeground() Called when the app moves to the foreground.
      Unit onBackground() Called when the app moves to the background.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • onForeground

         Unit onForeground()

        Called when the app moves to the foreground.

        override fun onForeground() {
            logger.i { "App moved to foreground" }
        }
      • onBackground

         Unit onBackground()

        Called when the app moves to the background.

        override fun onBackground() {
            logger.i { "App moved to background" }
        }