6.0.1 • Published 6 months ago

capacitor-plugin-wifi-6 v6.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
6 months ago

capacitor-plugin-wifi-6

Capacitor plugin that work as wrapper of WifiManager of Android.

It's a fork from capacitor-plugin-wifi but for Capacitor version 6.

Install

npm install capacitor-plugin-wifi-6
npx cap sync

API

checkPermission()

checkPermission() => Promise<{ status: boolean; }>

Returns: Promise<{ status: boolean; }>


requestPermission()

requestPermission() => void

wifiScan()

wifiScan() => Promise<{ networks: ScanResult[]; error: string | undefined; }>

Returns: Promise<{ networks: ScanResult[]; error: string; }>


getWifiStatus()

getWifiStatus() => Promise<{ status: boolean; }>

Returns: Promise<{ status: boolean; }>


getSupportedBands()

getSupportedBands() => Promise<SupportedBands>

Returns: Promise<SupportedBands>


changeWifiStatus()

changeWifiStatus() => Promise<{ status: boolean; }>

Returns: Promise<{ status: boolean; }>


disconnect()

disconnect() => Promise<{ status: boolean; }>

Returns: Promise<{ status: boolean; }>


getCurrentNetworkConfiguration()

getCurrentNetworkConfiguration() => Promise<Wifi>

Returns: Promise<Wifi>


getDHCPInfo()

getDHCPInfo() => Promise<DhcpInfo>

Returns: Promise<DhcpInfo>


isP2PSupported()

isP2PSupported() => Promise<{ p2p_supported: boolean; }>

Returns: Promise<{ p2p_supported: boolean; }>


Interfaces

ScanResult

PropType
BSSIDstring
SSIDstring
capabilitiesstring
centerFreq0number | null
centerFreq1number | null
frequencynumber
levelnumber
timestampnumber

SupportedBands

PropType
WiFi24boolean
WiFi5boolean
WiFi6boolean
WiFi60boolean

Wifi

PropType
ssidstring
bssidstring
frequencynumber
hiddenboolean
ip_addressnumber
link_speednumber
mac_addressstring
network_idnumber
rssinumber
current_rx_speednumber | null
current_tx_speednumber | null
fqdnstring | null
passpoint_provider_friendly_namestring | null
max_rx_speedstring | null
max_tx_speedstring | null
wifi_standardnumber | null
securitynumber | null
mlo_linksRecord<string, unknown>[] | null
mldstring | null
mlo_idnumber | null
associated_mlo_linksRecord<string, unknown>[] | null

DhcpInfo

PropType
dns1number
dns2number
gatewaynumber
ipAddressnumber
leaseDurationnumber
netmasknumber
serverAddressnumber

Type Aliases

Record

Construct a type with a set of properties K of type T

{

}

Check example for more information.

6.0.1

6 months ago

6.0.0

6 months ago