Advertisement
Guest User

Untitled

a guest
Apr 18th, 2019
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. @Override
  2. protected void doInBackgroundEx() throws Exception {
  3.  
  4. Logger.d("");
  5.  
  6. APDeviceInfo ap_device;
  7.  
  8. if(wifiManager == null){
  9. wifiManager = (WifiManager) AppUtils.getAppContext().getSystemService(Context.WIFI_SERVICE);
  10. }
  11.  
  12. Thread.sleep(2000);
  13. wifiManager.startScan();
  14. List<ScanResult> results = wifiManager.getScanResults();
  15.  
  16.  
  17. for (ScanResult scanResult : results) {
  18. ap_device = new APDeviceInfo();
  19. ap_device.ssid = scanResult.SSID;
  20. ap_device.security = scanResult.capabilities;
  21. ap_device.bssid = scanResult.BSSID;
  22. ap_devices_list.add(ap_device);
  23. }
  24.  
  25. //this.searchAPListListener.onSearchAPFinished(ap_devices_list);
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement