Added in API level 1
public interface

IWifiConfigManager

com.ardic.android.managers.wificonfig.IWifiConfigManager

Class Overview

Provides a set of APIs for Wi-Fi control.

Enables or disables Wi-Fi network connections(Wi-Fi Access Point Networks). Wi-Fi APNs can be specified as "black" and "white" or can be set as unconfigurable in order to impose a policy on Wi-Fi configurations.

Summary

Public Methods
abstract boolean addEapMethodToAllowedlist(WifiConfigEnterpriseField.EapMethod mname)
Adds the given EAP method to the Allowed EAP Methods list.
abstract boolean addUnconfigurableWifiApn(String ssid)
Adds the given SSID as Unconfigurable(forbidden to configure).
abstract boolean addWifiApnToBlacklist(String ssid)
Adds Wi-Fi APN with the given SSID as a Black item into AFEX Black-White list.
abstract boolean addWifiApnToWhitelist(String ssid)
Specifies Wi-Fi APN with the given SSID as a White item into Black-White list.
abstract boolean addWifiNetworkPolicy(PolicyItem.PolicyName policyName, int policyOrder)
Adds a Wi-Fi APN Connection policy.
abstract boolean clearAllowedEapMethodlist()
Deletes all the Allowed EAP Methods list.
abstract boolean clearBlacklist()
Removes all Black Wi-Fi APN SSIDs from Black-White list.
abstract boolean clearUnconfigurableWifiApn()
Removes all Wi-Fi APN SSIDs from Unconfigurable(forbidden to configure) list.
abstract boolean clearWhitelist()
Removes all White Wi-Fi APN configurations from Black-White list.
abstract boolean clearWifiConfigs()
Removes all saved Wi-Fi APN configurations on the device.
abstract boolean clearWifiNetworkPolicy()
Removes all Wi-Fi APN Connection policy.
abstract boolean connectToWifiApn(int netId)
This method is used to connect to a specified Wi-Fi APN.
abstract List<WifiConfigEnterpriseField.EapMethod> getAllAllowedEapMethods()
Returns all Allowed EAP Methods.
abstract List<WifiConfigBasic> getAllConfiguredWifiApn()
Returns the list of all configured Wi-Fi APN configurations on a device.
abstract List<WifiConfigBasic> getAllInRangeWifiApnsBasicConfigs()
Returns list of in range Wi-Fi APNs' basic configurations.
abstract List<String> getAllUnconfigurableWifiApn()
Returns list of SSIDs for all Unconfigurable(forbidden to configure) Wi-Fi APN configurations.
abstract List<PolicyItem> getAllWifiNetworkPolicy()
Returns all Wi-Fi APN Connection Policies.
abstract List<String> getBlacklist()
Returns list of Black Wi-Fi APN SSIDs.
abstract WifiConfigBasic.SecurityType getConfiguredWifiApnSecurityType(int netId)
Returns security type of the Wi-Fi APN configuration with the given network ID.
abstract List<String> getWhitelist()
Returns all White Wi-Fi APN SSIDs.
abstract int getWifiApnNetworkId(WifiConfigBasic wcBasic)
Returns Network ID of the given Wi-Fi APN Configuration.
abstract WifiConfig getWifiConfiguration(int netId)
Returns Wi-Fi APN Configuration for the given Network ID.
abstract boolean isEapWifiConfigUpdateBlocked()
Returns whether Wi-Fi settings other than username and user password change is blocked or not.
abstract boolean isWifiApnAccessible(String ssid)
Checks whether the device is allowed to access (connect) to a Wi-Fi APN with the given SSID according to Wi-Fi policy.
abstract boolean isWifiApnAddBlocked()
Returns whether new Wi-Fi APN configuring is blocked or not.
abstract boolean isWifiApnConfigured(String ssid)
Returns whether a Wi-Fi APN configuration with the given SSID is already saved or not on the device.
abstract boolean isWifiApnInBlacklist(String ssid)
Checks whether Wi-Fi Configuration with the given SSID is a Black item in Black-White Wi-Fi APN list or not.
abstract boolean isWifiApnInUnconfigurablelist(String ssid)
Returns whether Wi-Fi APN with the given SSID is in Unconfigurable(forbidden to configure) Wi-Fi APN list or not.
abstract boolean isWifiApnInWhitelist(String ssid)
Checks whether Wi-Fi Configuration with the given SSID is a White item in Black-White list or not.
abstract boolean isWifiBlocked()
Return whether Wi-Fi connection is blocked or unblocked.
abstract boolean isWifiEapMethodAllowedlistEmpty()
Checks whether the Allowed EAP Methods list is empty.
abstract boolean isWifiEapMethodInAllowedlist(WifiConfigEnterpriseField.EapMethod mname)
Checks whether the given EAP Method is in the Allowed EAP Methods list.
abstract boolean isWifiOn()
Returns whether Wi-Fi connection is ON or not.
abstract boolean isWifiPasswordHidden()
Returns whether Wi-Fi show password in Android Settings application is blocked or not.
abstract boolean isWifiStateChangeBlocked()
Returns whether Wi-Fi connection state change is blocked or not.
abstract boolean isWifiSupported()
Returns whether the device supports WiFi (802.11) networking or not.
abstract boolean removeEapMethodFromAllowedlist(WifiConfigEnterpriseField.EapMethod mname)
Deletes the given EAP method from the Allowed EAP Methods list.
abstract boolean removeUnconfigurableWifiApn(String ssid)
Removes Wi-Fi APN with the given SSID from the Unconfigurable(forbidden to configure) Wi-Fi APN list.
abstract boolean removeWifiApnConfig(int netId)
Deletes a Wi-Fi APN configuration with the given network ID on the device.
abstract boolean removeWifiApnFromBlacklist(String ssid)
Removes Wi-Fi APN SSID from Black items of Black-White Table.
abstract boolean removeWifiApnFromWhitelist(String ssid)
Removes Wi-Fi APN SSID from White items of Black-White list.
abstract boolean removeWifiNetworkPolicy(PolicyItem.PolicyName policyName)
Removes a Wi-Fi APN Connection Policy.
abstract int saveWifiConfiguration(WifiConfig wc)
Stores a given Wi-Fi APN Configuration on a device.
abstract boolean setEapWifiConfigUpdateBlocked(boolean state)
For Wi-Fi networks with security type EAP, disables the ability to change settings other than username and user password of an already configured Wi-Fi APN.
abstract boolean setWifiApnAddBlocked(boolean state)
Blocks (disables) configuring a new Wi-Fi APN on the device.
abstract boolean setWifiBlocked(boolean state)
Sets Wi-Fi connection to blocked.
abstract boolean setWifiPasswordHidden(boolean state)
Disables the ability to show Wi-Fi password in Android Settings application.
abstract boolean setWifiState(boolean onOff)
Turns ON/OFF Wi-Fi connection of the device.
abstract boolean setWifiStateChangeBlocked(boolean state)
Disables the ability to change Wi-Fi connection state.

