Class NetworkTypePlatform

java.lang.Object
com.codename1.io.NetworkTypePlatform

public class NetworkTypePlatform extends Object

Platform-supplied implementation of the network-type tracking API. NetworkManager.getCurrentNetworkType(), NetworkManager.addNetworkTypeListener(...) and the matching remover all dispatch through this.

Part of the framework's service-provider interface, not intended for application use.

  • Constructor Details

    • NetworkTypePlatform

      public NetworkTypePlatform()
  • Method Details

    • getCurrentNetworkType

      public int getCurrentNetworkType()
      One of the NetworkManager.NETWORK_TYPE_* constants. Default returns NETWORK_TYPE_OTHER when an access point is configured so stub platforms still indicate "some connectivity present".
    • install

      public void install(NetworkManager target)
      Subscribe to platform network transitions. The platform must call target.fireNetworkTypeChange(newType, vpnActive) whenever the active network changes. Default is a no-op for platforms that can't observe transitions.
    • uninstall

      public void uninstall(NetworkManager target)
      Tear down the watcher installed by install. Default no-op.