WifiManager.GetUsableChannels(WifiBand, WifiAvailableChannelModes) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Returns a list of WifiAvailableChannel
for the specified band and operational
mode(s) per the current regulatory domain and device-specific constraints such as concurrency
state and interference due to other radios.
[Android.Runtime.Register("getUsableChannels", "(II)Ljava/util/List;", "GetGetUsableChannels_IIHandler", ApiSince=34)]
[Android.Runtime.RequiresPermission("android.permission.NEARBY_WIFI_DEVICES")]
public virtual System.Collections.Generic.IList<Android.Net.Wifi.WifiAvailableChannel> GetUsableChannels (Android.Net.Wifi.WifiBand band, Android.Net.Wifi.WifiAvailableChannelModes mode);
[<Android.Runtime.Register("getUsableChannels", "(II)Ljava/util/List;", "GetGetUsableChannels_IIHandler", ApiSince=34)>]
[<Android.Runtime.RequiresPermission("android.permission.NEARBY_WIFI_DEVICES")>]
abstract member GetUsableChannels : Android.Net.Wifi.WifiBand * Android.Net.Wifi.WifiAvailableChannelModes -> System.Collections.Generic.IList<Android.Net.Wifi.WifiAvailableChannel>
override this.GetUsableChannels : Android.Net.Wifi.WifiBand * Android.Net.Wifi.WifiAvailableChannelModes -> System.Collections.Generic.IList<Android.Net.Wifi.WifiAvailableChannel>
Parameters
- band
- WifiBand
one of the following band constants defined in WifiScanner#WIFI_BAND_*
constants.
1. WifiScanner#WIFI_BAND_UNSPECIFIED
=0 - no band specified; Looks for the
channels in all the available bands - 2.4 GHz, 5 GHz, 6 GHz and 60 GHz
2. WifiScanner#WIFI_BAND_24_GHZ
=1
3. WifiScanner#WIFI_BAND_5_GHZ_WITH_DFS
=6
4. WifiScanner#WIFI_BAND_BOTH_WITH_DFS
=7
5. WifiScanner#WIFI_BAND_6_GHZ
=8
6. WifiScanner#WIFI_BAND_24_5_WITH_DFS_6_GHZ
=15
7. WifiScanner#WIFI_BAND_60_GHZ
=16
8. WifiScanner#WIFI_BAND_24_5_WITH_DFS_6_60_GHZ
=31
Bitwise OR of WifiAvailableChannel#OP_MODE_*
constants
e.g. WifiAvailableChannel#OP_MODE_WIFI_AWARE
Returns
a list of WifiAvailableChannel
- Attributes
Remarks
Returns a list of WifiAvailableChannel
for the specified band and operational mode(s) per the current regulatory domain and device-specific constraints such as concurrency state and interference due to other radios. An empty list implies that there are no available channels for use.
Note: the band
parameter which is specified as a WifiScanner#WIFI_BAND_*
constant is limited to one of the band values specified below. Specifically, if the 5GHz band is included then it must include the DFS channels - an exception will be thrown otherwise. The caller should not make any assumptions about whether DFS channels are allowed. This API will indicate whether DFS channels are allowed for the specified operation mode(s) per device policy.
Java documentation for android.net.wifi.WifiManager.getUsableChannels(int, int)
.
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.