Public Methods

public abstract boolean addEapMethodToAllowedlist (WifiConfigEnterpriseField.EapMethod mname)

Added in API level 2

Adds the given EAP method to the Allowed EAP Methods list. If the Allowed EAP Methods list is empty, any EAP method can be selected during Enterprise Wi-Fi APN set up. Otherwise, only EAP methods in the Allowed EAP Methods list can be configured.

Parameters
mname WifiConfigEnterpriseField.EapMethod: given EAP Method. One of EAP_METHOD_PEAP EAP_METHOD_TLS, EAP_METHOD_TTLS, EAP_METHOD_PWD
Returns
boolean true if the operation succeeds else false.
Throws
AfexException

public abstract boolean addUnconfigurableWifiApn (String ssid)

Added in API level 1

Adds the given SSID as Unconfigurable(forbidden to configure). Wi-Fi APN configurations with the given SSID can not be saved. If there is an already saved Wi-Fi APN configuration having the given SSID, it is not removed implicitly.

Parameters
ssid String: SSID of the Wi-Fi APN
Returns
boolean true if the operation succeeds else false.
Throws
AfexException

public abstract boolean addWifiApnToBlacklist (String ssid)

Added in API level 1

Adds Wi-Fi APN with the given SSID as a Black item into AFEX Black-White list. Black-White item list specifies Wi-Fi APNs that are accessible (connectable) based on specified Wi-Fi policy. If Wi-Fi policy is set as black then SSIDs in black list are not accessible(connection is not allowed) for the device. If Wi-Fi policy is set as white then SSIDs in white list are the only accessible Wi-Fi APNs for the device. Device can not connect to any other SSIDs. If both black and white Wi-Fi Policies are activated, accessibility is checked in the order given.

