Language

WifiMode Enum

Definition

Enumerates values returned by the Full, FullHighPerf, and ScanOnly members and taken as a parameter of the F:Android.Net.Wifi.WifiManager.CreateWifiLock member.

public enum WifiMode
type WifiMode = 
Inheritance
WifiMode

Fields

Name Value Description
Full 1

This constant was deprecated in API level 29. On Android 10 and later, this API is non-functional and has no impact.

Before Android 10, this Wi-Fi lock mode kept Wi-Fi active and allowed it to behave normally: Wi-Fi attempted to connect to remembered access points within range and performed periodic scans when none were in range.

Android reference for android.net.wifi.WifiManager.WIFI_MODE_FULL.

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

ScanOnly 2

In this Wi-Fi lock mode, Wi-Fi will be kept active, but the only operation that will be supported is initiation of scans, and the subsequent reporting of scan results.

FullHighPerf 3

This constant was deprecated in API level 34. Starting with Android 14, the default system configuration treats a WIFI_MODE_FULL_HIGH_PERF request as a FullLowLatency request. This lock normally requires a Wi-Fi connection, the screen to be on, and the acquiring app to be in the foreground. The conversion can be disabled by system configuration. Deprecation is due to the impact of WIFI_MODE_FULL_HIGH_PERF on power dissipation. The WIFI_MODE_FULL_LOW_LATENCY provides much of the same desired functionality with less impact on power dissipation.

When the request is not converted to a low-latency lock, Wi-Fi will not go to power save. This results in operating with low packet latency. The lock is only active when the device is connected to an access point. The lock is active even when the device screen is off or the acquiring application is running in the background. This mode will consume more power and hence should be used only when there is a need for this tradeoff.

When the request is not converted, an example use case is when a voice connection needs to be kept active even after the device screen goes off. Holding a WIFI_MODE_FULL_HIGH_PERF lock for the duration of the voice call may improve the call quality.

When the request is not converted and there is no support from the hardware, the WIFI_MODE_FULL_HIGH_PERF lock will have no impact.

Android reference for android.net.wifi.WifiManager.WIFI_MODE_FULL_HIGH_PERF.

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

FullLowLatency 4

Selects a Wi-Fi lock mode that gives priority to lower packet latency.

Remarks

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to