hypery2k / cordova-hotspot-plugin

A Cordova plugin for managing HotSpot networks on Android
MIT License
37 stars 50 forks source link

ScanWifi() doesn't work on Android #98

Closed MMartiDeveloper closed 5 years ago

MMartiDeveloper commented 6 years ago

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

ionic cordova plugin add cordova-plugin-hotspot

and the

npm install --save @ionic-native/hotspot

So I'm being forced to build and emulate it on Android.

This is what the Android console shows:

captura de pantalla 2018-08-20 a las 11 17 43
curious-monggo commented 6 years ago

Sad to see this discontinued

webkhushboo commented 5 years ago

scanWifi does not work for me on emulator . Please help how can I get connected wifi SSID name and unique id ?

hypery2k commented 5 years ago

the plugin is discontinued.

BTW: Testing only works on real devices, not on emulator as in many case with Android

shootdaj commented 5 years ago

@hypery2k Do you happen to know if there is a good alternative since this is now discontinued?