WifiManager Class

Definition

This class provides the primary API for managing all aspects of Wi-Fi connectivity.

[Android.Runtime.Register("android/net/wifi/WifiManager", DoNotGenerateAcw=true)]
public class WifiManager : Java.Lang.Object
[<Android.Runtime.Register("android/net/wifi/WifiManager", DoNotGenerateAcw=true)>]
type WifiManager = class
    inherit Object
Inheritance
WifiManager
Attributes

Remarks

Android platform documentation

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.

Constructors

WifiManager(IntPtr, JniHandleOwnership)

A constructor used when creating managed representations of JNI objects; called by the runtime.

Fields

ActionPickWifiNetwork

Activity Action: Pick a Wi-Fi network to connect to.

ActionRemoveSuggestionDisconnect
ActionRemoveSuggestionLinger
ActionRequestScanAlwaysAvailable

Activity Action: Show a system activity that allows the user to enable scans to be available even with Wi-Fi turned off.

ActionWifiNetworkSuggestionPostConnection
ActionWifiScanAvailabilityChanged
ErrorAuthenticating
Obsolete.

The error code if there was a problem authenticating.

ExtraBssid
Obsolete.

The lookup key for a String giving the BSSID of the access point to which we are connected.

ExtraNetworkInfo

The lookup key for a NetworkInfo object associated with the Wi-Fi network.

ExtraNetworkSuggestion
ExtraNewRssi

The lookup key for an int giving the new RSSI in dBm.

ExtraNewState
Obsolete.

The lookup key for a SupplicantState describing the new state Retrieve with GetParcelableExtra(String).

ExtraPreviousWifiState

The previous Wi-Fi state.

ExtraResultsUpdated
ExtraScanAvailable
ExtraSupplicantConnected
Obsolete.

The lookup key for a boolean that indicates whether a connection to the supplicant daemon has been gained or lost.

ExtraSupplicantError
Obsolete.

The lookup key for a SupplicantState describing the supplicant error code if any Retrieve with GetIntExtra(String, Int32).

ExtraWifiInfo
Obsolete.

The lookup key for a WifiInfo object giving the information about the access point to which we are connected.

ExtraWifiState

The lookup key for an int that indicates whether Wi-Fi is enabled, disabled, enabling, disabling, or unknown.

NetworkIdsChangedAction

The network IDs of the configured networks could have changed.

NetworkStateChangedAction

Broadcast intent action indicating that the state of Wi-Fi connectivity has changed.

RssiChangedAction

The RSSI (signal strength) has changed.

ScanResultsAvailableAction

An access point scan has completed, and results are available from the supplicant.

StatusNetworkSuggestionsErrorAddDuplicate
StatusNetworkSuggestionsErrorAddExceedsMaxPerApp
StatusNetworkSuggestionsErrorAddInvalid
StatusNetworkSuggestionsErrorAddNotAllowed
StatusNetworkSuggestionsErrorAppDisallowed
StatusNetworkSuggestionsErrorInternal
StatusNetworkSuggestionsErrorRemoveInvalid
StatusNetworkSuggestionsErrorRestrictedByAdmin
StatusNetworkSuggestionsSuccess
StatusSuggestionApprovalApprovedByCarrierPrivilege
StatusSuggestionApprovalApprovedByUser
StatusSuggestionApprovalPending
StatusSuggestionApprovalRejectedByUser
StatusSuggestionApprovalUnknown
StatusSuggestionConnectionFailureAssociation
StatusSuggestionConnectionFailureAuthentication
StatusSuggestionConnectionFailureIpProvisioning
StatusSuggestionConnectionFailureUnknown
SupplicantConnectionChangeAction
Obsolete.

Broadcast intent action indicating that a connection to the supplicant has been established (and it is now possible to perform Wi-Fi operations) or the connection to the supplicant has been lost.

SupplicantStateChangedAction
Obsolete.

Broadcast intent action indicating that the state of establishing a connection to an access point has changed.

UnknownSsid
WifiInterfaceTypeAp
WifiInterfaceTypeAware
WifiInterfaceTypeDirect
WifiInterfaceTypeSta
WifiMultiInternetModeDbsAp
WifiMultiInternetModeDisabled
WifiMultiInternetModeMultiAp
WifiStateChangedAction