Parameters
ssid String: SSID of the Wi-Fi APN.
Returns
boolean true if the operation succeeds else false.
Throws
AfexException

public abstract boolean addWifiApnToWhitelist (String ssid)

Added in API level 1

Specifies Wi-Fi APN with the given SSID as a White item into Black-White list. Black-White item list specifies Wi-Fi APNs that are accessible (connectable) based on specified Wi-Fi policy. If Wi-Fi policy is set as black then SSIDs in black list are not accessible(connection is not allowed) for the device. If Wi-Fi policy is set as white then SSIDs in white list are the only accessible Wi-Fi APNs for the device. Device can not connect to any other SSIDs. If both black and white Wi-Fi Policies are activated, accessibility is checked in the order given.

Parameters
ssid String: SSID of the Wi-Fi APN.
Returns
boolean true if the operation succeeds else false.
Throws
AfexException

public abstract boolean addWifiNetworkPolicy (PolicyItem.PolicyName policyName, int policyOrder)

Added in API level 1

Adds a Wi-Fi APN Connection policy. Policy can be either White (Only allow trusted) or Black (do not allow untrusted) or both. When both policies are added, they are checked in the given policyOrder. After Policy is added connectivity policy of the currently connected Wi-Fi APN is evaluated and if it is not accessible, system disconnects from the APN.

  • If Wi-Fi APN is in the Black List and Wi-Fi Policy is specified as Black the result is false
  • If Wi-Fi APN is NOT in the White List and Wi-Fi Policy is specified as White the result is false
  • Otherwise the result is true

Parameters
policyName PolicyItem.PolicyName: POLICYNAME_BLACKLIST for black list policy POLICYNAME_WHITELIST for white list policy
policyOrder int: integer. Larger value means higher priority.
Returns
boolean true if the operation succeeds else false.
Throws
AfexException

public abstract boolean clearAllowedEapMethodlist ()

Added in API level 2

Deletes all the Allowed EAP Methods list. If the Allowed EAP Methods list is empty, any EAP method can be selected during Enterprise Wi-Fi APN set up. Otherwise, only EAP methods in the Allowed EAP Methods list can be configured.

Returns
boolean true if the operation succeeds else false.
Throws
AfexException

public abstract boolean clearBlacklist ()

Added in API level 1

Removes all Black Wi-Fi APN SSIDs from Black-White list. Black-White item list specifies Wi-Fi APNs that are accessible (connectable) based on specified Wi-Fi policy. If Wi-Fi policy is set as black then SSIDs in black list are not accessible(connection is not allowed) for the device. If Wi-Fi policy is set as white then SSIDs in white list are the only accessible Wi-Fi APNs for the device. Device can not connect to any other SSIDs. If both black and white Wi-Fi Policies are activated, accessibility is checked in the order given.

Returns
boolean true if the operation succeeds else false.
Throws
AfexException

public abstract boolean clearUnconfigurableWifiApn ()

Added in API level 1

Removes all Wi-Fi APN SSIDs from Unconfigurable(forbidden to configure) list.

Returns
boolean true if the operation succeeds else false.
Throws
AfexException

public abstract boolean clearWhitelist ()

Added in API level 1

Removes all White Wi-Fi APN configurations from Black-White list. Black-White item list specifies Wi-Fi APNs that are accessible (connectable) based on specified Wi-Fi policy. If Wi-Fi policy is set as black then SSIDs in black list are not accessible(connection is not allowed) for the device. If Wi-Fi policy is set as white then SSIDs in white list are the only accessible Wi-Fi APNs for the device. Device can not connect to any other SSIDs. If both black and white Wi-Fi Policies are activated, accessibility is checked in the order given.

Returns
boolean true if the operation succeeds else false.
Throws
AfexException

public abstract boolean clearWifiConfigs ()

Added in API level 1

Removes all saved Wi-Fi APN configurations on the device.

Returns
boolean true if the operation succeeds else false. When Wi-Fi is OFF, it returns false.
Throws
AfexException

public abstract boolean clearWifiNetworkPolicy ()

Added in API level 1

Removes all Wi-Fi APN Connection policy.

Returns
boolean true if the operation succeeds else false.
Throws
AfexException

