Package 

Interface NetworkStateProvider.NetworkStateListener


  • 
    public interface NetworkStateProvider.NetworkStateListener
    
                        

    Listener interface for network state changes.

    Implementations of this interface will be notified when the device's network connectivity state changes between connected and disconnected states.

    • Method Summary

      Modifier and Type Method Description
      abstract Unit onConnected() Called when the device becomes connected to a network with internet access.
      abstract Unit onDisconnected() Called when the device becomes disconnected from the network.
      • Methods inherited from class java.lang.Object

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

      • onConnected

         abstract Unit onConnected()

        Called when the device becomes connected to a network with internet access.

        This method is invoked when the device transitions from a disconnected state to a connected state, or when network capabilities change to indicate internet access is now available.

      • onDisconnected

         abstract Unit onDisconnected()

        Called when the device becomes disconnected from the network.

        This method is invoked when the device loses network connectivity or when the network no longer has internet access capabilities.