Package 

Interface NetworkStateListener


  • 
    public interface NetworkStateListener
    
                        

    Callback for network connectivity state changes. Implementations must be lightweight — heavy work should be offloaded to a background executor.

    • Method Summary

      Modifier and Type Method Description
      abstract Unit onNetworkStateChanged(Boolean isOnline) Invoked when connectivity state transitions between online and offline.
      • Methods inherited from class java.lang.Object

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

      • onNetworkStateChanged

         abstract Unit onNetworkStateChanged(Boolean isOnline)

        Invoked when connectivity state transitions between online and offline. Guaranteed to fire only on actual state changes (consecutive duplicates are suppressed). May be called on any thread (system connectivity thread or main thread depending on API level).