public abstract boolean connectToWifiApn (int netId)

Added in API level 1

This method is used to connect to a specified Wi-Fi APN.

Parameters
netId int: Network Id (non-negative Integer) >= 0 of Wi-Fi APN configuration.
Returns
boolean true if device is able to connect to the Wi-Fi APN, otherwise false
Throws
AfexException

public abstract List<WifiConfigEnterpriseField.EapMethod> getAllAllowedEapMethods ()

Added in API level 2

Returns all Allowed EAP Methods. If the Allowed EAP Methods list is empty, any EAP method can be selected during Enterprise Wi-Fi APN set up. Otherwise, only EAP methods in the Allowed EAP Methods list can be configured.

Returns
List<WifiConfigEnterpriseField.EapMethod> the list of Allowed EAP Methods.
Throws
AfexException

public abstract List<WifiConfigBasic> getAllConfiguredWifiApn ()

Added in API level 1

Returns the list of all configured Wi-Fi APN configurations on a device.

Returns
List<WifiConfigBasic> Basic Wi-Fi Configuration list of the saved Wi-Fi APN configurations. Upon failure to fetch or when Wi-Fi connection is OFF, it returns empty list.
Throws
AfexException

public abstract List<WifiConfigBasic> getAllInRangeWifiApnsBasicConfigs ()

Added in API level 1

Returns list of in range Wi-Fi APNs' basic configurations.

Returns
List<WifiConfigBasic> WifiConfigBasic list of the Wi-Fi APNs in range. When Wi-Fi connection is OFF, it returns empty list.
Throws
AfexException

public abstract List<String> getAllUnconfigurableWifiApn ()

Added in API level 1

Returns list of SSIDs for all Unconfigurable(forbidden to configure) Wi-Fi APN configurations.

Returns
List<String> SSID list of all unconfigurable Wi-Fi APN configurations.
Throws
AfexException

public abstract List<PolicyItem> getAllWifiNetworkPolicy ()

Added in API level 1

Returns all Wi-Fi APN Connection Policies. Policy can be either White (Only allow trusted) or Black (do not allow untrusted).

Returns
List<PolicyItem> PolicyItem list of Wi-Fi APN policies.
Throws
AfexException

public abstract List<String> getBlacklist ()

Added in API level 1

Returns list of Black Wi-Fi APN SSIDs. Black-White item list specifies Wi-Fi APNs that are accessible (connectable) based on specified Wi-Fi policy. If Wi-Fi policy is set as black then SSIDs in black list are not accessible(connection is not allowed) for the device. If Wi-Fi policy is set as white then SSIDs in white list are the only accessible Wi-Fi APNs for the device. Device can not connect to any other SSIDs. If both black and white Wi-Fi Policies are activated, accessibility is checked in the order given.

Returns
List<String> SSID list of Black Wi-Fi APN configurations.
Throws
AfexException

public abstract WifiConfigBasic.SecurityType getConfiguredWifiApnSecurityType (int netId)

Added in API level 1

Returns security type of the Wi-Fi APN configuration with the given network ID.

Parameters
netId int: Network ID of the Wi-Fi APN configuration.
Returns
WifiConfigBasic.SecurityType securityType SecurityType of Wi-Fi APN
Throws
AfexException

public abstract List<String> getWhitelist ()

Added in API level 1

Returns all White Wi-Fi APN SSIDs. Black-White item list specifies Wi-Fi APNs that are accessible (connectable) based on specified Wi-Fi policy. If Wi-Fi policy is set as black then SSIDs in black list are not accessible(connection is not allowed) for the device. If Wi-Fi policy is set as white then SSIDs in white list are the only accessible Wi-Fi APNs for the device. Device can not connect to any other SSIDs. If both black and white Wi-Fi Policies are activated, accessibility is checked in the order given.

Returns
List<String> SSID list of White Wi-Fi APN configurations.
Throws
AfexException

public abstract int getWifiApnNetworkId (WifiConfigBasic wcBasic)

Added in API level 1

Returns Network ID of the given Wi-Fi APN Configuration.

Parameters
wcBasic WifiConfigBasic: Basic Wi-Fi APN configuration.
Returns
int -1 if the given Wi-Fi APN configuration does not exist, otherwise, ID number of the network. Upon failure to fetch or when Wi-Fi connection is OFF, it returns -1.
Throws
AfexException

