Wi-Fi scanning without broadcast receiver?
I have created wi-fi scanner. It continually scans for available wi-fi networks. But my question is why would exactly broadcast receiver is needed if i can actually run scanning (invoke startScan() with timer every x seconds) and receive the same results without creating broadcast receiver? This is broadcast receiver code in onCreate() method: i = new IntentFilter(); i.addAction(WifiManager.SCAN_RESULTS_AVAILABLE_ACTION); receiver = new BroadcastReceiver(){ public void onReceive(Context c, Intent i){ WifiManager w = (WifiManager) c.getSystemService(Context.WIFI_SERVICE); List<ScanResult> l = w