android.net.wifi Kotlin |Java

Provides classes to manage Wi-Fi functionality on the device.

The Wi-Fi APIs provide a means by which applications can communicate with the lower-level wireless stack that provides Wi-Fi network access. Almost all information from the device supplicant is available, including the connected network’s link speed, IP address, negotiation state, and more, plus information about other networks that are available. Some other API features include the ability to scan, add, save, terminate and initiate Wi-Fi connections.

Some APIs may require the following user permissions:

ACCESS_WIFI_STATE
CHANGE_WIFI_STATE
CHANGE_WIFI_MULTICAST_STATE

Note: Not all Android-powered devices provide Wi-Fi functionality. If your application uses Wi-Fi, declare so with a element in the manifest file:




Interfaces
WifiManager.SuggestionConnectionStatusListener Interface for suggestion connection status listener.
Classes
EasyConnectStatusCallback Easy Connect (DPP) Status Callback.
ScanResult Describes information about a detected access point.
ScanResult.InformationElement information elements from beacon.
SoftApConfiguration Configuration for a soft access point (a.k.a.
WifiConfiguration This class was deprecated in API level 29. Use WifiNetworkSpecifier.Builder to create NetworkSpecifier and WifiNetworkSuggestion.Builder to create WifiNetworkSuggestion. This will become a system use only object in the future.
WifiConfiguration.AuthAlgorithm Recognized IEEE 802.11 authentication algorithms.
WifiConfiguration.GroupCipher Recognized group ciphers.
WifiConfiguration.GroupMgmtCipher Recognized group management ciphers.
WifiConfiguration.KeyMgmt Recognized key management schemes.
WifiConfiguration.PairwiseCipher Recognized pairwise ciphers for WPA.
WifiConfiguration.Protocol Recognized security protocols.
WifiConfiguration.Status Possible status of a network configuration.
WifiEnterpriseConfig Enterprise configuration details for Wi-Fi.
WifiEnterpriseConfig.Eap The Extensible Authentication Protocol method used
WifiEnterpriseConfig.Phase2 The inner authentication method used
WifiInfo Describes the state of any Wi-Fi connection that is active or is in the process of being set up.
WifiInfo.Builder Builder for WifiInfo
WifiManager This class provides the primary API for managing all aspects of Wi-Fi connectivity.
WifiManager.LocalOnlyHotspotCallback Callback class for applications to receive updates about the LocalOnlyHotspot status.
WifiManager.LocalOnlyHotspotReservation LocalOnlyHotspotReservation that contains the SoftApConfiguration for the active LocalOnlyHotspot request.
WifiManager.MulticastLock Allows an application to receive Wifi Multicast packets.
WifiManager.ScanResultsCallback Abstract class for scan results callback.
WifiManager.WifiLock Allows an application to keep the Wi-Fi radio awake.
WifiManager.WpsCallback This class was deprecated in API level 28. This is deprecated
WifiNetworkSpecifier Network specifier object used to request a local Wi-Fi network.
WifiNetworkSpecifier.Builder Builder used to create WifiNetworkSpecifier objects.
WifiNetworkSuggestion The Network Suggestion object is used to provide a Wi-Fi network for consideration when auto-connecting to networks.
WifiNetworkSuggestion.Builder Builder used to create WifiNetworkSuggestion objects.
WpsInfo A class representing Wi-Fi Protected Setup
Enums
SupplicantState From defs.h in wpa_supplicant.

你可能感兴趣的:(android)