hypery2k / cordova-hotspot-plugin

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

Available networks come in multiple times #78

Closed bhumin3i closed 5 years ago

bhumin3i commented 6 years ago

Available networks come in multiple times. please help me out my sample code is i'm attaching my .ts file and .html please check and let me know thanks

this.hotspot.scanWifi().then((networks: Array) => { console.log(networks); alert('networks'+JSON.stringify(networks)); this.networkList = networks; });

Result :

0 : BSSID : "00:fe:c8:65:ea:10" SSID : "**3i-infotech-Guest**" capabilities : "[ESS]" frequency : 2462 level : -84 timestamp : "404817104406" __proto__ : Object 1 : BSSID : "00:fe:c8:65:e4:2f" SSID : "**3i-infotech-Guest**" capabilities : "[ESS]" frequency : 5180 level : -46 timestamp : "404817104254" __proto__ : Object 2 : BSSID : "00:fe:c8:65:e4:2d" SSID : "**SECURE_NET**" capabilities : "[ESS]" frequency : 5180 level : -46 timestamp : "404817104298" __proto__ : Object 3 : BSSID : "00:fe:c8:65:e5:e2" SSID : "**SECURE_NET**" capabilities : "[ESS]" frequency : 2437 level : -81 timestamp : "404817104358" __proto__ : Object 4 : BSSID : "00:fe:c8:65:e4:2e" SSID : "**3i-infotech-Users**" capabilities : "[ESS]" frequency : 5180 level : -46 timestamp : "404817104284" __proto__ : Object 5 : BSSID : "00:fe:c8:65:e4:20" SSID : "**3i-infotech-Guest**" capabilities : "[ESS]" frequency : 2412 level : -37 timestamp : "404817104232" __proto__ : Object 6 : BSSID : "e0:98:61:70:90:71" SSID : "PK" capabilities : "[WPA2-PSK-CCMP][ESS]" frequency : 2447 level : -76 timestamp : "404817104323" __proto__ : Object 7 : BSSID : "00:fe:c8:c5:73:b2" SSID : "SECURE_NET" capabilities : "[ESS]" frequency : 2412 level : -85 timestamp : "404815642186" __proto__ : Object 8 : BSSID : "f4:f5:24:02:25:35" SSID : "Lenovo P2" capabilities : "[WPA2-PSK-CCMP][ESS]" frequency : 2462 level : -72 timestamp : "404817104310" __proto__ : Object 9 : BSSID : "bc:8a:e8:04:00:3f" SSID : "JioFi2_04003F" capabilities : "[WPA2-PSK-CCMP][WPS][ESS]" frequency : 2462 level : -86 timestamp : "404817104418" __proto__ : Object 10 : BSSID : "04:b1:67:cc:dc:85" SSID : "No Internet" capabilities : "[WPA2-PSK-CCMP][ESS]" frequency : 2412 level : -89 timestamp : "404815642233" __proto__ : Object 11 : BSSID : "00:fe:c8:65:e4:22" SSID : "SECURE_NET" capabilities : "[ESS]" frequency : 2412 level : -37 timestamp : "404817104219" __proto__ : Object 12 : {SSID: "3i-infotech-Users", BSSID: "00:fe:c8:c5:73:b1", frequency: 2412, level: -85, timestamp: "404817104334", …} 13 : {SSID: "3i-infotech-Users", BSSID: "00:fe:c8:65:e4:21", frequency: 2412, level: -37, timestamp: "404817104243", …} 14 : {SSID: "3i-infotech-Users", BSSID: "00:fe:c8:65:e5:e1", frequency: 2437, level: -82, timestamp: "404817104370", …} 15 : {SSID: "3i-integrity", BSSID: "00:1c:f9:71:ce:00", frequency: 2427, level: -90, timestamp: "404817104431", …} 16 : BSSID : "62:4d:7f:75:24:5c" SSID : "Bhumin’s iPhone7 🦅" capabilities : "[WPA2-PSK-CCMP][ESS]" frequency : 2437 level : -30 timestamp : "404817104194" __proto__ : Object 17 : {SSID: "VikiMI", BSSID: "4c:49:e3:67:ca:fb", frequency: 2412, level: -93, timestamp: "404815642291", …} 18 : {SSID: "3i-infotech-Guest", BSSID: "00:fe:c8:c5:73:b0", frequency: 2412, level: -84, timestamp: "404817104345", …} 19 : {SSID: "SECURE_NET", BSSID: "00:fe:c8:65:ea:12", frequency: 2462, level: -84, timestamp: "404817104381", …} 20 : {SSID: "me", BSSID: "94:65:2d:94:91:ba", frequency: 2412, level: -91, timestamp: "404817104443", …} 21 : {SSID: "3i-infotech-Guest", BSSID: "00:fe:c8:5b:11:c0", frequency: 2462, level: -93, timestamp: "404817104467", …} 22 : {SSID: "3i-infotech-Users", BSSID: "00:fe:c8:65:ea:11", frequency: 2462, level: -83, timestamp: "404817104393", …} 23 : {SSID: "SECURE_NET", BSSID: "00:fe:c8:5b:11:c2", frequency: 2462, level: -91, timestamp: "404817104455", …}

https://plnkr.co/edit/melEbZRwN5XQp2C1sIJa?p=catalogue

please refer dashboard.ts and dashboard.html

hypery2k commented 6 years ago

the plugin is discontinued, so I will not maintain this repo anymore