Share via


WifiInfo Class

Definition

Describes the state of any Wi-Fi connection that is active or is in the process of being set up.

[Android.Runtime.Register("android/net/wifi/WifiInfo", DoNotGenerateAcw=true)]
public class WifiInfo : Java.Lang.Object, Android.Net.ITransportInfo, Android.OS.IParcelable, IDisposable, Java.Interop.IJavaPeerable
[<Android.Runtime.Register("android/net/wifi/WifiInfo", DoNotGenerateAcw=true)>]
type WifiInfo = class
    inherit Object
    interface ITransportInfo
    interface IJavaObject
    interface IDisposable
    interface IJavaPeerable
    interface IParcelable
Inheritance
WifiInfo
Attributes
Implements

Remarks

Describes the state of any Wi-Fi connection that is active or is in the process of being set up.

In the connected state, access to location sensitive fields requires the same permissions as WifiManager#getScanResults. If such access is not allowed, #getSSID will return WifiManager#UNKNOWN_SSID and #getBSSID will return "02:00:00:00:00:00". #getApMldMacAddress() will return null. #getNetworkId() will return -1. #getPasspointFqdn() will return null. #getPasspointProviderFriendlyName() will return null. #getInformationElements() will return null. #getMacAddress() will return "02:00:00:00:00:00".

Java documentation for android.net.wifi.WifiInfo.

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

WifiInfo(IntPtr, JniHandleOwnership)

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

Fields

FrequencyUnits

Frequency in MHz

LinkSpeedUnits

The unit in which links speeds are expressed.

LinkSpeedUnknown

Constant for unknown link speed.

SecurityTypeDpp
Obsolete.

Security type for Easy Connect (DPP) network

SecurityTypeEap
Obsolete.

Security type for an EAP network.

SecurityTypeEapWpa3Enterprise
Obsolete.

Security type for a WPA3-Enterprise network.

SecurityTypeEapWpa3Enterprise192Bit
Obsolete.

Security type for a WPA3-Enterprise in 192-bit security network.

SecurityTypeOpen
Obsolete.

Security type for an open network.

SecurityTypeOsen
Obsolete.

Security type for an OSEN network.

SecurityTypeOwe
Obsolete.

Security type for an OWE network.

SecurityTypePasspointR1R2
Obsolete.

Security type for a Passpoint R1/R2 network, where TKIP and WEP are not allowed.

SecurityTypePasspointR3
Obsolete.

Security type for a Passpoint R3 network, where TKIP and WEP are not allowed, and PMF must be set to Required.

SecurityTypePsk
Obsolete.

Security type for a PSK network.

SecurityTypeSae
Obsolete.

Security type for an SAE network.

SecurityTypeUnknown
Obsolete.

Unknown security type.

SecurityTypeWapiCert
Obsolete.

Security type for a WAPI Certificate network.

SecurityTypeWapiPsk
Obsolete.

Security type for a WAPI PSK network.

SecurityTypeWep
Obsolete.

Security type for a WEP network.

Properties

AffiliatedMloLinks

Return the Multi-Link Operation (MLO) affiliated Links for Wi-Fi 7 access points.

ApMldMacAddress

Return the Multi-Link Device (MLD) MAC Address for the connected access point.

ApMloLinkId

Return the access point Multi-Link Operation (MLO) link-id for Wi-Fi 7 access points.

ApplicableRedactions

Returns a bitmask of all the applicable redactions (based on the permissions held by the receiving app) to be performed on this TransportInfo.

AssociatedMloLinks

Return the associated Multi-Link Operation (MLO) Links for Wi-Fi 7 access points.

BSSID

Return the basic service set identifier (BSSID) of the current access point.

Class

Returns the runtime class of this Object.

(Inherited from Object)
CurrentSecurityType

Returns the security type of the current 802.

Frequency

Returns the current frequency in #FREQUENCY_UNITS.

Handle

The handle to the underlying Android instance.

(Inherited from Object)
HiddenSSID
InformationElements

Get all information elements found in the beacon of the connected bssid.

IpAddress

This member is deprecated.

IsRestricted

Returns true if the current Wifi network is a restricted network, false otherwise.

JniIdentityHashCode (Inherited from Object)
JniPeerMembers
LinkSpeed

Returns the current link speed in #LINK_SPEED_UNITS.

MacAddress

Returns the MAC address used for this connection.

MaxSupportedRxLinkSpeedMbps

Returns the maximum supported receive link speed in Mbps

MaxSupportedTxLinkSpeedMbps

Returns the maximum supported transmit link speed in Mbps

NetworkId

Each configured network has a unique small integer ID, used to identify the network.

PasspointFqdn

Returns the Fully Qualified Domain Name of the network if it is a Passpoint network.

PasspointProviderFriendlyName

Returns the Provider Friendly Name of the network if it is a Passpoint network.

PasspointUniqueId

Get the Passpoint unique identifier for the current connection

PeerReference (Inherited from Object)
Rssi

Returns the received signal strength indicator of the current 802.

RxLinkSpeedMbps

Returns the current receive link speed in Mbps.

SSID

Returns the service set identifier (SSID) of the current 802.

SubscriptionId

If this network is provisioned by a carrier, returns subscription Id corresponding to the associated SIM on the device.

SupplicantState

Return the detailed state of the supplicant's negotiation with an access point, in the form of a SupplicantState SupplicantState object.

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.

TxLinkSpeedMbps

Returns the current transmit link speed in Mbps.

WifiStandard

Get connection Wi-Fi standard

Methods

Clone()

Creates and returns a copy of this object.

(Inherited from Object)
DescribeContents()

Implement the Parcelable interface {

Dispose() (Inherited from Object)
Dispose(Boolean) (Inherited from Object)
Equals(Object)

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

(Inherited from Object)
GetDetailedStateOf(SupplicantState)

Map a supplicant state into a fine-grained network connectivity state.

GetHashCode()

Returns a hash code value for the object.

(Inherited from Object)
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)
MakeCopy(Int64)

Create a copy of a WifiInfo with some fields redacted based on the permissions held by the receiving app.

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)
SetHandle(IntPtr, JniHandleOwnership)

Sets the Handle property.

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

Returns a string representation of the object.

(Inherited from Object)
UnregisterFromRuntime() (Inherited from Object)
Wait()

Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>.

(Inherited from Object)
Wait(Int64, Int32)

Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>, or until a certain amount of real time has elapsed.

(Inherited from Object)
Wait(Int64)

Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>, or until a certain amount of real time has elapsed.

(Inherited from Object)
WriteToParcel(Parcel, ParcelableWriteFlags)

Implement the Parcelable interface {

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)

Gets the JNI name of the type of the instance self.

JavaAs<TResult>(IJavaPeerable)

Try to coerce self to type TResult, checking that the coercion is valid on the Java side.

TryJavaCast<TResult>(IJavaPeerable, TResult)

Try to coerce self to type TResult, checking that the coercion is valid on the Java side.

Applies to