Broadcast intent action indicating that Wi-Fi has been enabled, disabled, enabling, disabling, or unknown.

Properties

CallerConfiguredNetworks
Class

Returns the runtime class of this Object.

(Inherited from Object)
ConfiguredNetworks
Obsolete.

Return a list of all the networks configured in the supplicant.

ConnectionInfo
Obsolete.

Return dynamic information about the current Wi-Fi connection, if any is active.

DhcpInfo
Obsolete.

Return the DHCP-assigned addresses from the last successful DHCP request, if any.

Handle

The handle to the underlying Android instance.

(Inherited from Object)
IsAutoWakeupEnabled
IsBridgedApConcurrencySupported
IsDecoratedIdentitySupported
IsDeviceToApRttSupported
IsEasyConnectDppAkmSupported
IsEasyConnectEnrolleeResponderModeSupported
IsEasyConnectSupported
IsEnhancedOpenSupported
IsEnhancedPowerReportingSupported
IsMakeBeforeBreakWifiSwitchingSupported
IsP2pSupported
IsPasspointTermsAndConditionsSupported
IsPreferredNetworkOffloadSupported
IsScanAlwaysAvailable
Obsolete.

Check if scanning is always available.

IsScanThrottleEnabled
IsStaApConcurrencySupported
IsStaBridgedApConcurrencySupported
IsStaConcurrencyForLocalOnlyConnectionsSupported
IsStaConcurrencyForMultiInternetSupported
IsTdlsSupported
IsTrustOnFirstUseSupported
IsWapiSupported
IsWifiDisplayR2Supported
IsWifiEnabled

Return whether Wi-Fi is enabled or disabled.

IsWifiPasspointEnabled
IsWpa3SaeH2eSupported
IsWpa3SaePublicKeySupported
IsWpa3SaeSupported
IsWpa3SuiteBSupported
JniIdentityHashCode (Inherited from Object)
JniPeerMembers
MaxNumberOfNetworkSuggestionsPerApp
MaxSignalLevel
NetworkSuggestions
PasspointConfigurations
PeerReference (Inherited from Object)
ScanResults

Return the results of the latest access point scan.

StaConcurrencyForMultiInternetMode
ThresholdClass

This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.

ThresholdType

This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.

WifiState

Gets the Wi-Fi enabled state.

Methods

AddNetwork(WifiConfiguration)
Obsolete.

Add a new network description to the set of configured networks.

AddNetworkPrivileged(WifiConfiguration)
AddNetworkSuggestions(IList<WifiNetworkSuggestion>)
AddOrUpdatePasspointConfiguration(PasspointConfiguration)
AddSuggestionConnectionStatusListener(IExecutor, WifiManager+ISuggestionConnectionStatusListener)
AddSuggestionUserApprovalStatusListener(IExecutor, WifiManager+ISuggestionUserApprovalStatusListener)
AllowAutojoinGlobal(Boolean)
CalculateSignalLevel(Int32)
CalculateSignalLevel(Int32, Int32)
Obsolete.

Calculates the level of the signal.

CancelWps(WifiManager+WpsCallback)
Obsolete.

Cancel any ongoing Wi-fi Protected Setup

Clone()

Creates and returns a copy of this object.

(Inherited from Object)
CompareSignalLevel(Int32, Int32)

Compares two signal strengths.

CreateMulticastLock(String)

Create a new MulticastLock

CreateWifiLock(String)
Obsolete.

Creates a new WifiLock.

CreateWifiLock(WifiMode, String)

Creates a new WifiLock.

DisableNetwork(Int32)
Obsolete.

Disable a configured network.

Disconnect()
Obsolete.

Disassociate from the currently active access point.

Dispose() (Inherited from Object)
Dispose(Boolean) (Inherited from Object)
EnableNetwork(Int32, Boolean)
Obsolete.

Allow a previously configured network to be associated with.

Equals(Object)

Indicates whether some other object is "equal to" this one.

(Inherited from Object)
FlushPasspointAnqpCache()
FromContext(Context)
GetHashCode()

Returns a hash code value for the object.

(Inherited from Object)
Is24GHzBandSupported()
Is5GHzBandSupported()
Is60GHzBandSupported()
Is6GHzBandSupported()
IsCarrierNetworkOffloadEnabled(Int32, Boolean)
IsWifiStandardSupported(Int32)
JavaFinalize()

Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.

