Added timing for AP scanning, reorganized the functionality by placing the processing of scanning results in onReceive()