arsenal942 / Cordova-Network-Manager

Cordova Network Manager enables Wifi management for both Android and iOS applications within Cordova/Phonegap projects.
Other
16 stars 8 forks source link

getCurrentSSID() returns SSID even when not connected (getCurrentBSSID does not exist) #7

Closed tripflex closed 6 years ago

tripflex commented 6 years ago

Seems that getCurrentSSID returns an SSID even when it's not connected to that network, which calls the getConnectedSSID

see: https://stackoverflow.com/questions/41366481/android-why-wifimanager-getconnectioninfo-getssid-return-disconnected-ssid https://developer.android.com/reference/android/net/wifi/WifiInfo.html#getSSID()

Trying to use this to handle the ssidToDisconnect

Reading the docs it seems that getCurrentBSSID would work (as it should return null if not connected), but even though that method is available, it does not exist in main java file (which I found is actually related to the WiFiWizard, not your edits)

arsenal942 commented 6 years ago

Good spot. This goes back to the OG WifiWizard code being a bit trash.

I'm just going to re-write the entire Android platform side since it makes a lot more sense to do so.

arsenal942 commented 6 years ago

Working on this now.

arsenal942 commented 6 years ago

@tripflex 'getConnectedBSSID' now exists and the OG getConnectedSSID has been modified. Check #3deb50f to see the changes.

arsenal942 commented 6 years ago

Release v2.4.0 fixed.