(Inherited from Object)
Notify()

Wakes up a single thread that is waiting on this object's monitor.

(Inherited from Object)
NotifyAll()

Wakes up all threads that are waiting on this object's monitor.

(Inherited from Object)
PingSupplicant()
Obsolete.

Check that the supplicant daemon is responding to requests.

QueryAutojoinGlobal(IExecutor, IConsumer)
Reassociate()
Obsolete.

Reconnect to the currently active access point, even if we are already connected.

Reconnect()
Obsolete.

Reconnect to the currently active access point, if we are currently disconnected.

RegisterScanResultsCallback(IExecutor, WifiManager+ScanResultsCallback)
RegisterSubsystemRestartTrackingCallback(IExecutor, WifiManager+SubsystemRestartTrackingCallback)
RemoveNetwork(Int32)
Obsolete.

Remove the specified network from the list of configured networks.

RemoveNetworkSuggestions(IList<WifiNetworkSuggestion>)
RemoveNetworkSuggestions(IList<WifiNetworkSuggestion>, Int32)
RemoveNonCallerConfiguredNetworks()
RemovePasspointConfiguration(String)
RemoveSuggestionConnectionStatusListener(WifiManager+ISuggestionConnectionStatusListener)
RemoveSuggestionUserApprovalStatusListener(WifiManager+ISuggestionUserApprovalStatusListener)
ReportCreateInterfaceImpact(Int32, Boolean, IExecutor, IBiConsumer)
SaveConfiguration()
Obsolete.

Tell the supplicant to persist the current list of configured networks.

SetHandle(IntPtr, JniHandleOwnership)

Sets the Handle property.

(Inherited from Object)
SetTdlsEnabled(InetAddress, Boolean)

Enable/Disable TDLS on a specific local route.

SetTdlsEnabledWithMacAddress(String, Boolean)

Similar to SetTdlsEnabled(InetAddress, Boolean), except this version allows you to specify remote endpoint with a MAC address.

SetWifiEnabled(Boolean)
Obsolete.

Enable or disable Wi-Fi.

StartLocalOnlyHotspot(WifiManager+LocalOnlyHotspotCallback, Handler)
StartScan()
Obsolete.

Request a scan for access points.

StartWps(WpsInfo, WifiManager+WpsCallback)
Obsolete.

Start Wi-fi Protected Setup

ToArray<T>() (Inherited from Object)
ToString()

Returns a string representation of the object.

(Inherited from Object)
UnregisterFromRuntime() (Inherited from Object)
UnregisterScanResultsCallback(WifiManager+ScanResultsCallback)
UnregisterSubsystemRestartTrackingCallback(WifiManager+SubsystemRestartTrackingCallback)
UpdateNetwork(WifiConfiguration)
Obsolete.

Update the network description of an existing configured network.

Wait()

Causes the current thread to wait until another thread invokes the java.lang.Object#notify() method or the java.lang.Object#notifyAll() method for this object.

(Inherited from Object)
Wait(Int64)

Causes the current thread to wait until either another thread invokes the java.lang.Object#notify() method or the java.lang.Object#notifyAll() method for this object, or a specified amount of time has elapsed.

(Inherited from Object)
Wait(Int64, Int32)

Causes the current thread to wait until another thread invokes the java.lang.Object#notify() method or the java.lang.Object#notifyAll() method for this object, or some other thread interrupts the current thread, or a certain amount of real time has elapsed.

(Inherited from Object)

Explicit Interface Implementations

IJavaPeerable.Disposed() (Inherited from Object)
IJavaPeerable.DisposeUnlessReferenced() (Inherited from Object)
IJavaPeerable.Finalized() (Inherited from Object)
IJavaPeerable.JniManagedPeerState (Inherited from Object)
IJavaPeerable.SetJniIdentityHashCode(Int32) (Inherited from Object)
IJavaPeerable.SetJniManagedPeerState(JniManagedPeerStates) (Inherited from Object)
IJavaPeerable.SetPeerReference(JniObjectReference) (Inherited from Object)

Extension Methods

JavaCast<TResult>(IJavaObject)

Performs an Android runtime-checked type conversion.

JavaCast<TResult>(IJavaObject)
GetJniTypeName(IJavaPeerable)

Applies to