capacitor-plugin-wifi-6
v6.0.1
Published
Capacitor 6 wifi scanner for android
Readme
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 syncAPI
checkPermission()requestPermission()wifiScan()getWifiStatus()getSupportedBands()changeWifiStatus()disconnect()getCurrentNetworkConfiguration()getDHCPInfo()isP2PSupported()- Interfaces
- Type Aliases
checkPermission()
checkPermission() => Promise<{ status: boolean; }>Returns: Promise<{ status: boolean; }>
requestPermission()
requestPermission() => voidwifiScan()
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
| Prop | Type |
| ------------------ | --------------------------- |
| BSSID | string |
| SSID | string |
| capabilities | string |
| centerFreq0 | number | null |
| centerFreq1 | number | null |
| frequency | number |
| level | number |
| timestamp | number |
SupportedBands
| Prop | Type |
| ------------ | -------------------- |
| WiFi24 | boolean |
| WiFi5 | boolean |
| WiFi6 | boolean |
| WiFi60 | boolean |
Wifi
| Prop | Type |
| -------------------------------------- | -------------------------------------------------------------------------- |
| ssid | string |
| bssid | string |
| frequency | number |
| hidden | boolean |
| ip_address | number |
| link_speed | number |
| mac_address | string |
| network_id | number |
| rssi | number |
| current_rx_speed | number | null |
| current_tx_speed | number | null |
| fqdn | string | null |
| passpoint_provider_friendly_name | string | null |
| max_rx_speed | string | null |
| max_tx_speed | string | null |
| wifi_standard | number | null |
| security | number | null |
| mlo_links | Record<string, unknown>[] | null |
| mld | string | null |
| mlo_id | number | null |
| associated_mlo_links | Record<string, unknown>[] | null |
DhcpInfo
| Prop | Type |
| ------------------- | ------------------- |
| dns1 | number |
| dns2 | number |
| gateway | number |
| ipAddress | number |
| leaseDuration | number |
| netmask | number |
| serverAddress | number |
Type Aliases
Record
Construct a type with a set of properties K of type T
{ [P in K]: T; }
Check example for more information.
