Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/andreock/capacitor-plugin-wifi
https://github.com/andreock/capacitor-plugin-wifi
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/andreock/capacitor-plugin-wifi
- Owner: andreock
- Created: 2023-06-18T16:49:56.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-09-02T08:46:32.000Z (over 1 year ago)
- Last Synced: 2024-10-14T11:36:40.960Z (3 months ago)
- Language: Java
- Size: 2.51 MB
- Stars: 2
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
Awesome Lists containing this project
README
# capacitor-plugin-wifi
Capacitor JS plugin that work as wrapper of WifiManager of Android
## Install
```bash
npm install capacitor-plugin-wifi
npx cap sync
```## API
* [`checkPermission()`](#checkpermission)
* [`requestPermission()`](#requestpermission)
* [`wifiScan()`](#wifiscan)
* [`getWifiStatus()`](#getwifistatus)
* [`getSupportedBands()`](#getsupportedbands)
* [`changeWifiStatus()`](#changewifistatus)
* [`disconnect()`](#disconnect)
* [`getCurrentNetworkConfiguration()`](#getcurrentnetworkconfiguration)
* [`getDHCPInfo()`](#getdhcpinfo)
* [`isP2PSupported()`](#isp2psupported)
* [Interfaces](#interfaces)
* [Type Aliases](#type-aliases)### checkPermission()
```typescript
checkPermission() => Promise<{ status: string; }>
```**Returns:**
Promise<{ status: string; }>
--------------------
### requestPermission()
```typescript
requestPermission() => void
```--------------------
### wifiScan()
```typescript
wifiScan() => Promise<{ networks: ScanResult[]; error: string | undefined; }>
```**Returns:**
Promise<{ networks: ScanResult[]; error: string; }>
--------------------
### getWifiStatus()
```typescript
getWifiStatus() => Promise<{ status: boolean; }>
```**Returns:**
Promise<{ status: boolean; }>
--------------------
### getSupportedBands()
```typescript
getSupportedBands() => Promise
```**Returns:**
Promise<SupportedBands>
--------------------
### changeWifiStatus()
```typescript
changeWifiStatus() => Promise<{ status: boolean; }>
```**Returns:**
Promise<{ status: boolean; }>
--------------------
### disconnect()
```typescript
disconnect() => Promise<{ status: boolean; }>
```**Returns:**
Promise<{ status: boolean; }>
--------------------
### getCurrentNetworkConfiguration()
```typescript
getCurrentNetworkConfiguration() => Promise
```**Returns:**
Promise<Wifi>
--------------------
### getDHCPInfo()
```typescript
getDHCPInfo() => Promise
```**Returns:**
Promise<DhcpInfo>
--------------------
### isP2PSupported()
```typescript
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.