Connect to Wifi through your capacitor plugin. Good for IoT device connections.
npm install ln-capacitor-wifi
npx cap sync
scanWifi()
getCurrentWifi()
connectToWifiBySsidAndPassword(...)
connectToWifiBySsidPrefixAndPassword(...)
checkPermissions()
requestPermissions()
disconnectAndForget()
- Interfaces
- Type Aliases
- Enums
scanWifi() => Promise<ScanWifiResult>
Returns: Promise<ScanWifiResult>
getCurrentWifi() => Promise<GetCurrentWifiResult>
Returns: Promise<GetCurrentWifiResult>
connectToWifiBySsidAndPassword(connectToWifiRequest: ConnectToWifiRequest) => Promise<ConnectToWifiResult>
Param | Type |
---|---|
connectToWifiRequest |
ConnectToWifiRequest |
Returns: Promise<ConnectToWifiResult>
connectToWifiBySsidPrefixAndPassword(connectToWifiPrefixRequest: ConnectToWifiPrefixRequest) => Promise<ConnectToWifiResult>
Param | Type |
---|---|
connectToWifiPrefixRequest |
ConnectToWifiPrefixRequest |
Returns: Promise<ConnectToWifiResult>
checkPermissions() => Promise<PermissionStatus>
Returns: Promise<PermissionStatus>
requestPermissions() => Promise<PermissionStatus>
Returns: Promise<PermissionStatus>
disconnectAndForget() => Promise<void>
Prop | Type |
---|---|
wifis |
WifiEntry[] |
Prop | Type |
---|---|
bssid |
string |
capabilities |
WifiCapability[] |
ssid |
string |
level |
number |
isCurrentWifi |
boolean |
Prop | Type |
---|---|
currentWifi |
WifiEntry |
Prop | Type |
---|---|
wasSuccess |
true |
wifi |
WifiEntry |
Prop | Type |
---|---|
ssid |
string |
password |
string |
Prop | Type |
---|---|
ssidPrefix |
string |
password |
string |
Prop | Type |
---|---|
LOCATION |
PermissionState |
NETWORK |
PermissionState |
'prompt' | 'prompt-with-rationale' | 'granted' | 'denied'
Members | Value |
---|---|
WPA2_PSK_CCM |
'WPA2-PSK-CCM' |
RSN_PSK_CCMP |
'RSN-PSK-CCMP' |
RSN_SAE_CCM |
'RSN-SAE-CCM' |
WPA2_EAP_SHA1_CCM |
'WPA2-EAP/SHA1-CCM' |
RSN_EAP_SHA1_CCMP |
'RSN-EAP/SHA1-CCMP' |
ESS |
'ESS' |
ES |
'ES' |
WP |
'WP' |
Members | Value |
---|---|
HIDDEN |
'[HIDDEN_SSID]' |