WifiManager WifiManager Class

Definition

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

[Android.Runtime.Register("android/net/wifi/WifiManager", ApiSince=1, DoNotGenerateAcw=true)]
public class WifiManager : Java.Lang.Object
type WifiManager = class
    inherit Object
Inheritance
WifiManagerWifiManager
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) WifiManager(IntPtr, JniHandleOwnership)

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

Fields

ActionPickWifiNetwork ActionPickWifiNetwork

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

ActionRequestScanAlwaysAvailable ActionRequestScanAlwaysAvailable

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

ErrorAuthenticating ErrorAuthenticating

The error code if there was a problem authenticating.

ExtraBssid ExtraBssid

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

ExtraNetworkInfo ExtraNetworkInfo

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

ExtraNewRssi ExtraNewRssi

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

ExtraNewState ExtraNewState

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

ExtraPreviousWifiState ExtraPreviousWifiState

The previous Wi-Fi state.

ExtraResultsUpdated ExtraResultsUpdated
ExtraSupplicantConnected ExtraSupplicantConnected

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

ExtraSupplicantError ExtraSupplicantError

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

ExtraWifiInfo ExtraWifiInfo

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

ExtraWifiState ExtraWifiState

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

NetworkIdsChangedAction NetworkIdsChangedAction

The network IDs of the configured networks could have changed.

NetworkStateChangedAction NetworkStateChangedAction

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

RssiChangedAction RssiChangedAction

The RSSI (signal strength) has changed.

ScanResultsAvailableAction ScanResultsAvailableAction

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

SupplicantConnectionChangeAction SupplicantConnectionChangeAction

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 SupplicantStateChangedAction

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

WifiStateChangedAction WifiStateChangedAction

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

Properties

Class Class

Returns the unique instance of Class that represents this object's class.

(Inherited from Object)
ConfiguredNetworks ConfiguredNetworks

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

ConnectionInfo ConnectionInfo

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

DhcpInfo DhcpInfo

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

Handle Handle

The handle to the underlying Android instance.

(Inherited from Object)
IJavaObjectEx.IsProxy IJavaObjectEx.IsProxy Inherited from Object
IJavaObjectEx.KeyHandle IJavaObjectEx.KeyHandle Inherited from Object
IJavaObjectEx.NeedsActivation IJavaObjectEx.NeedsActivation Inherited from Object
IJavaPeerable.JniManagedPeerState IJavaPeerable.JniManagedPeerState Inherited from Object
IsDeviceToApRttSupported IsDeviceToApRttSupported
IsEnhancedPowerReportingSupported IsEnhancedPowerReportingSupported
IsP2pSupported IsP2pSupported
IsPreferredNetworkOffloadSupported IsPreferredNetworkOffloadSupported
IsScanAlwaysAvailable IsScanAlwaysAvailable

Check if scanning is always available.

IsTdlsSupported IsTdlsSupported
IsWifiEnabled IsWifiEnabled

Return whether Wi-Fi is enabled or disabled.

JniIdentityHashCode JniIdentityHashCode Inherited from Object
JniPeerMembers JniPeerMembers
PasspointConfigurations PasspointConfigurations
PeerReference PeerReference Inherited from Object
ScanResults ScanResults

Return the results of the latest access point scan.

ThresholdClass ThresholdClass

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

ThresholdType ThresholdType

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

WifiState WifiState

Gets the Wi-Fi enabled state.

Methods

AddNetwork(WifiConfiguration) AddNetwork(WifiConfiguration)

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

AddOrUpdatePasspointConfiguration(PasspointConfiguration) AddOrUpdatePasspointConfiguration(PasspointConfiguration)
CalculateSignalLevel(Int32, Int32) CalculateSignalLevel(Int32, Int32)

Calculates the level of the signal.

CancelWps(WifiManager+WpsCallback) CancelWps(WifiManager+WpsCallback)

Cancel any ongoing Wi-fi Protected Setup

Clone() Clone()

Creates and returns a copy of this Object.

(Inherited from Object)
CompareSignalLevel(Int32, Int32) CompareSignalLevel(Int32, Int32)

Compares two signal strengths.

CreateMulticastLock(String) CreateMulticastLock(String)

Create a new MulticastLock

CreateWifiLock(String) CreateWifiLock(String)

Creates a new WifiLock.

CreateWifiLock(WifiMode, String) CreateWifiLock(WifiMode, String)

Creates a new WifiLock.

DisableNetwork(Int32) DisableNetwork(Int32)

Disable a configured network.

Disconnect() Disconnect()

Disassociate from the currently active access point.

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

Allow a previously configured network to be associated with.

Equals(Object) Equals(Object)

Compares this instance with the specified object and indicates if they are equal.

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

Returns an integer hash code for this object.

(Inherited from Object)
Is5GHzBandSupported() Is5GHzBandSupported()
JavaFinalize() JavaFinalize()

Invoked when the garbage collector has detected that this instance is no longer reachable.

(Inherited from Object)
Notify() Notify()

Causes a thread which is waiting on this object's monitor (by means of calling one of the wait() methods) to be woken up.

(Inherited from Object)
NotifyAll() NotifyAll()

Causes all threads which are waiting on this object's monitor (by means of calling one of the wait() methods) to be woken up.

(Inherited from Object)
PingSupplicant() PingSupplicant()

Check that the supplicant daemon is responding to requests.

Reassociate() Reassociate()

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

Reconnect() Reconnect()

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

RemoveNetwork(Int32) RemoveNetwork(Int32)

Remove the specified network from the list of configured networks.

RemovePasspointConfiguration(String) RemovePasspointConfiguration(String)
SaveConfiguration() SaveConfiguration()

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

SetHandle(IntPtr, JniHandleOwnership) SetHandle(IntPtr, JniHandleOwnership)

Sets the Handle property.

(Inherited from Object)
SetTdlsEnabled(InetAddress, Boolean) SetTdlsEnabled(InetAddress, Boolean)

Enable/Disable TDLS on a specific local route.

SetTdlsEnabledWithMacAddress(String, Boolean) SetTdlsEnabledWithMacAddress(String, Boolean)

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

SetWifiEnabled(Boolean) SetWifiEnabled(Boolean)

Enable or disable Wi-Fi.

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

Request a scan for access points.

StartWps(WpsInfo, WifiManager+WpsCallback) StartWps(WpsInfo, WifiManager+WpsCallback)

Start Wi-fi Protected Setup

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

Returns a string containing a concise, human-readable description of this object.

(Inherited from Object)
UnregisterFromRuntime() UnregisterFromRuntime() Inherited from Object
UpdateNetwork(WifiConfiguration) UpdateNetwork(WifiConfiguration)

Update the network description of an existing configured network.

Wait() Wait()

Causes the calling thread to wait until another thread calls the notify() or notifyAll() method of this object.

(Inherited from Object)
Wait(Int64) Wait(Int64)

Causes the calling thread to wait until another thread calls the notify() or notifyAll() method of this object or until the specified timeout expires.

(Inherited from Object)
Wait(Int64, Int32) Wait(Int64, Int32)

Causes the calling thread to wait until another thread calls the notify() or notifyAll() method of this object or until the specified timeout expires.

(Inherited from Object)

Explicit Interface Implementations

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

Extension Methods

JavaCast<TResult>(IJavaObject) JavaCast<TResult>(IJavaObject)

Performs an Android runtime-checked type conversion.

JavaCast<TResult>(IJavaObject) JavaCast<TResult>(IJavaObject)
GetJniTypeName(IJavaPeerable) GetJniTypeName(IJavaPeerable)

Applies to