hypery2k / cordova-hotspot-plugin

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

getAllHotspotDevices returns only one device #107

Open lonewolf73 opened 3 years ago

lonewolf73 commented 3 years ago

Hello everyone, I am trying this cool plugin in my simple Ionic Cordova application. With this simple code I have:

  getAllDevicesList() { 
    this.hs.getAllHotspotDevices()
    .then(_ => _,  onrejected => { this.hotspot_label = "Something went wrong" })
    .then(retVal => { 
      console.log(retVal); 
      this.hotspot_devs = [];
      this.hotspot_devs = retVal; 
      console.log(this.hotspot_devs);  // JSON array structure of devices (IP , MAC) 
    });
  }

with a scenario of a smartphone with Android 8.0 as a server and other three devices (a smartphone with Android 5.1 and two Win 10 laptops) connected to this server. If I debug this retVal , I always get only one device.... Is maybe this callback function limited to only one device? Cheers