SensorModelDataCollector/src/com/clarkson/sensormodeldatacollector/WiFiScanActivity.java
/**
     * Called when the Start/Stop scan button is pressed
     *
     * This method clears out any previous scan results and schedules a new wifi scan timer task
     * If the scan is already running, then this method halts the timer task and resets the scan counter
     * If the one shot scan button is clicked, scan results are cleared out and a single scan is performed
     */
Called when the Start/Stop scan button is pressed

This method clears out any previous scan results and schedules a new wifi scan timer task
If the scan is already running, then this method halts the timer task and resets the scan counter
If the one shot scan button is clicked, scan results are cleared out and a single scan is performed
Called when the Start / Stop scan button is pressed This method clears out any previous scan results and schedules a new wifi scan timer task If the scan is already running then this method halts the timer task and resets the scan counter If the one shot scan button is clicked scan results are cleared out and a single scan is performed
public void onStartScanningClick()
    {
        if(mStartStopScanButton.getText().toString().equals(getResources().getString(R.string.perform_scan)))
        {
            if(mNumberOfScansCounter == 0)
            {
            }
            mScanResultsArrayList.clear();
            mWifiScanResultAdapter.disableItemsSelection();
            Log.d(getLocalClassName(), "Step 5.1");
            mStartStopScanButton.setText(R.string.stop_scan);
            mScanRunning = true;
            if(mReceiverRegistered == false) {
                registerWifiScanReceiver();
            }
            scheduleWifiScanTimerTask();
        }
        else
        {
            mWifiScanResultAdapter.enableItemsSelection();
            Log.d(getLocalClassName(), "Step 5.2");
            mTimerTask.cancel();
            mScanRunning = false;
            mStartStopScanButton.setText(R.string.perform_scan);
            mResetScanResultsDialog.show();
            if(mReceiverRegistered) {
                unregisterWifiScanReceiver();
            }
        }
    }
public void onStartScanningClick ( ) { if ( mStartStopScanButton . getText ( ) . toString ( ) . equals ( getResources ( ) . getString ( R . string . perform_scan ) ) ) { if ( mNumberOfScansCounter == 0 ) { } mScanResultsArrayList . clear ( ) ; mWifiScanResultAdapter . disableItemsSelection ( ) ; Log . d ( getLocalClassName ( ) , "Step 5.1" ) ; mStartStopScanButton . setText ( R . string . stop_scan ) ; mScanRunning = true ; if ( mReceiverRegistered == false ) { registerWifiScanReceiver ( ) ; } scheduleWifiScanTimerTask ( ) ; } else { mWifiScanResultAdapter . enableItemsSelection ( ) ; Log . d ( getLocalClassName ( ) , "Step 5.2" ) ; mTimerTask . cancel ( ) ; mScanRunning = false ; mStartStopScanButton . setText ( R . string . perform_scan ) ; mResetScanResultsDialog . show ( ) ; if ( mReceiverRegistered ) { unregisterWifiScanReceiver ( ) ; } } }
Called when the Start/Stop scan button is pressed
Called when the Start / Stop scan button is pressed
//Set time to normalize scan results to if this is the first scan
 //mMillisecondsSinceBoot = SystemClock.uptimeMillis();
 //if
 //startTime = SystemClock.uptimeMillis();
 //if
 //if
 //Halt the wifi scan timer task
 //Set the Scan button text back to performing the scan
 //if
 //else
