Menu

What are the alternative Google APIs for Samsung Knox Wi-fi deprecation?

There are a few key differences between the Google and Samsung Knox Wi-Fi APIs. Firstly, Google APIs don't support the following security types:

  • WIFI_SECURITY_OPEN, WIFI_SECURITY_PERSONAL
  • WIFI_SECURITY_ENTERPRISE_EAP
  • WIFI_SECURITY_ENTERPRISE_192

Additionally, Google's allow/deny SSID APIs don't support an allow list and deny list simultaneously. The client can either set an allow list, which blocks all SSIDs not on the list, or set a deny list, which blocks all SSIDs on the list.

IMPORTANT — Google Wi-Fi APIs can only be called by fully managed devices or devices with a work profile. Learn more about the different device management modes in the Android Enterprise documentation.

The following table lists the Knox Wi-Fi policy APIs and their Google API equivalents.

Knox Wi-Fi policy APIs Google APIs

setMinimumRequiredSecurity

setMinimumRequiredWifiSecurityLevel

getMinimumRequiredSecurity

getMinimumRequiredWifiSecurityLevel

addWifiSsidsToBlackList

setWifiSsidPolicy

getWifiSsidsFromBlackLists

getWifiSsidPolicy

removeWifiSsidsFromBlackList

setWifiSsidPolicy

clearWifiSsidsFromBlackList

setWifiSsidPolicy

addWifiSsidsToWhiteList

setWifiSsidPolicy

getWifiSsidsFromWhiteLists

getWifiSsidPolicy

removeWifiSsidsFromWhiteList

setWifiSsidPolicy

clearWifiSsidsFromWhiteList

setWifiSsidPolicy

clearWifiSsidsFromList

setWifiSsidPolicy

addBlockedNetwork

Deprecated, with support removed.

getBlockedNetworks

Deprecated.

removeBlockedNetwork

Deprecated.

isNetworkBlocked

Deprecated, with support removed.

activateWifiSsidRestriction

setWifiSsidPolicy

isWifiSsidRestrictionActive

getWifiSsidPolicy

setAllowUserProfiles

addUserRestrictionDISALLOW_ADD_WIFI_CONFIG

getAllowUserProfiles

getUserRestrictionsDISALLOW_ADD_WIFI_CONFIG

setWifiStateChangeAllowed

addUserRestrictionDISALLOW_CHANGE_WIFI_STATE

isWifiStateChangeAllowed

getUserRestrictionsDISALLOW_CHANGE_WIFI_STATE

setWifiTethering

addUserRestrictionDISALLOW_WIFI_TETHERING

isWifiTetheringEnabled

getUserRestrictionsDISALLOW_WIFI_TETHERING

allowWifiDirect

addUserRestrictionDISALLOW_WIFI_DIRECT

isWifiDirectAllowed

getUserRestrictionsDISALLOW_WIFI_DIRECT

setAutomaticConnectionToWifi

allowAutojoinGlobal

getAutomaticConnectionToWifi

queryAutojoinGlobal

setAllowUserPolicyChanges

setConfiguredNetworksLockdownState

getAllowUserPolicyChanges

hasLockdownAdminConfiguredNetworks

allowOpenWifiAp

Not yet supported by Google. Use the WifiPolicy API instead.

isOpenWifiApAllowed

Not yet supported by Google. Use the WifiPolicy API instead.

allowWifiApSettingUserModification

Not yet supported by Google. Use the WifiPolicy API instead.

isWifiApSettingUserModificationAllowed

Not yet supported by Google. Use the WifiPolicy API instead.

setPasswordHidden

Not yet supported by Google. Use the WifiPolicy API instead.

getPasswordHidden

Not yet supported by Google. Use the WifiPolicy API instead.

setPromptCredentialsEnabled

Deprecated.

getPromptCredentialsEnabled

Deprecated.

allowWifi

Combination of setWifiEnabled and addUserRestrictionDISALLOW_CHANGE_WIFI_STATE

isWiFiEnabled

Combination of isWifiEnabled and getUserRestrictionsDISALLOW_CHANGE_WIFI_STATE

setWifiApSetting

Not yet supported by Google. Use the WifiPolicy API instead.

getWifiApSetting

Not yet supported by Google. Use the WifiPolicy API instead.

setWifiProfile

Combination of setWifiEnabled, addNetworkPrivileged, and enableNetwork.

getWifiProfile

getCallerConfiguredNetworks

getNetworkSSIDList

getCallerConfiguredNetworks

removeNetworkConfiguration

removeNetwork

If you're calling the WifiAdminProfile Knox API, certain fields are passed as parameters to setWifiProfile. As a result of the harmonization between Knox and Google APIs, these fields must be replaced with their Google API counterparts.

The following table lists each WifiAdminProfile field and provides its Google API equivalent.

WifiAdminProfile WifiConfiguration/WifiEnterpriseConfig

ssid

SSID

psk

preSharedKey

password

setPassword

security

setSecurityParams

wepKeyId

wepTxKeyIndex

wepKey1

wepKeys

wepKey2

wepKeys

wepKey3

wepKeys

wepKey4

wepKeys

userIdentity

setIdentity

anonymousIdentity

setAnonymousIdentity

phase1

Not supported.

phase2

setPhase2Method

clientCertification

setClientKeyEntry

setClientKeyEntryWithCertificateChain

caCertificate

setCaCertificate

setCaCertificates

staticIpEnabled

setIpConfiguration

staticIp

setIpConfiguration

staticGateway

setIpConfiguration

staticPrimaryDns

setIpConfiguration

staticSecondaryDns

setIpConfiguration

staticSubnetMask

setIpConfiguration

proxyState

Automatically filled in by setHttpProxy.

proxyHostname

setHttpProxy

proxyPort

setHttpProxy

proxyBypassList

setHttpProxy

proxyPacUrl

setHttpProxy

proxyAuthConfigList

Not supported.