Class NetworkTypePlatform
java.lang.Object
com.codename1.io.NetworkTypePlatform
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintOne of theNetworkManager.NETWORK_TYPE_*constants.voidinstall(NetworkManager target) Subscribe to platform network transitions.voiduninstall(NetworkManager target) Tear down the watcher installed byinstall.
-
Constructor Details
-
NetworkTypePlatform
public NetworkTypePlatform()
-
-
Method Details
-
getCurrentNetworkType
public int getCurrentNetworkType()One of theNetworkManager.NETWORK_TYPE_*constants. Default returnsNETWORK_TYPE_OTHERwhen an access point is configured so stub platforms still indicate "some connectivity present". -
install
Subscribe to platform network transitions. The platform must calltarget.fireNetworkTypeChange(newType, vpnActive)whenever the active network changes. Default is a no-op for platforms that can't observe transitions. -
uninstall
Tear down the watcher installed byinstall. Default no-op.
-