signal-plugin
v0.0.3
Published
Simple Capacitor plugin to get the signal strength(LTE,WiFi,Acoustic).
Downloads
1
Readme
signal-plugin
Simple Capacitor plugin to get the signal strength(LTE,WiFi,Acoustic).
Disclaimer
The plugin only works for Android and has not been completely tested, use it carefully!!
Install
npm install signal-plugin
npx cap sync
Example
The function getSignalInfo() return an object containing the value of the 3 measured signals:
WIFI
LTE
MICROPHONE
async getSignalInfo(){
this.signalInfo = (await SignalPlugin.getSignalInfo()).value;
console.log("WIFI: " + this.signalInfo.WIFI);
console.log("LTE: " + this.signalInfo.LTE);
console.log("MICROPHONE: " + this.signalInfo.MICROPHONE);
}
API
echo(...)
echo(options: { value: string; }) => Promise<{ value: string; }>
| Param | Type |
| ------------- | ------------------------------- |
| options
| { value: string; } |
Returns: Promise<{ value: string; }>
getSignalInfo()
getSignalInfo() => Promise<{ value: any; }>
Returns: Promise<{ value: any; }>
checkPermissions()
checkPermissions() => Promise<PermissionStatus>
Returns: Promise<PermissionStatus>
requestPermissions()
requestPermissions() => Promise<PermissionStatus>
Returns: Promise<PermissionStatus>
Interfaces
PermissionStatus
| Prop | Type |
| ---------------- | ----------------------------------------------------------- |
| WIFI
| PermissionState |
| LTE
| PermissionState |
| MICROPHONE
| PermissionState |
Type Aliases
PermissionState
'prompt' | 'prompt-with-rationale' | 'granted' | 'denied'