public abstract WifiConfig getWifiConfiguration (int netId)

Added in API level 1

Returns Wi-Fi APN Configuration for the given Network ID.

Parameters
netId int: Network Id (non-negative Integer) >= 0 of the Wi-Fi APN configuration.
Returns
WifiConfig WifiConfig object for Wi-Fi Configuration of the given network ID.
Throws
AfexException

public abstract boolean isEapWifiConfigUpdateBlocked ()

Added in API level 2

Returns whether Wi-Fi settings other than username and user password change is blocked or not.

Returns
boolean true if Wi-Fi settings other than username and user password state change is blocked, false otherwise.
Throws
AfexException

public abstract boolean isWifiApnAccessible (String ssid)

Added in API level 1

Checks whether the device is allowed to access (connect) to a Wi-Fi APN with the given SSID according to Wi-Fi policy.

  • If Wi-Fi APN is in the Black List and Wi-Fi Policy is specified as Black the result is false
  • If Wi-Fi APN is NOT in the White List and Wi-Fi Policy is specified as White the result is false
  • Otherwise the result is true

Parameters
ssid String: SSID of the Wi-Fi APN
Returns
boolean true if device is allowed to connect to the Wi-Fi APN, false otherwise.
Throws
AfexException

public abstract boolean isWifiApnAddBlocked ()

Added in API level 1

Returns whether new Wi-Fi APN configuring is blocked or not. If Wi-Fi APN Add is blocked, user can not configure any Wi-Fi APN.

Returns
boolean true if Wi-Fi APN configuration add is blocked, false otherwise.
Throws
AfexException

public abstract boolean isWifiApnConfigured (String ssid)

Added in API level 1

Returns whether a Wi-Fi APN configuration with the given SSID is already saved or not on the device.

Parameters
ssid String: SSID of the Wi-Fi APN
Returns
boolean true if Wi-Fi APN is already among saved configurations. false Upon failure to fetch or when Wi-Fi is OFF.
Throws
AfexException

public abstract boolean isWifiApnInBlacklist (String ssid)

Added in API level 1

Checks whether Wi-Fi Configuration with the given SSID is a Black item in Black-White Wi-Fi APN list or not. Black-White item list specifies Wi-Fi APNs that are accessible (connectable) based on specified Wi-Fi policy. If Wi-Fi policy is set as black then SSIDs in black list are not accessible(connection is not allowed) for the device. If Wi-Fi policy is set as white then SSIDs in white list are the only accessible Wi-Fi APNs for the device. Device can not connect to any other SSIDs. If both black and white Wi-Fi Policies are activated, accessibility is checked in the order given.

Parameters
ssid String: SSID of the Wi-Fi APN
Returns
boolean true if the Wi-Fi APN is a Black item in AFEX Black-White policy, otherwise false.
Throws
AfexException

public abstract boolean isWifiApnInUnconfigurablelist (String ssid)

Added in API level 1

Returns whether Wi-Fi APN with the given SSID is in Unconfigurable(forbidden to configure) Wi-Fi APN list or not.

Parameters
ssid String: Wi-Fi APN SSID
Returns
boolean true if SSID is in the list false otherwise.
Throws
AfexException

public abstract boolean isWifiApnInWhitelist (String ssid)

Added in API level 1

Checks whether Wi-Fi Configuration with the given SSID is a White item in Black-White list or not. Black-White item list specifies Wi-Fi APNs that are accessible (connectable) based on specified Wi-Fi policy. If Wi-Fi policy is set as black then SSIDs in black list are not accessible(connection is not allowed) for the device. If Wi-Fi policy is set as white then SSIDs in white list are the only accessible Wi-Fi APNs for the device. Device can not connect to any other SSIDs. If both black and white Wi-Fi Policies are activated, accessibility is checked in the order given.

Parameters
ssid String: SSID of the Wi-Fi APN
Returns
boolean true if the Wi-Fi APN is a White item in Black-White list, otherwise false
Throws
AfexException

public abstract boolean isWifiBlocked ()

Added in API level 1

Return whether Wi-Fi connection is blocked or unblocked.

Returns
boolean true if Wi-Fi is blocked, false otherwise
Throws
AfexException

public abstract boolean isWifiEapMethodAllowedlistEmpty ()

Added in API level 2

