hoerresb / WifiWizard

A Cordova plugin for managing Wifi networks
Apache License 2.0
205 stars 177 forks source link

Callback when scan is complete #35

Open bojidar-bg opened 9 years ago

bojidar-bg commented 9 years ago

Currently one has to call startScan and then poll getScanResults until the scan is complete. It will be simpler if I could call waitForScanResult (not a good function name, but nvm....) and have a callback called when an intent with SCAN_RESULTS_AVAILABLE_ACTION is sent. An example usage :smile: ..

BTW, :+1:¹⁰⁰ for this package, it works great :smiley:

hoerresb commented 9 years ago

Hey, sorry for the late reply on this issue. I think you have the right idea. StartScan returns true once the scan has started. We should register a BroadcastReceiver to the SCAN_RESULTS_AVAILABLE_ACTION in order to get the list of the available access points as soon as the scan completes. Definitely going to look into this.

Thanks.

ItsNotYou commented 8 years ago

Hey, the pull request still seems to be open. We would like to use this feature as well. Is it possible to merge or is there any need for further improvements?