void connectToSavedNetwork(string, bool, bool)

Attempts a connection to a specific WiFi network that has been saved on the system.

Parameters

Name Description
ssid string
The SSID of the network to connect to.
isPrivate bool
True if the network requires authentication, false otherwise.
isEnterprise (Optional) bool
True if the network is an enterprise network, false otherwise.

Remarks

When a connection attempt succeeds, the onNetworkStatusChange callback will fire.

If a network with this SSID is saved, it will connect with saved credentials. If not, it will prompt for a password if private or connect if the network is public.

This function will use saved credentials; if that is not desired, use connectToNetwork() instead.

Return

Returns nothing.

Examples


KioWareUtils.connectToSavedNetwork('MyNetwork', true);
function onNetworkStatusChange (noConnectivity, failover, type, reason) {
   if (type == 1) {
       if (noConnectivity) 
           alert('Disconnected from wifi!');
       else
           alert('Successfully connected to ' + KioWareUtils.getCurrentNetwork());
   }         
}
    

Requirements

KioWare for Android version 3.14 or greater.