Checks whether the Allowed EAP Methods list is empty. If the Allowed EAP Methods list is empty, any EAP method can be selected during Enterprise Wi-Fi APN set up. Otherwise, only EAP methods in the Allowed EAP Methods list can be configured.

Returns
boolean true if the the list is empty false otherwise.
Throws
AfexException

public abstract boolean isWifiEapMethodInAllowedlist (WifiConfigEnterpriseField.EapMethod mname)

Added in API level 2

Checks whether the given EAP Method is in the Allowed EAP Methods list. If the Allowed EAP Methods list is empty, any EAP method can be selected during Enterprise Wi-Fi APN set up. Otherwise, only EAP methods in the Allowed EAP Methods list can be configured.

Parameters
mname WifiConfigEnterpriseField.EapMethod: given EAP Method. One of EAP_METHOD_PEAP, EAP_METHOD_TLS, EAP_METHOD_TTLS, EAP_METHOD_PWD
Returns
boolean true if the EAP method is in the list false otherwise.
Throws
AfexException

public abstract boolean isWifiOn ()

Added in API level 1

Returns whether Wi-Fi connection is ON or not.

Returns
boolean true if Wi-Fi connection is ON else false
Throws
AfexException

public abstract boolean isWifiPasswordHidden ()

Added in API level 1

Returns whether Wi-Fi show password in Android Settings application is blocked or not.

Returns
boolean true if Wi-Fi show password is blocked, false otherwise.
Throws
AfexException

public abstract boolean isWifiStateChangeBlocked ()

Added in API level 1

Returns whether Wi-Fi connection state change is blocked or not. If state change is blocked Wi-Fi connection remains its current state(No state changes occur).

Returns
boolean true if Wi-Fi connection state change is blocked, false otherwise.
Throws
AfexException

public abstract boolean isWifiSupported ()

Added in API level 1

Returns whether the device supports WiFi (802.11) networking or not.

Returns
boolean true if Wi-Fi is supported on the device else false
Throws
AfexException

public abstract boolean removeEapMethodFromAllowedlist (WifiConfigEnterpriseField.EapMethod mname)

Added in API level 2

Deletes the given EAP method from the Allowed EAP Methods list. If the Allowed EAP Methods list is empty, any EAP method can be selected during Enterprise Wi-Fi APN set up. Otherwise, only EAP methods in the Allowed EAP Methods list can be configured.

Parameters
mname WifiConfigEnterpriseField.EapMethod: given EAP Method. One of EAP_METHOD_PEAP, EAP_METHOD_TLS, EAP_METHOD_TTLS, EAP_METHOD_PWD
Returns
boolean true if the operation succeeds else false.
Throws
AfexException

public abstract boolean removeUnconfigurableWifiApn (String ssid)

Added in API level 1

Removes Wi-Fi APN with the given SSID from the Unconfigurable(forbidden to configure) Wi-Fi APN list.

Parameters
ssid String: SSID of the Wi-Fi APN configuration.
Returns
boolean true if the operation succeeds else false.
Throws
AfexException

public abstract boolean removeWifiApnConfig (int netId)

Added in API level 1

Deletes a Wi-Fi APN configuration with the given network ID on the device.

Parameters
netId int: Network ID of the Wi-Fi APN Configuration on the device.
Returns
boolean true if the operation succeeds, else false. When Wi-Fi connection is OFF, it returns false.
Throws
AfexException

public abstract boolean removeWifiApnFromBlacklist (String ssid)

Added in API level 1

Removes Wi-Fi APN SSID from Black items of Black-White Table. Black-White item list specifies Wi-Fi APNs that are accessible (connectable) based on specified Wi-Fi policy. If Wi-Fi policy is set as black then SSIDs in black list are not accessible(connection is not allowed) for the device. If Wi-Fi policy is set as white then SSIDs in white list are the only accessible Wi-Fi APNs for the device. Device can not connect to any other SSIDs. If both black and white Wi-Fi Policies are activated, accessibility is checked in the order given.

Parameters
ssid String: SSID of the Wi-Fi APN
Returns
boolean true if the operation succeeds else false.
Throws
AfexException

public abstract boolean removeWifiApnFromWhitelist (String ssid)

Added in API level 1

