title: To check whether the wifi scan is complete
body: <p>I'm writing a code for getting the information of all the access points in the range continuously.</p>
  
  <p>Here is my code:</p>
  
  <pre><code>       myRunnable = new Runnable() {
         @Override public void run() {
         while(){
         wifi = (WifiManager) getSystemService(Context.WIFI_SERVICE); 
         wifi.startScan(); 
         List&lt;ScanResult&gt;results= wifi.getScanResults();
          try{
            //data Logging
              }  
             } 
           } 
          };
  
        myThread = new Thread(myRunnable);
        myThread.start();
  </code></pre>
  
  <p>As the scanning and logging of data continuous repeatedly, i want to check whether the scan is complete before logging data. 
  Is there any flag or function which checks for wifi.startScan() is complete or not , before logging the data.
  Could you please help me out with a code.                 </p>