public class

WifiManager

extends Object
java.lang.Object
   ↳ com.datalogic.device.wifi.WifiManager

Class Overview

The WifiManager class enables the user to control the Wi-Fi adapter behaviour. It also permits the manipulation of arbitrary Wi-Fi profiles.

Summary

Nested Classes
enum WifiManager.SleepPolicy The policy for deciding when Wi-Fi should go to sleep (which will in turn switch to using the mobile data as an Internet connection). 
Public Constructors
WifiManager()
This is the constructor of the WifiManager class.
Public Methods
boolean getAlwaysRequested()
Returns whether the Wi-Fi data connection should remain active even when higher priority networks like Ethernet are active, to keep both networks.
boolean getNotifyAvailableNetworks()
Gets whether to notify the user of open networks or not.
WifiManager.SleepPolicy getSleepPolicy()
Gets the current policy for deciding when Wi-Fi should go to sleep (which will in turn switch to using the mobile data as an Internet connection).
WifiProfile.Builder profileBuilder(String essid)
Returns builder-pattern instance to be used to configure a Wi-Fi profile.
void setAlwaysRequested(boolean alwaysRequested)
Sets whether the Wi-Fi data connection should remain active even when higher priority networks like Ethernet are active, to keep both networks.
void setNotifyAvailableNetworks(boolean notifyAvailableNetworks)
Sets whether to notify the user of open networks or not.
void setSleepPolicy(WifiManager.SleepPolicy sleepPolicy)
Sets the current policy for deciding when Wi-Fi should go to sleep (which will in turn switch to using the mobile data as an Internet connection).
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public WifiManager ()

Added in revision 32

This is the constructor of the WifiManager class.

Throws
in case of error.

Public Methods

public boolean getAlwaysRequested ()

Added in revision 32

Returns whether the Wi-Fi data connection should remain active even when higher priority networks like Ethernet are active, to keep both networks. In the case where higher priority networks are connected, Wi-Fi will be unused unless an application explicitly requests to use it.

Returns
  • a boolean value indicating if the Wi-Fi data connection should remain active.

public boolean getNotifyAvailableNetworks ()

Added in revision 32

Gets whether to notify the user of open networks or not.

Returns
  • a boolean value indicating if open networks are notified to the user or not.

public WifiManager.SleepPolicy getSleepPolicy ()

Added in revision 32

Gets the current policy for deciding when Wi-Fi should go to sleep (which will in turn switch to using the mobile data as an Internet connection).

Returns

public WifiProfile.Builder profileBuilder (String essid)

Added in revision 32

Returns builder-pattern instance to be used to configure a Wi-Fi profile.

Parameters
essid ESSID of the network to which the profile will be bound. This is the only mandatory field for a profile (e.g. in the case the profile is only used to check for existence).
Returns

public void setAlwaysRequested (boolean alwaysRequested)

Added in revision 32

Sets whether the Wi-Fi data connection should remain active even when higher priority networks like Ethernet are active, to keep both networks. In the case where higher priority networks are connected, Wi-Fi will be unused unless an application explicitly requests to use it.

Parameters
alwaysRequested a boolean value indicating if the Wi-Fi data connection should remain active.

public void setNotifyAvailableNetworks (boolean notifyAvailableNetworks)

Added in revision 32

Sets whether to notify the user of open networks or not.

Parameters
notifyAvailableNetworks a boolean value indicating if open networks are notified to the user or not.

public void setSleepPolicy (WifiManager.SleepPolicy sleepPolicy)

Added in revision 32

Sets the current policy for deciding when Wi-Fi should go to sleep (which will in turn switch to using the mobile data as an Internet connection).

Parameters
sleepPolicy the WifiManager.SleepPolicy policy to be used.