Removes Wi-Fi APN SSID from White items of Black-White list. Black-White item list specifies Wi-Fi APNs that are accessible (connectable) based on specified Wi-Fi policy. If Wi-Fi policy is set as black then SSIDs in black list are not accessible(connection is not allowed) for the device. If Wi-Fi policy is set as white then SSIDs in white list are the only accessible Wi-Fi APNs for the device. Device can not connect to any other SSIDs. If both black and white Wi-Fi Policies are activated, accessibility is checked in the order given.

Parameters
ssid String: SSID of the Wi-Fi APN
Returns
boolean true if the operation succeeds else false.
Throws
AfexException

public abstract boolean removeWifiNetworkPolicy (PolicyItem.PolicyName policyName)

Added in API level 1

Removes a Wi-Fi APN Connection Policy.

Parameters
policyName PolicyItem.PolicyName: name of the Wi-Fi APN policy, either White or Black.
Returns
boolean true if the operation succeeds else false.
Throws
AfexException

public abstract int saveWifiConfiguration (WifiConfig wc)

Added in API level 1

Stores a given Wi-Fi APN Configuration on a device. In order to save the configuration Wi-Fi connection must be ON.

Parameters
wc WifiConfig: WifiConfig for the Wi-Fi Configuration to be saved.
Returns
int Network Id (non-negative Integer) >= 0 of Wi-Fi Configuration. If operation fails returns -1.
Throws
AfexException

public abstract boolean setEapWifiConfigUpdateBlocked (boolean state)

Added in API level 2

For Wi-Fi networks with security type EAP, disables the ability to change settings other than username and user password of an already configured Wi-Fi APN.

In Blocking case; If Wi-Fi APN with security type EAP is already configured, changing Wi-Fi settings other than username and user password is prevented.

In Unblocking case; Wi-Fi APN configuration can be changed.

Parameters
state boolean: true to block Wi-Fi APN configuration change, false to unblock.
Returns
boolean true if the operation succeeds, else false
Throws
AfexException

public abstract boolean setWifiApnAddBlocked (boolean state)

Added in API level 1

Blocks (disables) configuring a new Wi-Fi APN on the device. User can not add any Wi-Fi APN configuration if blocked.

Parameters
state boolean: true to block false to unblock.
Returns
boolean true if the operation succeeds else false.
Throws
AfexException

public abstract boolean setWifiBlocked (boolean state)

Added in API level 1

Sets Wi-Fi connection to blocked. If Wi-Fi state change is also blocked Wi-Fi connection state does not change and Wi-Fi blocking fails. Hence Wi-Fi state change block has a higher priority compared to Wi-Fi connection blocking.

In Blocking case; Wi-Fi is turned OFF and it is blocked.

The Wi-Fi can not be turned ON until it is unblocked.

In Unblocking case; Wi-Fi is unblocked and it can be turned ON.

Parameters
state boolean: true to block Wi-Fi, false to unblock.
Returns
boolean true if the operation succeeds (or if the existing state is the same as the requested state) else false
Throws
AfexException

See also:

public abstract boolean setWifiPasswordHidden (boolean state)

Added in API level 1

Disables the ability to show Wi-Fi password in Android Settings application.

In Blocking case; User can not check UI dialog to show password entered for Wi-Fi APN authentication.

In Unblocking case; User can check UI dialog to show password entered for Wi-Fi APN authentication.

Parameters
state boolean: true to block Wi-Fi show password, false to unblock.
Returns
boolean true if the operation succeeds, else false
Throws
AfexException

public abstract boolean setWifiState (boolean onOff)

Added in API level 1

Turns ON/OFF Wi-Fi connection of the device.

Parameters
onOff boolean: boolean true to enable, false to disable Wi-Fi connection.
Returns
boolean true if the operation succeeds else false
Throws
AfexException

public abstract boolean setWifiStateChangeBlocked (boolean state)

Added in API level 1

Disables the ability to change Wi-Fi connection state.

In Blocking case; If Wi-Fi state is ON it remains ON and can not be turned OFF by App UID. If Wi-Fi state is OFF it remains OFF and can not be turned ON by App UID.

The Wi-Fi state can not be changed until it is unblocked.

In Unblocking case; Wi-Fi can be disabled(Turned OFF) or enabled(Turn ON) by App UID.

Parameters
state boolean: true to block Wi-Fi state change, false to unblock.
Returns
boolean true if the operation succeeds, else false
Throws
AfexException