Closed MMartiDeveloper closed 5 years ago
Sad to see this discontinued
scanWifi does not work for me on emulator . Please help how can I get connected wifi SSID name and unique id ?
the plugin is discontinued.
BTW: Testing only works on real devices, not on emulator as in many case with Android
@hypery2k Do you happen to know if there is a good alternative since this is now discontinued?
I'm trying to scan the Wi-Fi signals from my app to see which one is stronger. I followed the exact steps in the ionic documentation but the plugin seems that isn't working.
This is my .ts file:
import { Component } from '@angular/core'; import { IonicPage, NavController, NavParams } from 'ionic-angular'; import { Hotspot, HotspotNetwork } from '@ionic-native/hotspot';
/**
@IonicPage() @Component({ selector: 'page-wifi-signal', templateUrl: 'wifi-signal.html', }) export class WifiSignalPage {
constructor(private hotspot: Hotspot, public navCtrl: NavController, public navParams: NavParams) { }
goBack(){
}
startScan() { this.hotspot.scanWifi().then((networks: Array) => {
console.log(networks);
});
}
ionViewDidLoad() { console.log('ionViewDidLoad WifiSignalPage'); }
}
When I try to emulate the application with the ionic app it says that the plugin is not installed, even when I do the
and the
So I'm being forced to build and emulate it on Android.
This is what the Android console shows: